1 2009-02-25 Kenichi Handa <handa@m17n.org>
3 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 4.
4 (M17NLIB_VERSION_NAME): Changed to "1.5.4".
6 * input.c (get_candidate_list): Free unnecessary objects.
7 (take_action_list): Free plist.
9 2009-02-04 Kenichi Handa <handa@m17n.org>
11 * coding.c (mcoding__init): Add "Shift_JIS" as an alias of "sjis".
13 2009-01-16 Kenichi Handa <handa@m17n.org>
15 * m17n-core.h (Mcased, Msoft_dotted, Mcase_mapping, Mblock):
18 * character.c (Mcased, Msoft_dotted, Mcase_mapping, Mblock): New
21 2009-01-14 Kenichi Handa <handa@m17n.org>
23 * coding.c (decode_coding_iso_2022): Check invocation status
24 before updating charset0 and charset1.
26 * symbol.c (msymbol__canonicalize): Handle "windows-XXXX".
28 2008-12-31 Kenichi Handa <handa@m17n.org>
30 * m17n-flt.c (mflt_run): If g->encoded is set, don't clear
33 2008-10-30 Andreas Schwab <schwab@suse.de> (tiny change)
35 * face.c (mface_get_prop): Fix strict aliasing bug.
36 (mface_put_prop): Likewise.
38 * m17n-gui.c (mframe): Fix strict aliasing bug.
40 2008-10-20 Kenichi Handa <handa@m17n.org>
42 * Version 1.5.3 released.
44 2008-10-06 Kenichi Handa <handa@m17n.org>
46 * draw.c (mdraw__init): Use TRUE only when
47 FRIBIDI_INTERFACE_VERSION is less than 3.
49 2008-10-03 Kenichi Handa <handa@m17n.org>
51 * database.c (mdatabase__find_file): Return a copy of filename if
52 it is absolute pathname.
54 2008-09-25 Kenichi Handa <handa@m17n.org>
56 * input.c (load_macros): Don't parse the action list here.
57 (load_im_info): Parse action lists of all macros.
59 2008-09-24 Kenichi Handa <handa@m17n.org>
61 * m17n-flt.c (mflt_find): Setup coverage of "combining" flt.
63 2008-09-19 Kenichi Handa <handa@m17n.org>
65 * input.c (fully_initialize): Rename "@reload" to "-reload".
67 2008-09-17 Kenichi Handa <handa@m17n.org>
69 * m17n-flt.c (run_stages): Fix combining with a variable width
72 2008-08-04 Kenichi Handa <handa@m17n.org>
74 * input.c (fully_initialize): Add more aliaese (e.g. C-M-1
77 2008-07-22 Kenichi Handa <handa@m17n.org>
79 * input.c (fully_initialize): Fix previous change.
81 2008-07-19 Kenichi Handa <handa@m17n.org>
83 * input.c (fully_initialize): Fix previous change.
85 2008-07-14 Kenichi Handa <handa@m17n.org>
87 * font-ft.c (ft_list_family): New arg CHECK_ALIAS. Callers changed.
89 2008-07-14 Kenichi Handa <handa@m17n.org>
91 * input.c (fully_initialize): Handle C-M-1, etc.
93 2008-07-11 Kenichi Handa <handa@m17n.org>
95 * input.c (minput_open_im): Check if the arg NAME is not Mnil.
97 2008-06-23 Kenichi Handa <handa@m17n.org>
99 * Version 1.5.2 released.
101 2008-06-23 Kenichi Handa <handa@m17n.org>
103 * m17n-core.h (M17NLIB_MINOR_VERSION): Changed to 5.
104 (M17NLIB_PATCH_LEVEL): Changed to 2.
105 (M17NLIB_VERSION_NAME): Changed "1.5.2".
107 2008-06-13 Kenichi Handa <handa@m17n.org>
109 * input.c (minput_config_file): Comment fixed for man-page.
111 2008-06-13 Harshula <harshula@gmail.com> (tiny change)
113 * Makefile.am (libm17n_gd_la_LIBADD): Add @FREETYPE_LD_FLAGS@.
115 2008-05-24 Kenichi Handa <handa@m17n.org>
117 * m17n-flt.c (mdebug_dump_flt): Change return value to (MFLT *).
119 2008-05-23 Kenichi Handa <handa@m17n.org>
121 * Makefile.am (libm17n_gui_la_LIBADD): Include libm17n-core.la.
122 (libm17n_X_la_LIBADD): Include libm17n-core.la, libm17n.la, and
124 (libm17n_gd_la_LIBADD): Likewise.
126 * input.c (take_action_list): Fix debug info.
128 2008-05-14 Kenichi Handa <handa@m17n.org>
130 * m17n-flt.c (run_rule): Check SRC_REGEX at first.
131 (run_stages): Fix index of g_indices.
133 2008-04-03 Kenichi Handa <handa@m17n.org>
135 * draw.c (compose_glyph_string): Don't run flt striding over the
137 (get_gstring): Don't use the cached gstring if cursor position is
140 2008-04-02 Kenichi Handa <handa@m17n.org>
142 * input.c (integer_value): Delete the 3rd arg VALUE.
143 (resolve_expression): Adjust the call of integer_value.
144 (take_action_list): Likewise.
146 2008-03-06 Kenichi Handa <handa@m17n.org>
148 * font-ft.c (ft_drive_otf): Don't ignore the otf-spec to apply all
151 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
153 * Version 1.5.1 released.
155 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
157 * draw.c (mdraw_glyph_list): Refer to mfont__ft_driver only when
158 HAVE_FREETYPE is defined.
160 * font.h (OTF_Tag): Be sure that it is defined in any cases.
162 2008-01-30 Kenichi Handa <handa@ni.aist.go.jp>
164 * font.h (enum MFontOpenTypeTable, MFontCapability): Define them
167 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
169 * input.c (parse_action_list): Handle the case "(insert INTEGER)".
171 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
173 * input.c (parse_action_list): Check M_candidates.
174 (get_im_info): If key is Mnil, be sure to set im_info->states to a
177 2008-01-23 Kenichi Handa <handa@ni.aist.go.jp>
179 * input.c (integer_value): Fix interpretation of "@-N".
181 2008-01-17 Kenichi Handa <handa@ni.aist.go.jp>
183 * input.c (get_following_char): Fix interpretation of POS.
184 (get_following_char): Fix interpretation of "@+N".
186 2008-01-15 Kenichi Handa <handa@ni.aist.go.jp>
188 * font-ft.c (ft_drive_otf): Don't refer to otf_gstring if HAVE_OTF
191 * Makefile.am (FLT_SOURCES): Include internal-flt.h.
193 2008-01-07 Kenichi Handa <handa@ni.aist.go.jp>
195 * m17n-flt.c (UPDATE_CLUSTER_RANGE): Don't check if clustering
197 (run_rule): Call UPDATE_CLUSTER_RANGE when necessary.
198 (run_command): Check if clustering now before calling
199 UPDATE_CLUSTER_RANGE.
201 2008-01-06 Kenichi Handa <handa@m17n.org>
203 * font.c (mfont__get_glyph_id): Return -1 if some code is invalid.
205 * font-ft.c (ft_drive_otf): Fix checking of negative feature.
207 * m17n-X.c (xft_find_metric): Set g->g.measured.
209 * m17n-flt.c (Mequal): New variable.
210 (m17n_init_flt): Initialize it.
211 (FontLayoutCmdRule): Merge members supported_glyph and otf_spec
212 into a new member facility.
213 (load_command): Modify parsing of Mfont_facility.
214 (run_rule): Adjuted for the change of FontLayoutCmdRule.
215 (run_otf): Adjusted metrics if a->back is nonzero.
217 2007-12-28 Kenichi Handa <handa@ni.aist.go.jp>
219 * Version 1.5.0 released.
221 2007-12-13 Kenichi Handa <handa@ni.aist.go.jp>
223 * m17n-core.c (m17n_init_core): Handle the lang. env. MDEBUG_FLT.
225 * m17n-flt.c (mdebug_flag): Set to MDEBUG_FLT.
226 (run_rule): Check if a font has the specific glyph correctly.
228 * internal.h (enum MDebugFlag): Delete MDEBUG_FONT_OTF, change
229 MDEBUG_FONT_FLT to MDEBUG_FLT.
231 * font.c (mfont__get_glyph_id): Encode g->g.code (not g->g.c).
233 * font-flt.c: Delete it.
235 2007-12-08 Kenichi Handa <handa@ni.aist.go.jp>
237 * m17n-flt.c (run_rule): Fix printing of debug info. Don't update
238 TO for the rule of SRC_HAS_GLYPH.
240 * draw.c (run_flt): Argument changed.
241 (compose_glyph_string): Adjusted for the above change.
243 2007-12-07 Kenichi Handa <handa@ni.aist.go.jp>
245 * plist.c (read_mtext_element): Don't free the malloced buffer.
247 2007-12-04 Kenichi Handa <handa@ni.aist.go.jp>
249 * m17n-core.h (merror_code): Extern it.
251 * m17n-misc.h (merror_code): Don't extern it.
253 * m17n.h: Handle the case of _M17N_FLT_H_ being defined.
255 * m17n-flt.h: Handle the case of _M17N_H_ being defined.
257 2007-11-22 Kenichi Handa <handa@ni.aist.go.jp>
259 * draw.c (compose_glyph_string): Check g->rface->layouter, not
260 g->rface->rfont->layouter.
262 * font-ft.c (ft_drive_otf): Fix setting of g->g.from and g->g.to.
264 * m17n-flt.c (FontLayoutContext): New member encoded_offset.
265 (run_rule): Use ctx->encoded_offset.
266 (run_command): Likewise.
267 (run_stages): Set ctx->encoded_offset.
269 2007-11-21 Kenichi Handa <handa@ni.aist.go.jp>
271 * m17n-flt.c (enum GlyphInfoMask): Adjusted for the change of
272 bit-size of MFLTGlyph->internal.
274 2007-11-20 Kenichi Handa <handa@ni.aist.go.jp>
276 * draw.c (visual_order): Exclude the last anchor glyph from the
279 * m17n-flt.h (MFLTGlyph): New member <adjusted>.
281 * m17n-flt.c (run_otf): Set adjusted flag of glyphs if necessary.
282 (run_stages): Likewise.
283 (load_flt): Unref top after checking plist.
285 * m17n-X.c (xft_render): Check adjusted flag of glyphs.
287 2007-11-12 Kenichi Handa <handa@ni.aist.go.jp>
289 * font-ft.c (ft_check_otf): Fix arg to OTF_check_features.
291 * m17n-flt.c (Mcombining): New variable.
292 (Mfont_facility): Renamed from Mfont_has. Referrer changed.
293 (enum FontLayoutCmdRuleSrcType): Delete SRC_EXIST, add
294 SRC_HAS_GLYPH and SRC_OTF_SPEC.
295 (FontLayoutCmdRule): Delete src.exist, add src.supported_glyph and
297 (load_command): Adjusted for the above changes.
298 (run_rule): Likewise.
299 (combining_code_from_class): Delete it.
300 (mflt_get): Check flt->name against Mcombining, not Mt.
302 * internal-flt.h (Mcombining): Extern it.
304 * draw.c (compose_glyph_string): Call run_flt with Mcombining for
305 combining characters.
307 2007-11-09 Kenichi Handa <handa@ni.aist.go.jp>
309 * face.c (mface__realize): Reset measured flag before calling
312 * m17n-flt.c (run_stages): Fix handing of off_x and off_y.
313 (setup_combining_coverage): New function.
314 (setup_combining_flt): New function.
315 (mflt_get): If flt is not found, return NULL. If name if Mt,
316 call setup_combining_flt.
317 (mflt_run): For debugging, print font family name.
319 * font-ft.c (ft_render): Fix handling of baseline_offset.
320 (ft_encapsulate): Set metrics in 26.6 fixed pixel.
321 (ft_render): Check pixel_mode to determine anti_alias.
323 * m17n-X.c (xfont_find_metric): Delete invalid "continue" line.
324 (xfont_find_metric): Set metrics in 26.6 fixed pixel.
325 (xfont_render): Set baseline_offset in pixel.
326 (xft_render): Fix handling of baseline_offset.
328 * draw.c (run_flt): Set font.font.family.
329 (compose_glyph_string): Fix handling of combining characters.
331 * fontset.c (try_font_list): Check if the named flt is surely
334 2007-11-07 Kenichi Handa <handa@ni.aist.go.jp>
336 * draw.c (analyse_bidi_level): New function.
337 (visual_order): Do reordering using the already decided
339 (compose_glyph_string): Decide bidi-level before calling flt.
341 * m17n-flt.c (mflt_run): Fix typo.
343 * font-ft.c (ft_drive_otf): Fix indexing gstring->glyphs.
345 2007-11-06 Kenichi Handa <handa@ni.aist.go.jp>
347 * draw.c (visual_order): Don't rely on the width of glyphs.
348 (run_flt): Fix culculation of g->g.to.
350 * m17n-flt.c (run_rule): Don't set error code here.
351 (run_cond): Likewise.
352 (run_otf): Fix culculation of xoff and yoff.
353 (run_command): Don't set error code here.
357 * m17n-X.c (xfont_open): Keep rfont's metrics in 26.6 fixed pixels.
358 (xfont_find_metric): Set glyph's yadv to 0.
359 (xft_find_metric): Likewise.
361 * font-ft.c (ft_open): Keep rfont's metrics in 26.6 fixed pixels.
362 (ft_find_metric): Adjust glyph's metrics.
363 (ft_encapsulate): Keep rfont's metrics in 26.6 fixed pixels.
364 (ft_drive_otf): Set mark glyph's xadv to 0.
366 * face.c (mface__for_chars): Adjusts the unit of face's ascent and
369 2007-10-29 Kenichi Handa <handa@m17n.org>
371 * m17n-flt.h (struct _MFLTOtfSpec): Adjusted for the new FLT handling.
372 (mflt_get): Adjusted for the argument change.
373 (mflt_name): Adjusted for the return value change.
375 * m17n-flt.c (Mgenerator, Mend): New variables.
376 (flt_min_coverage, flt_max_coverage): New variables.
379 (Mfont_has): Renamed from Mexist. Referrers chagned.
380 (gen_otf_tag): Handle the trailing whitespaces.
381 (otf_count_features, otf_store_features): Fix for negative features.
382 (parse_otf_command): Adjusted for the change of MFLTOtfSpec.
383 (load_otf_command): Likewise.
384 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
385 (load_flt): Argument changed. Caller changed.
386 (free_flt_list): New function.
387 (run_rule): Adjusted for the change of FontLayoutContext.
388 (mflt_run): Adjusted for the change of FontLayoutContext.
390 * m17n-gui.c (m17n_init_win): Call m17n_init_flt.
391 (m17n_fini_win): Call m17n_fini_flt.
393 * m17n-gui.h: Include m17n-flt.h.
395 * m17n-gd.c: Adusted for the change of MGlyph.
397 * m17n-X.c: Adusted for the change of MGlyph.
398 (xft_check_otf, xft_drive_otf): New functions.
400 * internal-gui.h (MGlyph): Modified for new FLT handling.
402 * fontset.c (try_font_list): Adusted for the change of MGlyph.
404 * font-ft.c: Adjusted for the change of MGlyph.
405 (ft_check_cap_otf): Renamed from ft_check_otf. Callers changed.
406 (get_glyph_metric): Deleted.
407 (ft_check_otf): New function.
408 (ft_drive_otf): New fucntion.
410 * font.c: Adjusted for the change of MGlyph.
411 (mfont__init): Don't call mfont__flt_init.
412 (mfont__fini): Don't call mfont__flt_fini.
413 (mfont__get_glyph_id, mfont__get_metrics): New functions.
415 * font.h (struct MRealizedFont): New members x_ppem and y_ppem.
416 (MFLTFontForRealized): New struct.
417 (struct MFontDriver): New members check_otf and drive_otf.
418 (mfont__get_glyph_id, mfont__get_metrics): Extern them.
420 * face.c: Adjusted for the change of MGlyph.
422 * draw.c: Adjusted for the change of MGlyph.
424 * m17n.c (m17n_init): Don't call mchar_init.
426 * m17n-core.c (m17n_init_core): Call mchar_init.
428 * m17n-core.h (mchartable_min_char, mchartable_max_char): Extern them.
430 * input.c: Include "m17n.h" instead of "m17n-gui.h".
432 * chartab.c (mchartable): Initialize table->min_char to -1.
433 (mchartable_min_char): New function.
434 (mchartable_max_char): New function.
436 * Makefile.am (GUI_SOURCES): Delete font-flt.c.
437 (libm17n_gui_la_LIBADD): Add ${top_builddir}/src/libm17n-flt.la.
439 2007-10-12 Kenichi Handa <handa@m17n.org>
441 * m17n-core.h (Mcharset): Extern it.
442 Move detabase related declarations from m17n.h.
444 * m17n-flt.h: Include m17n-core.h instead of m17n.h.
445 (struct _MFLTOtfFeatures): New struct.
446 (struct _MFLTOtfSpec): Delete gsub, gpos, etc, add gsub_gpos.
447 (struct _MFLTFont): Delete otf, add check_otf.
448 (MCHAR_INVALID_CODE): Define it.
450 * plist.c (read_mtext_element): Simplify the code.
452 * m17n.h: Move database related declarations to m17n-core.h
453 (Mharset): Don't extern it.
455 * m17n.c (m17n_init): Don't call mdatabase__init.
457 * m17n-gd.c (read_rgb_txt): Check also /etc/X11/rgb.txt. Downcase
460 * m17n-flt.c: Include m17n-core.h instead of m17n.h.
461 (Mexist): New variable.
462 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
463 (FontLayoutCmdRule): New member src.exist.
464 (parse_otf_command): Handle gsub_count and gpos_count separately.
465 (load_otf_command): Adjusted for the change of MFLTOtfSpec.
466 (load_command): Handle the command "exist".
467 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
468 (run_rule): Handle the case SRC_EXIST.
469 (run_otf): Adjusted for the change of MFLTOtfSpec.
470 (run_command): Check the range of FROM.
471 (check_otf_spec): Delete it.
472 (m17n_init_flt): Call m17n_init_core instead of m17n_init.
474 (m17n_fini_flt): Call m17n_fini_core instead of m17n_fiini.
475 (mflt_find): Call font->check_otf instead of check_otf_spec.
476 (mflt_run): Keep the metrics in 26.6 fixed point.
478 * m17n-core.c (mdatabase__finder, mdatabase__loader): Delete them.
479 (m17n_init_core): Call mdatabase__init.
481 * m17n-X.c (device_open): Use mplist_add, not mplist_push.
483 * internal.h (mdatabase__finder, mdatabase__loader): Delete externs
486 * font-flt.c (Mexist): New variable.
487 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
488 (FontLayoutCmdRule): New member src.exist.
489 (load_category_table): Use isalnum, not isalpha.
490 (load_command): Check the command "exist".
491 (run_rule): Hande the case SRC_EXIST.
492 (run_command): Check the range of FROM.
493 (mfont__flt_init): Initialize Mexist.
495 * draw.c (layout_glyphs): Fix calculation of off_x and off_y.
497 * database.h (mdatabase__load_charset_func): Extern it.
499 * database.c: Include m17n-core.h instead of m17n.h.
500 (load_chartable): Use mtext__from_data.
501 (load_charset): Moved to charset.c
502 (load_database): Call mdatabase__load_charset_func instead of
504 (mdatabase__load_charset_func): New variable.
505 (mdatabase__init): Initialize mdatabase__load_charset_func and
506 Mcharset. Don't set mdatabase__finder and mdatabase__loader.
507 (mdatabase__save): Use fwrite, not mconv_encode_stream.
508 (Mcharset): Declare it here.
510 * charset.c: Include "database.h.".
511 (load_charset): Moved from database.c.
512 (mcharset__init): Initialize mdatabase__load_charset_func, don't
515 * character.c (mchar_define_property): Call mdatabase_find directly.
516 (mchar_get_prop): Call mdatabase_add directly.
517 (mchar_put_prop): Call mdatabase_load directly.
518 (mchar_get_prop_table): Likewise.
520 * Makefile.am (libm17n_core_la_SOURCES): Add database.[ch].
521 (libm17n_la_SOURCES): Remove database.[ch].
522 (libm17n_flt_la_LIBADD): Delete libm17n.la, add libm17n-core.la.
524 2007-09-18 Kenichi Handa <handa@m17n.org>
526 * face.c (mface__realize): Try Freetype based font at first.
528 * font.c: Include <ctype.h>
530 2007-09-16 Kenichi Handa <handa@m17n.org>
532 * m17n-flt.c (load_flt): New arg full. If full is zero, load only
534 (run_otf): Call font->get_metrics, not font->get_metric.
535 (run_stages): Likewise.
536 (CHECK_FLT_COVERAGE): New macro.
537 (CHECK_FLT_STAGES): Call load_flt with the second arg 1.
538 (check_otf_spec): New function.
539 (m17n_fini_flt): Unref flt->coverage.
540 (mflt_find): Argument changed.
541 (mflt_name): New function.
542 (mflt_coverage): Use CHECK_FLT_COVERAGE.
544 * m17n-flt.h (MFLTFont): Member get_metrics renamed from get_metric.
545 (mflt_find): Prototype adjusted.
546 (mflt_name): Extern it.
548 2007-09-14 Kenichi Handa <handa@m17n.org>
550 * m17n-flt.h (struct _MFLTGlyph): Change signedness of members.
552 * font-flt.c (run_otf): Make debug info printing comaptible with
554 (run_command): Likewise.
555 (mfont__flt_run): Likewise.
557 * m17n-flt.c (UPDATE_CLUSTER_RANGE): ctx->cluster_begin_idx is
558 invalid only when it's negative.
560 (run_command): Likewise.
561 (mflt_run): Initialize ctx.cluster_begin_idx to -1.
563 2007-09-10 Kenichi Handa <handa@m17n.org>
565 * m17n-flt.h (struct _MFLTGlyph): New member encoded and measured.
566 (struct _MFLTFont): Prototype of get_glyph_id changed.
568 * m17n-flt.c (enum GlyphInfoMask): Delete EncodedMask and
570 (GAPPEND): Delete this macro.
571 (GET_ENCODED, SET_ENCODED, GET_MEASURED, SET_MEASURED): Adjusted
572 for the change of MFLTGlyph. Caller changed.
573 (run_otf): Simply calls font->get_glyph_id.
574 (run_command): Reset g->encoded and g->measured for direct code.
575 (positioning): Delete this function.
576 (run_stages): Simply calls font->get_glyph_id and font->get_metric.
578 2007-09-07 Kenichi Handa <handa@m17n.org>
580 * draw.c (compose_glyph_string): Improve script detection.
582 2007-09-06 Kenichi Handa <handa@m17n.org>
584 * m17n-flt.h (mflt_get): Extern it.
586 * m17n-flt.c (run_stages): Call positioning only if
587 font->get_metric is non-NULL.
588 (CHECK_FLT_STAGES): Fix typo.
589 (mflt_get): New function.
591 * font-flt.c (mfont__flt_run): Improve debug info printing.
593 2007-09-04 Kenichi Handa <handa@m17n.org>
595 * m17n-flt.c (MFontLayoutTable): Delete this type.
596 (struct _MFLT): New member mdb and coverage.
597 (list_flt): Set flt->mdb.
598 (load_generator): Argument and return value changed. Caller
600 (get_font_layout_table): Delete this function.
601 (run_stages): Argument changed. Caller changed.
602 (CHECK_FLT_STAGES): New macro.
603 (mfont__flt_encode_char): Argument changed.
604 (mflt_find): Likewise.
605 (mflt_coverage): New function.
606 (mflt_run): Argument changed.
607 (mdebug_dump_flt): Likewise.
609 * m17n-flt.h (mflt_coverage): Extern it.
610 (mflt_find): Prototype adjusted.
612 2007-09-03 Kenichi Handa <handa@m17n.org>
614 * internal.h (MTABLE_CALLOC_SAFE, MSTRUCT_CALLOC_SAFE): New macros.
616 * database.c (mdatabase__props): New function.
618 * database.h (mdatabase__props): Extern it.
620 * m17n-flt.h (struct _MFLTGlyphString): Delete user_data, add
622 (struct _MFLTFont): Add suitable_p.
623 (mflt_find): Extern it.
625 * m17n-flt.c: Include "database.h".
626 (struct _MFLT): New struct.
627 (list_flt): New function.
628 (load_flt): Don't update flt_list.
629 (get_font_layout_table): Use flt_list.
630 (m17n_init_flt): Don't initialize flt_list.
631 (m17n_fini_flt): Adjusted for the change of flt_list.
632 (mflt_find): New function.
633 (mflt_run): Fix debug printing.
635 2007-08-23 Kenichi Handa <handa@m17n.org>
637 * m17n-flt.c (run_otf): Remove #ifdef HAVE_OTF and #endi.
638 (run_stages): Print separator in encoded string as "|".
640 2007-08-23 Kenichi Handa <handa@m17n.org>
642 * font-flt.c (mfont__flt_run): Don't calculate a glyph metric if
643 the glyph is already handled by OTF.
645 2007-08-21 Kenichi Handa <handa@m17n.org>
647 * font-ft.c (ft_check_capability): Check cap->script_tag at first.
649 2007-08-20 Kenichi Handa <handa@m17n.org>
651 * font-flt.c (mfont__flt_run): Get glyph metrics before printing
654 2007-08-17 Kenichi Handa <handa@m17n.org>
656 * m17n-flt.h (struct _MFLTGlyphString): Member pointer renamed to
658 (MFLTOtfSpec): Renamed from MFLT_OTF_Spec.
659 (MFLTFont): Prototype of the member drive_otf adjusted.
661 * m17n-flt.c (run_stages): Fix handling of padding.
663 * font-ft.c (get_glyph_metric): New function.
664 (DEVICE_DELTA): Return 26.6 fixed point value.
665 (adjust_anchor): Likewise.
666 (mfont__ft_drive_otf): Use get_glyph_metric.
668 * font-flt.c (mfont__flt_run): Pay attention to padding on
671 2007-08-16 Kenichi Handa <handa@m17n.org>
673 * m17n-flt.c (run_stages): Fix typo.
675 * font-ft.c (adjust_anchor): Argument changed. Calculte based on
677 (mfont__ft_drive_otf): Don't call OTF_check_features for GPOS.
678 Adjusted for the argument change of adjust_anchor. Calculte based
681 2007-08-15 Kenichi Handa <handa@m17n.org>
683 * charset.c (mcharset__load_from_database): Set mdebug_flag
684 instead of mdebug_mask.
686 * coding.c (mcoding__load_from_database): Set mdebug_flag instead
689 * database.c (load_database): Set mdebug_flag instead of
691 (mdatabase__load_for_keys): Likewise.
693 * draw.c: Include "internal-flt.h".
694 (dump_combining_code): Don't subtract 128 from combining code
697 * font-flt.c: Include "internal-flt.h". Set mdebug_flag instead
699 (run_rule): Print debug info only when MDEBUG_FLAG is greater than
701 (run_cond): Likewise.
703 (run_command): Likewise.
704 (mfont__flt_run): Change format of debug info.
706 * font-ft.c: Include "internal-flt.h".
707 Set mdebug_flag instead of mdebug_mask.
708 (mfont__ft_drive_otf): Fix arg to OTF_check_features.
710 * input.c: Set mdebug_flag instead of mdebug_mask.
711 (shift_state): New MDEBUG_FLAG macro.
712 (preedit_commit): Likewise.
715 * internal-flt.h: New file.
717 * internal-gui.h (MAKE_COMBINING_CODE, COMBINING_CODE_OFF_Y)
718 (COMBINING_CODE_OFF_X, COMBINING_CODE_BASE_X)
719 (COMBINING_CODE_BASE_Y, COMBINING_CODE_ADD_X)
720 (COMBINING_CODE_ADD_Y, MAKE_COMBINING_CODE_BY_CLASS)
721 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
722 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P): Move
723 these macros to internal-flt.h.
725 * internal.h (M17N_OBJECT_ADD_ARRAY): Adjusted for the change of
727 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Likewise.
728 (enum MDebugMaskBit): Delete this enum.
729 (enum MDebugFlag): New enum.
730 (mdebug__flag): Don't extern it.
731 (mdebug__flags): Extern it.
732 (MDEBUG_FLAG): New macro.
733 (MDEBUG_PRINT0): Use the macro MDEBUG_FLAG.
734 (MDEBUG_DUMP, MDEBUG_PUSH_TIME, MDEBUG_POP_TIME)
735 (MDEBUG_PRINT_TIME): Likewise.
737 * m17n-X.c (xfont_open): Set mdebug_flag instead of mdebug_mask.
738 (xfont_list): Likewise.
740 * m17n-core.c (mdebug__flag): Delete this variable.
741 (mdebug__flags): New variable.
742 (SET_DEBUG_FLAG): Make it a function.
743 (m17n_init_core): Set mdebug_flag instead of mdebug_mask.
744 (m17n_fini_core): Likewise.
746 * m17n-gui.c (m17n_init_win): Set mdebug_flag instead of mdebug_mask.
747 (m17n_fini_win): Likewise.
749 * m17n-misc.h (enum MErrorCode): Add MERROR_FLT.
751 * m17n.c (m17n_init): Set mdebug_flag instead of mdebug_mask.
752 (m17n_fini): Likewise.
754 * symbol.c (msymbol__free_table): Adjusted for the change of
757 * Makefile.am (BASICBUILDS): Add libm17n-flt.la.
758 (BASICHEADERS): Add m17n-flt.h.
759 (FLT_SOURCES): New variable.
760 (libm17n_flt_la_SOURCES, libm17n_flt_la_LIBADD)
761 (libm17n_flt_la_LDFLAGS): Likewise.
763 * m17n-flt.h: New file.
765 * m17n-flt.c: New file created by modifying font-flt.c.
767 2007-07-13 Kenichi Handa <handa@m17n.org>
769 * Version 1.4.0 released.
771 2007-07-12 Kenichi Handa <handa@m17n.org>
773 * input.c: Fix doxygen @ref commands.
775 2007-07-10 Kenichi Handa <handa@m17n.org>
777 * m17n-core.h (M17NFunc): Fix typo of Doxygen directive.
779 2007-07-09 Kenichi Handa <handa@m17n.org>
781 * m17n-core.h (M17N_BEGIN_HEADER, M17N_END_HEADER): New macros.
783 * m17n.h: Include m17n-core.h if not yet done. Use macros
784 M17N_BEGIN_HEADER and M17N_END_HEADER.
786 * m17n-gui.h: Likewise.
788 * m17n-misc.h: Likewise.
790 2007-06-13 Kenichi Handa <handa@m17n.org>
792 * font-flt.c (load_command): Prepend "^" in the regular expression.
794 2007-06-11 Kenichi Handa <handa@m17n.org>
796 * language.c (mlanguage_name_list): Fix previous change.
798 * coding.c (mcoding__load_from_database): Add aliases in
799 coding_definition_list.
801 2007-06-10 Kenichi Handa <handa@m17n.org>
803 * language.c (mlanguage_name_list): Fix previous change.
805 2007-06-08 Kenichi Handa <handa@m17n.org>
807 * input.c (update_candidate): Copy candidate_list earlier.
808 (re_init_ic): Provide pseudo initialize state if none.
810 2007-06-05 Kenichi Handa <handa@m17n.org>
812 * input.c (preedit_insert): Print debug information.
814 * database.c (expand_wildcard_database): New function.
815 (mdatabase_list): Fix handling of wildcard database.
817 * language.c (load_lang_name): New function.
818 (mlang__fini): Cancel the last two changes.
819 (mlanguage_name_list): New arg script and territories. Use
822 * m17n.h (mlangauge_name_list): Adjusted.
824 2007-06-04 Kenichi Handa <handa@m17n.org>
826 * input.c (open_im): Check if the input method has at least one
829 2007-06-01 Kenichi Handa <handa@m17n.org>
831 * input.c (shift_state): Change the format of debug print.
832 (preedit_commit): New arg need_prefix. Caller changed.
833 (update_candidate): Copy candidate_list.
834 (take_action_list): Likewise.
835 (handle_key): Change the format of debug print.
837 * font-flt.c (load_flt): Ignore unknown directives.
839 2007-05-25 Kenichi Handa <handa@m17n.org>
841 * m17n-core.c (mdebug__unregister_object): Small optimization.
843 * database.c (find_file): Merged into get_database_file.
844 (get_database_file): New arg result. Caller changed.
845 (mdatabase__check): Fix the logic.
847 2007-05-24 Kenichi Handa <handa@m17n.org>
849 * database.c (find_database): If unprocessed wildcard database is
850 found, register database filed and recursively call find_database.
851 (free_db_info): Unref db_info->properties.
852 (register_database): New arg properties. Delete code for
853 initializing mdatabase__list.
854 (register_databases_in_files): Argument changed. Caller changed.
855 (mdatabase__update): Don't list files by glob here.
856 (mdatabase_list): If unprocessed wildcard database is found,
857 register database filed and recursively call mdatabase_list.
859 * database.h (enum MDatabaseStatus): New enum
860 MDB_STATUS_AUTO_WILDCARD.
862 * input.c (load_branch): Fix previous change.
863 (update_global_info): If the global database is not found, return -1.
865 2007-05-23 Kenichi Handa <handa@m17n.org>
867 * database.c (Mversion): New variable.
868 (mdatabase__init): Initialize it.
869 (register_database): New arg properties. Caller changed.
870 (register_databases_in_files): Don't check version here.
871 (mdatabase__update): Likewise.
873 * database.h (MDatabaseInfo): New member properties.
875 2007-05-21 Kenichi Handa <handa@m17n.org>
877 * language.c: Include <ctype.h>
878 (mlanguage__info): Use strncasecmp (not memcmp).
879 (mlanguage_name): Downcase language name for backward
882 * input.c (filter): Don't check Mlanguage property of
885 2007-05-18 Kenichi Handa <handa@m17n.org>
887 * language.c (mlanguage_name): Fix it to handle M-text English
890 * input.c (config_command): Set NAME before using it.
891 (load_branch): Try to resolve a map name by variables.
893 2007-05-17 Kenichi Handa <handa@m17n.org>
895 * language.c (mlang__fini): Fix previous change.
897 2007-05-16 Kenichi Handa <handa@m17n.org>
899 * plist.c (free_plist): Cancel the last change.
900 (write_element): Check if PLIST is nested.
901 (mplist__from_plist): Label a plist as nested if appropriate.
902 (mplist__from_alist): Label a plist as nested.
903 (mplist__conc): Check the value of PL before referring it. Label
904 a plist as nested if appropriate.
905 (mplist_copy): Label a plist as nested if appropriate.
906 (mplist_put_func): Return Mnil if KEY is a managing key.
907 (mplist_push): Label a plist as nested if appropriate.
909 * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
912 * language.c (mlang__fini): Unref each element of langname_list.
914 2007-05-14 Kenichi Handa <handa@m17n.org>
916 * language.c: Include <string.h> and <locale.h>.
917 (langname_list): New variable.
918 (load_lang_script_list): Exclude invalid list elements.
919 (mlang__init): Initialize langname_list.
920 (mlang__fini): Unref langname_list.
921 (mlanguage__info): Adjusted for the change of English
922 name (symbol->M-text).
923 (mlanguage_name): Label it as obsolete.
924 (mlanguage_name_list): New function.
926 * m17n.h (mlanguage_name_list): Extern it.
928 * locale.c (make_locale): Fix setting of members of locale.
930 * plist.c (free_plist): Unref also nested plist.
932 2007-05-11 Kenichi Handa <handa@m17n.org>
934 * coding.c (mconv_reset_converter): Set internal->used to 0.
936 2007-05-08 Kenichi Handa <handa@m17n.org>
938 * input.c (check_description): Force copying the translated text.
940 2007-05-02 Kenichi Handa <handa@m17n.org>
942 * input.c (minput_save_config): Unref unnecessary plist. Use
943 free_im_list to free im_config_list.
945 2007-04-20 Kenichi Handa <handa@m17n.org>
947 * input.c (config_command): Fix previous change again.
948 (config_variable): Likewise.
949 (minput_config_command): Fix for the case of setting back to
951 (minput_config_variable): Likewise.
952 (minput_save_config): Include nil as documentation of customized
955 2007-04-05 Kenichi Handa <handa@m17n.org>
957 * input.c (config_command): Fix previous change.
958 (config_variable): Likewise.
960 * plist.c (mplist_get_func): Fix for backward compatiblity.
962 2007-04-04 Kenichi Handa <handa@m17n.org>
964 * input.c (minput_get_command, minput_config_command): Fix example
967 2007-03-29 Kenichi Handa <handa@m17n.org>
969 These changes are to avoid unsafe casting of a function pointer.
971 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
972 (struct MFace): New member hook.
974 * face.c (serialize_face): Adjusted for the change of MFace.
975 (deserialize_face): Likewise.
976 (mface__init): Likewise. Use msymbol_put_func.
977 (mface__realize): Adjusted for the change of MFace. Avoid
979 (mface_get_prop): Adjusted for the change of MFace.
980 (mface_put_prop): Likewise.
981 (mface_get_hook): New function.
982 (mface_put_hook): New function.
983 (mface_update): Adjusted for the change of MFace.
985 * input-gui.c (win_callback): Use mplsit_get_func.
986 (minput__win_init): Use mplsit_put_func.
988 * input.c (take_action_list): Use mplist_get_func.
989 (init_ic_info): Likewise.
990 (fini_ic_info): Likewise.
991 (minput_callback): Likewise.
992 (minput__init): Use mplist_put_func.
994 * language.c (mlang__init): Use msymbol_put_func.
996 * m17n-core.h (M17NFunc): New function type.
997 (M17N_FUNC): New macro.
998 (msymbol_put_func, msymbol_get_func): Extern them.
999 (mplist_put_func, mplist_get_func): Extern them.
1001 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
1003 * m17n-gui.c (mframe): Add a proper casting.
1005 * plist.h (struct MPlist): Make the member val a union.
1006 (MPLIST_VAL): Adjusted for the above change.
1007 (MPLIST_FUNC): New macro.
1008 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
1010 * plist.c (mplist_put_func, mplist_get_func): New functions.
1012 * symbol.c (msymbol__fini): Use MPLIST_VAL.
1013 (msymbol_put_func, msymbol_get_func): New functions.
1015 * textprop.c (mtext_serialize): Use msymbol_get_func.
1016 (mtext_deserialize): Likewise.
1018 2007-03-28 Kenichi Handa <handa@m17n.org>
1020 * input.c (get_candidate_list): Avoid unnecessary unref.
1022 2007-03-23 Kenichi Handa <handa@m17n.org>
1024 * database.c (mdatabase__update): Unref plist at the tail.
1026 2007-03-21 Kenichi Handa <handa@m17n.org>
1028 * input.c (update_custom_info): Fix for the case "name == Mnil &&
1030 (config_command): Fix for the case that configuration is
1032 (config_variable): Likewise.
1033 (minput_config_command): If keyseqlist is an empty list, cancel
1035 (minput_config_variable) If value is an empty list, cancel the
1037 (minput_save_config): Handle cancellation of config and customize
1040 2007-03-15 Kenichi Handa <handa@m17n.org>
1042 * input.c (minput_config_variable): Check custom->vars (not
1045 2007-03-01 Kenichi Handa <handa@m17n.org>
1047 * input.c (reload_im_info): Setup cmds, vars, and title of
1049 (check_variable_value): Fix the return value.
1051 * database.c (mdatabase__check): If necessary, update database and
1054 2007-02-28 Kenichi Handa <handa@m17n.org>
1056 * database.c (get_dir_info): Set dir_info->status to
1057 MDB_STATUS_OUTDATED.
1058 (check_version): New function.
1059 (register_database): Don't call find_database.
1060 (register_databases_in_files): Don't register a database of
1062 (mdatabase__update): Likewise. Avoid unnecessary scanning.
1064 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
1065 and MDB_STATUS_OUTDATED.
1067 * font.h (struct MFont): Types of members type, source, and
1068 spacing changed to unsigned.
1070 * internal-gui.h (struct): Types of members category and type
1071 changed to unsigned.
1073 * internal.h (struct MText): Types of members format and coverage
1074 changed to unsigned.
1076 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
1077 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
1079 2007-02-23 Kenichi Handa <handa@m17n.org>
1081 * input.c (Mpop): New variable.
1082 (fully_initialize): Initialize Mpop.
1083 (parse_action_list): Handle Mpop.
1084 (take_action_list): Likewise.
1085 (handle_key): When a key is unhandled, shift to the initial state
1086 only if the current state has no branch action.
1088 2007-02-12 Kenichi Handa <handa@m17n.org>
1090 * input.c (get_preceding_char): Unref mt if necessary.
1091 (get_following_char): Likewise.
1092 (parse_action_list): Fix handling of `insert' action as
1094 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
1095 (take_action_list): Check invalid candidate list.
1097 2007-02-06 Kenichi Handa <handa@m17n.org>
1099 * input.c (integer_value): Check also ic->produced for @-N.
1101 2007-01-26 Kenichi Handa <handa@m17n.org>
1103 * database.c (mdatabase__update): Check mdatabase__dir_list from
1106 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
1108 2007-01-12 Kenichi Handa <handa@m17n.org>
1110 * input.c (handle_key): Handle a branch action of the initial
1113 2007-01-10 Kenichi Handa <handa@m17n.org>
1115 * m17n-gd.c (gd_render): Delete superfluous line.
1117 2006-12-26 Kenichi Handa <handa@m17n.org>
1119 * m17n.h (minput_callback): Extern it.
1121 * input.h (minput__callback): Delte extern.
1123 * input.c (get_surrounding_text): Adjusted for the change of
1124 minput__callback to minput_callback.
1125 (delete_surrounding_text): Likewise.
1126 (minput_create_ic): Likewise.
1127 (minput_destroy_ic): Likewise.
1128 (minput_filter): Likewise.
1129 (minput_set_spot): Likewise.
1130 (minput_toggle): Likewise.
1131 (minput_reset_ic): Likewise.
1133 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
1134 and ic->candidate_to to 0.
1135 (minput_callback): Renamed from minput__callback.
1137 * input-gui.c (win_callback): Adjusted for the change of
1138 minput__callback to minput_callback.
1140 2006-12-15 Kenichi Handa <handa@m17n.org>
1142 * font-ft.c (ft_add_font): Fix typo.
1144 2006-12-06 Kenichi Handa <handa@m17n.org>
1146 * Version 1.3.4 released.
1148 2006-11-16 Kenichi Handa <handa@m17n.org>
1150 * input.c (parse_action_list): Allow (undo 0).
1151 (adjust_markers): New function.
1152 (preedit_insert, preedit_delete): Call adjust_markers.
1153 (preedit_replace): New function.
1154 (update_candidate): Call preedit_replace instead of preedit_insert
1156 (filter): When ic_info->commit_key_head is nonzero, shift input
1157 event keys even if there's no committed text.
1159 2006-11-10 Kenichi Handa <handa@m17n.org>
1161 * input.h (MInputContextInfo): New member commit_key_head.
1163 * input.c (preedit_commit): Update ic_info->commit_key_head.
1164 (take_action_list): Reset ic_info->commit_key_head on Mundo.
1165 (filter): When committed, shift keys by ic_info->commit_key_head.
1167 2006-10-30 Kenichi Handa <handa@m17n.org>
1169 * input.c (preedit_delete): Fix typo.
1170 (take_action_list): Print more debugging information. Allow
1171 variable in arg of 'select' and `pushback'.
1173 * database.c (gen_database_name): Don't put extra space.
1174 (load_database): Print debugging information.
1175 (register_databases_in_files): New arg headlen. Callers changed.
1176 (mdatabase__load_for_keys): Shorten debugging information.
1177 (mdatabase_load): Don't print debugging information here.
1179 2006-10-27 Kenichi Handa <handa@m17n.org>
1181 * input.c (marker_code): New arg surrounding. Callers changed.
1182 (surrounding_pos): Check if name[0] == '@'.
1183 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
1184 (take_action_list): Likewise.
1185 (get_preceding_char): If POS is zero, always call
1186 get_surrounding_text.
1188 2006-10-19 Kenichi Handa <handa@m17n.org>
1190 * input.c (load_variables): Fix setting of `global'.
1192 2006-10-16 Kenichi Handa <handa@m17n.org>
1194 * draw.c (draw_background): Be sure to set *to_x.
1195 (render_glyph_string): If from == to, just return.
1197 2006-10-18 Kenichi Handa <handa@m17n.org>
1199 * database.c (get_dir_info): Return NULL if the directory name is
1201 (register_databases_in_files): Call register_database with
1203 (mdatabase__update): Fix logic. Call register_database with
1205 (mdatabase_define): Call register_database with
1206 MDB_STATUS_EXPLICIT.
1208 * input.c (delete_surrounding_text): Be sure to set members
1209 preceding_text and following_text to NULL.
1210 (shift_state): Save variable values in ic_info->vars_saved.
1211 (preedit_commit): Don't print debug information here. Don't
1212 change ic_info->keys here.
1213 (get_candidate_list): Don't ref plist.
1214 (take_action_list): Don't unref return value of
1215 get_candidate_list. For undo, reset ic->produced and recover
1216 ic_info->vars. Be sure to set ic->candidate_list to NULL after
1218 (init_ic_info): Set ic_info->vars_saved.
1219 (fini_ic_info): Unref ic_info->vars_saved.
1220 (re_init_ic): Be sure to set ic->candidate_list to NULL after
1222 (filter): Be sure to set members preceding_text and following_text
1223 to NULL. Print debug information about produced text. Delete
1224 processed keys from ic_info->keys.
1226 * input.h (MInputContextInfo): New member vars_saved.
1228 2006-10-16 Kenichi Handa <handa@m17n.org>
1230 * database.c (mdatabase__update): Fix the way to get db_info.
1232 2006-10-02 Kenichi Handa <handa@m17n.org>
1234 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
1235 `size' changed to 24.
1237 * font.c (xlfd_unparse_name): Adjusted for the change of
1239 (font_score): Likewise.
1240 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
1242 * m17n-X.c (MFontX, _MFontX): Deleted.
1243 (SET_SIZE, HAVE_SIZE): Deleted.
1244 (free_display_info): Adjusted for the change of
1245 disp_info->font_list format.
1246 (xfont_registry_list): Likewise.
1247 (xfont_open): Likewise.
1248 (xfont_list): Likewise.
1249 (xfont_encode_char): Ignore size to find a realized font.
1250 (MRealizedFontXft): Change the order of members to make it
1251 compatible with MRealizedFontFT.
1253 2006-09-27 Kenichi Handa <handa@m17n.org>
1255 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
1256 (mfont_close): Add comments.
1258 * mtext-lbrk.c (mtext_line_break): Add comment.
1260 2006-09-26 Kenichi Handa <handa@m17n.org>
1262 * input.c (minput_get_description): Handle description about
1263 inclusion-only input methods.
1265 2006-09-21 Kenichi Handa <handa@m17n.org>
1267 * input.c (M_gettext): New variable.
1268 (fully_initialize): Initialize M_gettext.
1269 (check_description): New function.
1270 (load_commands): Call check_description.
1271 (config_all_commands): Be sure to unref pl.
1272 (load_variables): Call check_description.
1273 (config_all_variables): Be sure to unref pl.
1274 (load_im_info): Call check_description.
1276 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
1278 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
1279 and bind_textdomain_codeset.
1281 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
1283 2006-09-15 Kenichi Handa <handa@m17n.org>
1285 * input.c (reload_im_info): Update custom and global info.
1286 (init_ic_info): Fix previous change.
1288 2006-09-14 Kenichi Handa <handa@m17n.org>
1290 * database.c: Include <libgen.h>.
1291 (mdatabase__lock): Make a directory if necessary.
1293 * input.c (resolve_command): Adjusted for the format change of
1294 configured_cmds member.
1295 (load_commands, load_variables): Fix for errornous data handling.
1296 (config_command, config_variable): New function.
1297 (config_all_commands, config_all_variables): Renamed from
1298 config_commands and config_variables. Utilize the above function.
1299 (check_variable_value): Argument changed. Callers changed.
1300 (load_im_info): Call config_all_commands and config_all_variables.
1301 (init_ic_info): Adjusted for the format change of configured_vars
1303 (minput__init): Initialize Mcustomized, Mconfigured, and
1305 (Mcustomized, Mconfigured, Minherited): New variables.
1306 (minput_get_command): Be sure to return NULL if an input method
1307 use no local command.
1308 (minput_get_variable): Be sure to return NULL if an input method
1309 use no local variable.
1310 (minput_config_command, minput_config_variable)
1311 (minput_save_config): Adjusted for the format change of
1312 configured_cmds and configured_vars members.
1314 * plist.c (write_element): Delete superfluous ':'.
1316 2006-09-13 Kenichi Handa <handa@m17n.org>
1318 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
1319 (minput_config_file): Extern it.
1321 * draw.c (Minherited): Declaration moved to input.c.
1322 (mdraw__init): Don't initialize Minherited here.
1324 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
1326 2006-09-07 Kenichi Handa <handa@m17n.org>
1328 * textprop.c (mtext_serialize): Call mplist__serialize with the
1331 * plist.h (mplist__serialize): Prototype adjusted.
1332 (mplist__assq): Extern it.
1334 * plist.c: Include <ctype.h>
1335 (PUTC, PUTS): New macros.
1336 (write_symbol): New function.
1337 (write_element): New arg indent.
1338 (dump_string, dump_plist_element): Delete them.
1339 (mplist__from_string): New arg pretty.
1340 (mplist__assq): New function.
1341 (mdebug_dump_plist): Use write_element.
1343 * mtext.c (mtext_cat_char): Allocate more memory.
1344 (mdebug_dump_mtext): Don't escal a newline character.
1346 * m17n.h (minput_get_command, minput_get_variable)
1347 (minput_config_command, minput_config_variable)
1348 (minput_save_config): Extern them.
1350 * m17n-core.c: Include <string.h>.
1351 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
1352 use the stream stdout instead of a file of that name.
1354 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
1357 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
1358 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1359 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
1360 (MDEBUG_DUMP): Flush the stream.
1362 * input.h (struct _MInputMethodInfo): Delete member im. New
1363 members mdb, language, name, extra, cmds, configured_cmds,
1364 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
1365 (MInputContextInfo): New member tick.
1367 * input.c: Big change to improve user-side input method
1368 customization. Here, list just public API changes.
1369 (minput_get_commands, minput_get_variables)
1370 (minput_assign_command_keys, minput_set_variable): Label them
1372 (minput_get_command, minput_get_variable)
1373 (minput_config_command, minput_config_variable)
1374 (minput_save_config): New functions.
1376 * database.h (PATH_MAX): Define it if not yet defined.
1377 (PATH_SEPARATOR): Likewise.
1378 (enum MDatabaseStatus): New enum.
1379 (struct MDatabaseInfo): Moved from database.c. New members status,
1380 time, lock_file, and uniq_file.
1381 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
1382 (mdatabase__unlock): Extern them.
1384 * database.c: Include <time.h>.
1385 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
1386 (GEN_PATH): Args changed. Callers changed.
1387 (struct MDatabaseInfo): Moved to database.h.
1388 (struct MDatabase, mdb_list): Deleted.
1389 (mdatabase__list): New var.
1390 (get_database_filename): Deleted. Callers changed to use
1392 (find_file, get_database_file): New files.
1393 (get_dir_info): Initialize new members of MDatabaseInfo.
1394 (find_database): Arg chagnded. Callers changed.
1395 (free_db_info, register_database, register_databases_in_files):
1397 (update_database_list): Deleted.
1398 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
1399 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
1400 (mdatabase__update): New function.
1401 (mdatabase__check): Return value changed.
1402 (mdatabase__file, mdatabase__lock, mdatabase__save)
1403 (mdatabase__unlock): New functions.
1405 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
1407 * input.c (get_surrounding_text): Return -2 when surrounding text
1409 (get_following_char): Likewise.
1410 (get_preceding_char): Likewise.
1411 (minput__callback): Return 0 if there is a callback function,
1414 2006-08-17 Kenichi Handa <handa@m17n.org>
1416 * input.c (reset_ic): Use shift_state to setup the current state.
1418 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
1420 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
1421 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
1422 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
1424 2006-08-02 Kenichi Handa <handa@m17n.org>
1426 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
1428 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
1430 * font-ft.c (ft_encapsulate): Add code for debugging.
1431 (mfont__ft_drive_otf): Be sure to encode character before getting
1434 2006-07-21 Kenichi Handa <handa@m17n.org>
1436 * draw.c (mdraw_text_extents): Fix previous typo.
1438 2006-07-19 Kenichi Handa <handa@m17n.org>
1440 * draw.c (gstring_width): New arg lbearing.
1441 (render_glyph_string): Adjusted for the change of gstring_width.
1442 (mdraw_text_extents): Fix lbearing of ink and line metrics.
1444 * m17n-core.h (Mlanguage): Extern it.
1446 * m17n.h (Mlanguage): Extern deleted.
1448 * mtext.c (mtext__init): Initialize Mlanguage.
1449 (Mlanguage): Declaration moved from locale.c
1451 * locale.c (mlocale__init): Don't initialize Mlanguage here.
1452 (Mlanguage): Declaration moved to mtext.c.
1454 * language.c (mlang__init): Don't initialize Mlanguage here.
1456 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
1458 2006-07-14 Kenichi Handa <handa@m17n.org>
1460 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
1461 (MRealizedFontFT): New member face_encapsulated.
1462 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
1463 (ft_gen_font): New function.
1464 (ft_add_font): Use ft_gen_font.
1465 (ft_list_script): Store lists in ft_script_list.
1466 (ft_check_otf): New arg ft_face. Caller changed.
1467 (ft_check_language): Likewise.
1468 (ft_check_script): Likewise.
1469 (ft_encapsulate, ft_close): New functions.
1470 (mfont__ft_driver): Initialize members encapsulate and close.
1471 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
1473 * font.h (struct MRealizedFont): New member encapsulating.
1474 (struct MFontDriver): New members encapsulate and close.
1476 * font.c (mfont__match_p): If FONT is realized, check capability
1477 by font drivers's check_capability method.
1478 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
1481 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
1482 declarations of foundry and fam local vars.
1483 (xft_driver): Make it static.
1485 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
1486 (mfont_close): Extern them.
1488 * m17n-gd.c (device_open): Don't specify foundry and family of the
1491 2006-07-11 Kenichi Handa <handa@m17n.org>
1493 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
1495 2006-07-13 Kenichi Handa <handa@m17n.org>
1497 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
1499 (ft_check_script): Delete unused var.
1500 (ft_list_capability): Likewise.
1502 * font.c (mfont__get_capability): Setup cap->otf.
1503 (Motf): Make it global.
1504 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
1506 * font.h (MFontCapability): New member otf.
1508 * language.c (mlang__fini): Delete unused vars.
1510 * m17n-gui.h (Motf): Extern it.
1512 * database.c (update_database_list): Delete unused vars.
1514 2006-07-07 Kenichi Handa <handa@m17n.org>
1516 * font-ft.c (DEVICE_DELTA): Fix typo.
1518 2006-07-06 Kenichi Handa <handa@m17n.org>
1520 * fontset.c (mfont__lookup_fontset): Don't ignore family and
1523 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1525 * database.c: Update comments.
1527 2006-07-05 Kenichi Handa <handa@m17n.org>
1529 * database.c (PATH_MAX): Define it if not yet defined.
1530 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
1532 (get_database_filename): Use GEN_PATH.
1533 (get_dir_info): Don't include the last '/' in directory name.
1534 (register_database): New function.
1535 (update_database_list): Use register_database. Search all
1536 directories in mdatabase__dir_list for wildcard databases.
1537 (mdatabase__init): Check "~/.m17n.d".
1539 2006-07-03 Kenichi Handa <handa@m17n.org>
1541 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
1542 push reverse property.
1544 * plist.c (dump_plist_element): Fix previous change.
1546 2006-06-28 Kenichi Handa <handa@m17n.org>
1548 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
1551 * draw.c (MbidiNSM): New variable.
1552 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
1553 attention to bidi type NSM.
1554 (mdraw__init): Initialize MbibiNSM.
1556 * language.c (mscript__char_list): Fix finding a char-list element.
1558 * plist.c (dump_string): Return number of printed characters.
1559 (dump_plist_element): Print elements more compactly.
1561 2006-06-23 Kenichi Handa <handa@m17n.org>
1563 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
1564 (include_HEADERS): Likewise.
1566 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
1568 * language.c: Update documentation.
1570 2006-06-23 Kenichi Handa <handa@m17n.org>
1572 * font-ft.c (struct MFontFT): Delete member lang.
1573 (free_ft_info): Don't unref member lang. Destroy members langset
1575 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
1576 changed. Set members langset and charset.
1577 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
1579 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
1581 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
1582 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
1583 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
1584 characters at first. If it fails, try listing by language names.
1585 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
1586 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
1587 change of MFontCapability.
1588 (ft_list_capability): Likewise. Try listing by languages, then by
1589 scripts. Check OTF at last.
1590 (ft_check_script): New function.
1591 (ft_select): Adjusted for the check of MFontCapability.
1592 (ft_list_family_names): New function.
1593 (ft_check_capability): If cap->script is not Mnil, call
1595 (mfont__ft_driver): Initialize with ft_list_family_names.
1597 * font.h (struct MFontDriver): New member list_fmaily_names.
1598 (struct): Change member "MSymbol *lang" to "MSymbol language".
1600 * font.c: Include "language.h".
1601 (Motf): New variable.
1602 (otf_script_list, load_otf_script_list): Delete it.
1603 (find_script_from_otf_tag): Delete it.
1604 (merge_capability): New function.
1605 (mfont__init): Init Motf.
1606 (mfont__fini): Don't unref otf_script_list.
1607 (free_font_capability): Check cap->script_tag to determine if
1608 OTF-related capability is set.
1609 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
1610 the change of type MFontCapability.
1611 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
1612 and Motf properties.
1613 (mfont_list): Call merge_capability for LANGUAGE arg.
1614 (mfont_list_family_names): New function.
1616 * input-gui.c: Typo in comments fixed.
1618 * input.c: Typo in comments fixed.
1620 * language.h (mlanguage__list): Delete it.
1621 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
1624 * language.c: Include "mtext.h".
1625 (M_script_lang_list): Delete it.
1626 (language_list, script_list): New variables.
1627 (load_lang_script_list, init_language_list, init_script_list): New
1629 (mlang__init): Don't load language database here.
1630 (mlang__fini): Unref language_list and script_list if not NULL.
1631 (mlanguage__list): Delete it.
1632 (mlanguage__info, mscript__info, mscript__char_list)
1633 (mscript__otf_tag, mscript__from_otf_tag): New functions.
1634 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
1635 (mscript_list, mscript_language_list): New functions.
1637 * m17n-gui.h (mfont_list_family_names): Extern it.
1639 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
1640 (mlanguage_text, mscript_list, mscript_language_list): Extern
1643 2006-06-21 Kenichi Handa <handa@m17n.org>
1645 * m17n-X.c (xfont_driver): Initialize with
1646 xfont_list_family_names.
1647 (xfont_list_family_names): New function.
1648 (xft_driver): Initialize with NULL for list_family_names member.
1649 (device_init): Set list_family_names member of xft_driver to that
1650 of mfont__ft_driver.
1652 2006-06-06 Kenichi Handa <handa@m17n.org>
1654 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
1656 2006-03-24 Kenichi Handa <handa@m17n.org>
1658 * font-ft.c (ft_open): Improve debug message.
1660 * fontset.c (mfontset__get_font): Fix for the case that no font in
1661 per_script list is available.
1663 2006-02-06 Kenichi Handa <handa@m17n.org>
1665 * Version 1.3.3 released.
1667 2006-02-22 Kenichi Handa <handa@m17n.org>
1669 * textprop.c: Fix some typos in documentation.
1671 * plist.c: Fix some typos in documentation.
1673 * m17n-core.h: Fix some typos in documentation.
1674 (M17NLIB_PATCH_LEVEL): Updated to 3.
1675 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
1677 * symbol.c: Fix some typos in documentation.
1679 * mtext.c: Fix some typos in documentation.
1681 * input.c: Fix several typos in documentation.
1683 2006-02-06 Kenichi Handa <handa@m17n.org>
1685 * Version 1.3.2 released.
1687 2006-02-03 Kenichi Handa <handa@m17n.org>
1689 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
1690 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
1692 * font.c (xlfd_parse_name): Fix handling of the name "nil".
1694 * draw.c (layout_glyphs): Fix handling left_padding of
1697 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
1699 2006-02-02 Kenichi Handa <handa@m17n.org>
1701 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
1702 if WITH_GUI is true.
1704 2006-01-25 Kenichi Handa <handa@m17n.org>
1706 * input.c (resolve_expression): If the value of PLIST is a plist,
1707 but the first element is not symbol, return 0.
1709 2006-01-17 Kenichi Handa <handa@m17n.org>
1711 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
1712 HAVE_GD is 2 or the greater.
1714 2006-01-16 Kenichi Handa <handa@m17n.org>
1716 * Version 1.3.1 released.
1718 2006-01-16 Kenichi Handa <handa@m17n.org>
1720 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
1721 simulating anti-aliasing.
1723 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
1724 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
1726 2006-01-12 Kenichi Handa <handa@m17n.org>
1728 * input.c (get_surrounding_text): Always pop ic->plist.
1729 (reset_ic): Don't reset ic->plist.
1731 2006-01-10 Kenichi Handa <handa@m17n.org>
1733 * input.c (preedit_commit): For debugging, print only commiting
1734 charactes. Don't set ic->candidate_show to 0.
1735 (handle_key): Don't run branch-actions just by shifting to the
1737 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
1738 Reset vars and plist.
1740 2006-01-07 Kenichi Handa <handa@m17n.org>
1742 * input.c (load_branch): Confirm that maps is not NULL.
1744 2006-01-05 Kenichi Handa <handa@m17n.org>
1746 * input-gui.c (win_filter): Try to convert arg to key only when
1749 * plist.c (read_integer_element): If '#' and '-' are followed by
1750 non-integer-constituent, read them as a part of a symbol.
1751 (read_symbol_element): New arg C.
1752 (read_element): Adjust args to read_symbol_element.
1754 * input.c (load_macros): On overwriting a macro, free the old
1756 (minput__init): Store Mmap in load_im_info_keys.
1757 (minput_get_title_icon): If the input method has no title, be sure
1759 (minput_get_description): If the input method has no description,
1760 be sure to return NULL.
1761 (minput_get_variables): Fix documentation.
1762 (handle_key): Pay attention to the case that key is Mnil.
1763 (filter): Likewise. Fix handling of such symbol as S-A.
1765 2005-12-22 Kenichi Handa <handa@m17n.org>
1767 * Version 1.3.0 released.
1769 2005-12-22 Kenichi Handa <handa@m17n.org>
1771 * font-ft.c (ft_list): If the specified font has no property,
1774 2005-12-20 Kenichi Handa <handa@m17n.org>
1776 * character.c (mchar_get_prop): Check char_prop_list.
1777 (mchar_put_prop, mchar_get_prop_table): Likewise.
1779 2005-12-18 Kenichi Handa <handa@m17n.org>
1781 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
1782 file name sans language.
1784 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
1786 * input.c: Fix typo in comments.
1788 2005-12-14 Kenichi Handa <handa@m17n.org>
1790 * input.c (minput_get_title_icon): Check the default icon for the
1793 2005-12-13 Kenichi Handa <handa@m17n.org>
1795 * input.c (Mless_equal, Mgreater_equal): New variables.
1796 (parse_expression, resolve_expression, parse_action_list)
1797 (take_action_list): Handle the aboves.
1798 (filter): Treat key S-X as X.
1799 (minput__init): Initialize Mless_equal and Mgreater_equal.
1800 (minput_get_title_icon): New function.
1802 * m17n.h (minput_get_title_icon): Extern it.
1804 * database.c (get_database_filename): Return a filename instead of
1806 (load_database): Adjusted for the above change.
1807 (mdatabase__load_for_keys): Likewise.
1808 (mdatabase__find_file): New function.
1810 * database.h (mdatabase__find_file): Extern it.
1812 * font.h (mfont__resize): Delete extern.
1814 * font.c (mfont__list): Check resize ratio.
1815 (mfont__resize): Delete it.
1816 (mfont_resize_ratio): Include the code of mfont__resize.
1818 * font-ft.c (ft_open): Check resize ratio.
1820 * m17n-X.c (xfont_open): Check resize ratio.
1821 (xft_open): Likewise.
1823 2005-12-07 Kenichi Handa <handa@m17n.org>
1825 * input.c (take_action_list): If take_action_list return -1,
1827 (handle_key): Likewise.
1829 * face.c (mface__for_chars): When font is specified and layouter
1830 is found for it, if the layouter doesn't support one of a
1831 character, use a face sans layouter for it.
1833 2005-12-06 Kenichi Handa <handa@m17n.org>
1835 * fontset.c (mfont__lookup_fontset): If only a fallback font is
1836 found, don't use it for more than one character.
1838 2005-12-05 Kenichi Handa <handa@m17n.org>
1840 * face.c (mface__realize): Set rfont->layouter to Mnil.
1841 (mface__for_chars): Fix handling of layouter.
1843 * character.h (mchar__define_prop): Extern it.
1845 * database.c (update_database_list): Call mchar__define_prop if
1848 * character.c (mchar__init): Don't call mchar_define_property.
1849 Instead just initialize property keys.
1850 (mchar__fini): Free char_prop_list only if it's not NULL.
1851 (mchar__define_prop): New function.
1852 (mchar_define_property): Call mchar__define_prop.
1854 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
1857 2005-12-02 Kenichi Handa <handa@m17n.org>
1859 * language.c (mlang__init): Handle extra chars.
1861 * m17n-gui.h (mfont_check): Adjust prototype.
1863 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
1864 (xfont_check_capability): New function.
1865 (xft_driver): Specify xft_check_capability.
1866 (xft_check_capability): New function.
1868 * font-ft.c (M0_3): Delete it.
1870 (ft_get_charmaps): Refer to M0.
1871 (fc_parse_pattern): Fix previous change.
1872 (ft_list_language): Check also extra chars.
1873 (ft_check_otf): Define it even if HAVE_OTF is undef.
1874 (ft_check_lang): Check the result of FcLangSetHasLang against
1875 FcLangDifferentLang. Check also extra chars.
1876 (ft_list_capability): Delete ifdef HAVE_OTF.
1877 (ft_select): Likewise.
1878 (ft_open): Improve debug information.
1879 (ft_check_capability): New function.
1880 (mfont__ft_driver): Specify ft_check_capability.
1881 (mfont__ft_init): Initialize M0.
1883 * fontset.c (get_font_from_group): New function.
1884 (mfontset__get_font): New function.
1886 * fontset.h (mfontset__get_font): Extern it.
1888 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
1889 (mfont__fini): Delete ifdef HAVE_OTF.
1890 (free_font_capability): Likewise.
1891 (mfont__get_capability): Likewise.
1892 (mfont__check_capability): New function.
1893 (mfont_check): Change the order of arguments. Use
1896 * font.h (struct MFontDriver): New member check_capability.
1897 (MFontCapability): Delete ifdef HAVE_OTF.
1898 (mfont__check_capability): Extern it.
1900 * face.c (mface__realize): Fix handling of FONT arg.
1901 (mface__for_chars): Fix handling of explicitly specified font.
1903 2005-11-25 Kenichi Handa <handa@m17n.org>
1905 * font-flt.c (run_command): Print debug info for
1908 * draw.c (layout_glyphs): Fix handling of left/right_padding.
1910 * face.c (mface__for_chars): Check rfont before accessing the
1913 2005-11-21 Kenichi Handa <handa@m17n.org>
1915 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
1918 * fontset.c (fontset_table): New variable.
1919 (free_fontset): Call M17N_OBJECT_UNREGISTER.
1920 (mfont__fontset_init): Add fontset_table as an object array.
1921 (mfont__realize_fontset): Ref FONTSET.
1922 (mfont__free_realized_fontset): Unref REALIZED->fontset.
1923 (mfontset): Call M17N_OBJECT_REGISTER.
1924 (mfontset_copy): Likewise.
1926 * input.c (handle_key): For debugging, print information about
1928 (filter): Add an alias for Meta and Alt modifiers.
1929 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
1931 (minput__init): Initialize them.
1932 (parse_expression): New function.
1933 (resolve_expression): New function.
1934 (parse_action_list): Handle expressions by parse_expression.
1935 (take_action_list): Handle expressions by resolve_expression.
1936 (parse_nested_list_value): Fix previous change.
1937 (resolve_command): Fix handling of the return value of
1940 2005-11-18 Kenichi Handa <handa@m17n.org>
1942 * font-ft.c (ft_check_otf, otf_script_list): Define only when
1943 HAVE_OTF is defined.
1944 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
1946 (ft_select): Likewise.
1948 * font.c (mfont_list): Fix for the case that FONT is NULL.
1949 (OTF_tag): Delete it.
1950 (load_otf_script_list): Define only when HAVE_OTF is defined.
1951 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
1954 * draw.c (truncate_gstring): Be sure to truncate at
1955 glapheme-cluster boundary.
1957 2005-11-11 Kenichi Handa <handa@m17n.org>
1959 * input.c (delete_surrounding_text): Clear cache if necessary.
1961 2005-11-09 Kenichi Handa <handa@m17n.org>
1963 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
1964 glyph prev is also supported by the current flt.
1966 2005-11-08 Kenichi Handa <handa@m17n.org>
1968 * m17n-X.c (xft_render): Cancel previous change.
1970 2005-11-07 Kenichi Handa <handa@m17n.org>
1972 * input.c: Include <stdlib.h>.
1973 (get_surrounding_text, delete_surrounding_text)
1974 (get_preceding_char, get_following_char): New functions.
1975 (integer_value): New arg surrounding. If it is nonzero, try to
1976 get a surrounding character. Callers changed.
1977 (take_action_list): Check `value' before setting an element.
1978 (destroy_ic): Unref ic_info->preceding_text and
1979 ic_info->following_text.
1980 (minput__init): Initialize Minput_get_surrounding_text and
1981 Minput_delete_surrounding_text.
1982 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
1984 (filter): Unref ic_info->preceding_text and
1985 ic_info->following_text.
1987 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
1990 * input.h (MInputContextInfo): New members preceding_text and
1993 2005-11-04 Kenichi Handa <handa@m17n.org>
1995 * input.c (parse_nested_list_value): Fix handling of the global
1997 (get_nested_list): Get global definitions by load_partial_im_info.
1998 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
1999 MInputCandidatesChanged.
2000 (take_action_list): Likewise.
2001 (reset_ic): Likewise.
2002 (create_ic): Don't pay special attention to
2003 Mcandidates_group_size.
2004 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
2005 (minput_set_variable): Get a definition of varible by
2006 mplist_find_by_value, not mplist_get.
2008 * m17n.h (enum MInputCandidatesChanged): New enum.
2010 2005-11-01 Kenichi Handa <handa@m17n.org>
2012 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
2014 (mwin__destroy_window): If xft_draw's drawable is win, change it
2015 to device->drawable before destroying win.
2017 2005-10-31 Kenichi Handa <handa@m17n.org>
2019 * input.c (load_im_info): Fix adding of state.
2021 * m17n-core.c (m17n_fini_core): Fix reporting of module
2024 * m17n.c (m17n_fini): Fix reporting of module finalization.
2026 * m17n-gui.c (m17n_init_win): Fix reporting of module
2029 2005-10-29 Kenichi Handa <handa@m17n.org>
2031 * input.c (get_candidate_list): Fix the timing of referring plist.
2033 2005-10-28 Kenichi Handa <handa@m17n.org>
2035 * input.c (load_branch): Ignore an undefined map name.
2036 (load_im_info): Set im_info->title from `name' only if it's not
2038 (shift_state): Always update ic->status.
2039 (adjust_candidates): Renamed from adjust_candidate_command.
2040 Argument changed. Caller changed.
2041 (get_candidate_list, regularize_action): New functions.
2042 (take_action_list): Use them. On handling Munhandle, don't set
2044 (handle_key): If KEY is not handled by MAP, and MAP has
2045 branch_actions, perform them.
2047 * database.c (mdatabase__fini): Free dir_info->filename;
2049 2005-10-20 Kenichi Handa <handa@m17n.org>
2051 * input.c (marker_code): Accept '@@'.
2052 (integer_value): Handle '@@'.
2053 (parse_action_list): Accept a symbol argument.
2054 (take_action_list): Resolve the symbol argument. Handle the
2057 2005-10-18 Kenichi Handa <handa@m17n.org>
2059 * input.c: Include "charset.h".
2060 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
2062 (MIMState): New member (M17NObject control).
2063 (lookup_nested_list, set_nested_list, parse_nested_list_value)
2064 (get_nested_list, resolve_variable): New functions.
2065 (integer_value): New arg (MPlist **value). Set it to the plist
2066 element containing the value.
2067 (resolve_command): New function.
2068 (load_translation): New arg (MPlist *map_actions).
2069 (load_branch): New args language and name. If `keylist' is a
2070 symbol, resolved that as a command name.
2071 (free_map): New arg top. Free map->map_actions only if top is
2073 (free_state): New function.
2074 (load_state): New arg name.
2075 (im_info_list): New variable.
2076 (free_im_info, get_im_info_by_tags): New functions.
2077 (load_im_info): Arg key changed to plist. Handle `include'.
2078 Return (MInputMethodInfo *).
2079 (preedit_commit): Ref ic->candidate_list.
2080 (get_select_charset, adjust_candidate_command): New functions.
2081 (take_action_list): Handle `include'. Adjust candidate action
2082 properly. Handle control variables `candidates-charset' and
2083 `candidates-group-size'.
2084 (open_im): Use get_im_info.
2085 (create_ic): Get global variables.
2086 (load_partial_im_info): New function.
2087 (get_im_info): New function.
2088 (check_command_keyseq, check_command_list, check_variable_list):
2090 (minput__init): Don't handle M_database_hook and Mdetail_text.
2091 Initialize M_candidates, Mcandidates_group_size,
2092 Mcandidates_charset.
2093 (parse_variable_list, get_variable_list, parse_command_list)
2094 (get_command_list): Delete them.
2095 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
2096 (minput__fini): Simply unref command_list and variable_list.
2097 (minput_get_description): Adjusted for the new form of description.
2098 (minput_get_commands): Use get_nested_list.
2099 (minput_assign_command_keys): Likewise.
2100 (minput_get_variables, minput_set_variable): Likewise.
2102 * input.h (MInputMethodInfo): New members im and maps.
2104 * database.h (M_database_hook): Delete extern.
2105 (MDatabaseHookFunc): Delete extern.
2106 (mdatabase__check): Extern it.
2108 * database.c: Include <glob.h>.
2109 (MAX_TIME): New macro.
2110 (Masterisk): New variable.
2111 (get_database_stream): Argument changed to (MDatabaseInfo *).
2113 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
2114 (find_database): New function.
2115 (update_database_list): New function.
2116 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
2117 calling update_database_list.
2118 (mdatabase__check): New function.
2119 (mdatabase_find): Use update_database and find_database. Don't
2120 handle MDatabaseHookFunc.
2121 (mdatabase_list): Call update_database at first.
2122 (mdatabase_define): Adjusted for the change of mdb->extra_info.
2123 (MDatabaseList): New type.
2125 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
2127 * m17n.h (Mdetail_text): Delete extern.
2129 * m17n-core.h (mplist_conc): Delete extern.
2131 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
2133 (mplist_conc): Renamed to mplist__conc.
2134 (mplist__pop_unref): New function.
2136 2005-10-14 Kenichi Handa <handa@m17n.org>
2138 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
2140 (read_element): If keys is an empty plist, return any element
2142 (dump_plist_element): Check if plist is nested.
2143 (mplist_conc): Always ref tail.
2144 (mplist_set): If key is a managing key, ref val in advance.
2146 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
2147 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
2148 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
2151 * fontset.c (free_fontset): Unref fontset_list if necessary.
2152 (mfont__fontset_fini): Don't free fontset_list. Unref
2154 (mfont__realize_fontset): Initialize request.
2155 (mfontset): Ref default_fontset or fontset only if necessary.
2156 (mfontset_copy): Don't ref copy.
2158 * draw.c (render_glyphs): Check gend->type before checking
2161 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
2162 unrefed plists to NULL.
2164 2005-10-04 Kenichi Handa <handa@m17n.org>
2166 * textprop.c (mtext_serialize): Be sure to make mt
2167 MTEXT_FORMAT_UTF_8 and NULL terminated.
2169 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
2171 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
2173 2005-10-03 Kenichi Handa <handa@m17n.org>
2175 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
2176 is not at the beginning of line.
2178 2005-09-22 Kenichi Handa <handa@m17n.org>
2180 * input.c: Include <sys/stat.h> and <unistd.h>.
2181 (Minclude, Mcommit, Munhandle): New variables.
2182 (minput__init): Initialize them. Push only Mstate to
2183 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
2184 (parse_action_list): Allow integer arg for undo. Handle Mcommit
2186 (load_input_method): Handle "include" directive. If no states are
2188 (shift_state): If state_name is Mt, shift back to the previous
2189 state. Call preedit_commit to commit preedit text.
2190 (preedit_commit): New function.
2191 (take_action_list): Improve debug printing. Handle commit and
2193 (handle_key): Check the return value of take_action_list. Don't
2194 take branch_actions just after changing to the root map.
2195 (reset_ic): Reset all ic_info members.
2196 (filter): When a key is not handled, just move ic_info->keys
2197 instead fo calling reset_ic.
2198 (load_im_info): If key is not Mstate, push Mmap to
2200 (MDatabaseStatList): New type.
2201 (imdir_stat_list): New variable.
2202 (input_method_hook): Don't cancel the hook. Check the
2203 modification time of directories.
2204 (minput__fini): Free imdir_stat_list;
2206 * input.h (MInputContextInfo): New member prev_state.
2208 * m17n-core.h (mplist_conc): Extern it.
2210 * plist.c (mplist_conc): New function.
2212 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
2214 * font.h (MRealizedFont): New member average_width.
2216 * font-ft.c (ft_open): Set rface->average_width.
2218 * font.c (xlfd_unparse_name): Print '*' before registry name.
2220 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
2221 (xfont_open): Set rfont->average_width.
2222 (xft_open): Likewise.
2223 (device_open): Initialize disp_info->AVERAGE_WIDTH.
2225 * internal-gui.h (struct MFrame): New member average_width.
2227 * m17n-gui.c (mframe): Fix setting of frame->rfont.
2228 (mframe_get_prop): Return the average_width of a font.
2230 * face.c (mface__realize): Set rface->average_width.
2231 (mface__update_frame_face): Set frame->average_width.
2233 * face.h (MRealizedFace): New member average_width.
2235 2005-09-19 Kenichi Handa <handa@m17n.org>
2237 * font.c (xlfd_unparse_name): New arg full_xlfd.
2238 (mfont__encode_char): Use shortcut only for X core fonts.
2239 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
2240 (mfont_put_prop): Handle `language' property.
2241 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
2242 Print file can capability info too.
2244 * m17n-core.c (mdebug__output): New variable.
2245 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
2246 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
2247 (m17n_fini_core): Close mdebug__output if it's not stderr.
2249 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
2250 (xfont_open): Handle baseline_offset.
2251 (xfont_find_metric): Likewise.
2252 (xfont_render): Likewise.
2253 (xft_open): Likewise.
2254 (xft_render): Likewise.
2256 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
2257 (mdebug__output): Extern it.
2258 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
2259 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
2260 (MDEBUG_DUMP): New macro.
2261 (MDEBUG_PRINT_TIME): Print to medebug__output.
2263 * font.h (MRealizedFont): New member baseline_offset.
2265 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
2267 (fc_weight_table): Add FC_WEIGHT_REGULAR.
2268 (ft_list_family): Check alias.
2269 (ft_list_language): If language is "en", don't try to the second
2271 (ft_default_list): New variable.
2272 (ft_list_default): New function.
2273 (ft_select): If family is not specified, try only the default
2274 fonts. Treat the weights normal and medium same.
2275 (ft_open): Fix debug message. If registry is not specified, try
2276 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
2277 (ft_find_metric): Likewise.
2278 (ft_render): Likewise.
2279 (ft_list): Fix debug message. Accept the registring iso8859-1.
2280 If family is not specified, try only the default fonts.
2282 * face.c (mface__realize): Fix logic of opening a font.
2284 2005-09-16 Kenichi Handa <handa@m17n.org>
2286 * face.c (mface__realize):
2288 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
2291 * input.c (shift_state): Fix the condition of taking init actions.
2292 (take_action_list): Fix handling of pushback action.
2293 (handle_key): Don't change key while checking its alias.
2294 (minput__init): Initialize new variables.
2295 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
2298 2005-09-12 Kenichi Handa <handa@m17n.org>
2300 * mtext.c (mtext__uppercase): Add proper open/close parens.
2301 (mtext_titlecase): Add proper casting.
2303 * input.c (parse_action_list): Handle the case that the arg is a
2304 key sequence (MText or MPlist).
2305 (take_action_list): Likewise.
2306 (shift_state): Shorter debug message.
2307 (handle_key): Terminate a debug message by "\n".
2308 (reset_ic): Don't take initial actions here.
2309 (minput_open_im): Print a debug message.
2310 (minput_close_im): Likewise.
2311 (minput_create_ic): Likewise.
2312 (minput_destroy_ic): Likewise.
2314 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
2316 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
2319 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
2320 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
2323 * character.c: Add Japanese documentation for
2324 mchar_get_prop_table ().
2326 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
2328 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
2329 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
2330 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
2332 (init_case_conversion): New function.
2333 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
2334 (uppercase_precheck, lowercase_precheck, final_sigma)
2335 (after_soft_dotted, more_above, before_dot, after_i)
2336 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
2338 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
2340 * plist.c (read_mtext_element): Fix previous change.
2342 2005-09-05 Kenichi Handa <handa@m17n.org>
2344 * plist.c (read_mtext_element): Handle \uXXXX notation.
2346 * internal.h (MTABLE_MALLOC): Don't use a local variable.
2347 (MTABLE_ALLOCA): Change the name of local variable.
2349 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
2350 HAVE_FREETYPE are defined.
2352 * m17n-X.c: Check HAVE_X11.
2354 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
2355 directory listing libraries.
2356 (noinst_PROGRAMS): Define it only in maintainer mode.
2358 2005-09-02 Kenichi Handa <handa@m17n.org>
2360 * m17n-gui.h (mdraw_line_break_option): Extern it.
2362 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
2363 end of the first glyph.
2364 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
2366 (mdraw_line_break_option): New variable.
2367 (mdraw_default_line_break): Use mtext_line_break.
2369 * mtext.h (wordseg_func_table): Don't extern it.
2370 (mtext__wseg_fini): Extern it.
2372 * mtext.c: Don't include word-thai.h.
2373 (wordseg_func_table): Delete this variable.
2374 (mtext__init): Don't initialize above. Don't call
2375 mtext__word_thai_init.
2376 (mtext__fini): Don't free wordseg_func_table. Call
2377 mtext__wseg_fini instead fo mtext__word_thai_fini.
2378 (MTextWordsegFunc): Don't typedef it.
2379 (mtext__word_segment): Moved to mtext-wseg.c.
2381 * m17n-core.h (enum MTextLineBreakOption): New enum.
2382 (mtext_line_break): Extern it.
2384 * mtext-wseg.c: New file.
2386 * mtext-lbrk.c: New file.
2388 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
2389 add mtext-lbrk.c and mtext-wseg.c.
2391 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
2392 the case that head is NULL.
2394 2005-09-01 Kenichi Handa <handa@m17n.org>
2396 * word-thai.c (wordseg_propertize): If the property value is nil,
2397 don't make the property no-merge.
2398 (thai_wordseg): Don't require *from and *to are set a priori. Pay
2399 attention to the case that they are NULL.
2400 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
2403 * character.c (mchar_get_prop_table): New function.
2405 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
2407 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
2408 (mchar_get_prop_table): Extern it.
2410 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
2411 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
2413 * internal.h (enum MTextCoverage): New enum.
2414 (MText): New member coverage.
2416 * mtext.c (FORMAT_COVERAGE): New macro.
2417 (insert): Copy mt2->coverage.
2418 (mtext__from_data): Initialize mt->coverage.
2419 (mtext__adjust_format): Update mt->coverage.
2420 (mtext): Initialize mt->coverage.
2421 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
2422 Update mt->coverage if necessary.
2423 (mtext_duplicate): Copy mt->coverage.
2424 (mtext_insert, mtext_replace): New functions.
2425 (mtext_dup): Use mtext_duplicate.
2426 (mtext__word_segment): Don't set *from and *to if a word
2427 segmentation funcion is not found.
2428 (mtext_ins_char): Fix typo.
2430 2005-08-25 Kenichi Handa <handa@m17n.org>
2432 * font.h (MFont): New member for_full_width.
2434 * font.c (compare_font_score): Prefer a font of not
2437 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
2438 registry charset of a font is one of CJK charsets.
2440 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
2441 supports some of CJK.
2443 2005-08-24 Kenichi Handa <handa@m17n.org>
2445 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
2447 * m17n-gui.c (null_device_open): Check Mresolution param and set
2450 * m17n-gd.c (device_open): Check Mresolution param and set
2453 * m17n-X.c (MWDevice): New member resy.
2454 (xfont_open): Set ascent, descent, and max_advance members of
2456 (xft_open): Likewise.
2457 (device_open): Compare also screen_num to find a device. Set
2458 device->resy and frame->dpi.
2460 * internal-gui.h (MFrame): New member dpi.
2462 * font.h (MRealizedFont): New member max_advance.
2464 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
2465 (mfont__init): Don't initialize Mascent, Mdescent.
2466 (Mascent, Mdescent): Delete these variables.
2467 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
2468 Mfont_descent instead of Mascent and Mdescent.
2469 (mfont_put_prop): Allow negative size.
2470 (mfont_find): Handle the case of spec->size < 0. Fix previous
2472 (mfont_list): Handle the case of spec->size < 0.
2473 (mfont_check): Likewise.
2475 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
2476 (fc_get_pattern): Handle the case of font->size < 0.
2477 (ft_open): Set ascent, descent, and max_advance members of rfont.
2478 (ft_find_metric): Improve rounding.
2479 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
2482 * face.c (mface__realize): Handle the case of font->size < 0.
2484 2005-08-22 Kenichi Handa <handa@m17n.org>
2486 * coding.c (MConverterStatus): Change the member buf to union.
2487 (mconv_buffer_converter): Add const to the arg buf.
2488 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2489 (mconv_decode): Adjusted for the change of MConverterStatus.
2490 (mconv_encode_range): Likewise.
2492 * m17n.h (mconv_buffer_converter): Prototype adjusted.
2493 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2495 2005-08-20 Kenichi Handa <handa@m17n.org>
2497 * m17n-gui.h (mfont_from_name): Prototype adjusted.
2498 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
2500 * m17n-X.c (xfont_open): Set members ascent, descent, and
2501 max_advance of rfont.
2502 (xft_open): Likewise.
2504 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
2506 (mfont__ft_parse_name): Add const to the arg name.
2508 * font.c (xlfd_parse_name): Add const to the arg name. Call
2509 mfont__set_property instead of mfont_set_spec. Set font->spacing.
2510 (xlfd_unparse_name): Handle spacing.
2511 (mfont__init): Initialize new variables.
2512 (mfont__id): Handle spacing.
2513 (mfont__merge): Likewise.
2514 (mfont__set_spec): This function deleted.
2515 (mfont__parse_name_into_font): Add const to the arg name. Fix the
2516 condition of calling mfont__ft_parse_name.
2517 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
2518 (mfont_get_prop): Handle properties spacing, ascent, descent,
2520 (mfont_find): Return a realized font.
2521 (mfont_from_name): Add const to the arg name.
2523 * font.h (enum MFontProperty): New member MFONT_SPACING.
2524 (enum MFontSpacing): New enum.
2525 (MFont): New members spacing and max_advance.
2526 (mfont__ft_parse_name): Prototype adjusted.
2527 (mfont__set_spec): Extern deleted.
2528 (mfont__parse_name_into_font): Prototype adjusted.
2530 2005-08-19 Kenichi Handa <handa@m17n.org>
2532 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
2534 * font.c (mfont_list): If FONT is null, use a temporary font.
2535 (mfont_parse_name): Add const to the arg name.
2537 2005-08-18 Kenichi Handa <handa@m17n.org>
2539 * word-thai.c: Surround code by #ifdef and #endif to escape from
2542 * font-ft.c: Mostly re-written.
2544 * font-flt.c (FontLayoutCmdOTF): This type deleted.
2545 (FontLayoutCmd): Type of the member otf changed..
2546 (load_otf_command): Adjusted for the format change of otf command.
2547 (load_command): Likewise.
2548 (free_flt_command): Unref cmd->body.otf.
2549 (run_otf): Ajusted for the type change of otf_cmd.
2550 (run_command): Ajusted for the type change of otf_cmd. On
2551 debugging, print ctx->combining_code.
2552 (mfont__flt_run): Initialize ctx's members code_offset,
2553 combining_code, and left_padding to 0.
2555 * face.h (struct MRealizedFace): New member font.
2556 (mface__realize): Prototype adjusted.
2558 * face.c (find_realized_face): New arg font.
2559 (find_realized_face): Adjusted for the change of MFont.
2560 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
2561 (mface__fini): Don't call mdebug__report_object.
2562 (mface__realize): New arg font.
2563 (mface__for_chars): Adjusted for the change of mfont__encode_char.
2564 Optimize the latin case.
2565 (mface__free_realized): Free rface->font.
2566 (mface__update_frame_face): Adjusted for the change of mface__realize.
2567 (mface_equal): New function.
2569 * draw.c (Mcommon): New variable.
2570 (visual_order): Args to mfont__encode_char changed.
2571 (compose_glyph_string): Handle Mfont text property.
2572 (layout_glyphs): Adjusted for the change of MFont.
2573 (mdraw__init): Initialize Mcommon.
2574 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
2576 * font.h (enum MFontType): Members completely changed.
2577 (enum MFontProperty): Move MFONT_SIZE to the tail.
2578 (enum MFontSource): New enum.
2579 (struct MFont): New members type, source, sizes, file, capability,
2581 (struct MRealizedFont): Type of member font changed. Members
2582 score, status, and encoding deleted.
2583 (MFontScore): New type.
2584 (MFontList): Member changed.
2585 (struct MFontDriver): New member has_char. Types of members
2587 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2588 (Mapple_roman): Extern them.
2589 (OTF_Tag): Typedefed if not HAVE_OTF.
2590 (enum MFontOpenTypeTable): New enum.
2591 (MFontCapability): New type.
2592 (mfont__ft_drive_otf): Prototype adjusted.
2593 (mfont__score): Extern deleted.
2594 (mfont__merge): Extern it.
2595 (mfont__has_char): Extern it.
2596 (mfont__encode_char): Prototype adjusted.
2597 (mfont__open): Extern it.
2598 (mfont__set_spec): Prototype adjusted.
2599 (mfont__get_capability): Extern it.
2601 * font.c: Include "fontset.h".
2602 (M_font_capability, M_font_list, M_font_list_len): New variables.
2603 (font_score_priority): Change order of initial elements.
2604 (font_score_shift_bits): Fix array size.
2605 (common_weight): Add "thin", "semibold", and "heavy".
2606 (common_stretch): Add "ultracondensed", "extracondensed",
2607 "extraexpanded", and "utltraexpand".
2608 (font_weight_regular, font_weight_normal, font_weight_medium): New
2610 (gen_font_name): This function deleted.
2611 (find_encoding): Set font->encoding.
2612 (OTF_tag): New function.
2613 (otf_script_list): New variable.
2614 (load_otf_script_list): New function.
2615 (find_script_from_otf_tag): New function.
2616 (xlfd_parse_name): Set font->type and font->source.
2617 (mfont__free_realized): Free chains rfonts.
2618 (font_score): Renamed from mfont__score.
2619 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2620 (Mapple_roman): New variables.
2621 (mfont__init): Initilize new variables. Initalize
2622 default_encoding.encoding_name and
2623 default_encoding.encoding_charset to Municode_full and
2624 mcharset__unicode. Use SAFE* macros for allocating filepath
2626 (mfont__fini): Free otf_script_list.
2627 (mfont__id): New function.
2628 (mfont__match_p): Check also capability member of MFont.
2629 (mfont__merge): New funciton.
2630 (mfont__set_spec_from_face): Set type and source members.
2631 (mfont__set_spec_from_plist): Set capability and type members.
2632 (mfont__select): Argument changed.
2633 (mfont__available): New function.
2634 (compare_font_score): New function.
2635 (mfont__list): New function.
2636 (mfont__open): Return a realized font.
2637 (mfont__resize): Adjusted for the change of MFont.
2638 (mfont__has_char): New function.
2639 (mfont__encode_char): Argument changed.
2640 (mfont__set_spec): Argument changed.
2641 (free_font_capability): New function.
2642 (mfont__get_capability): New function.
2643 (MFontfile): New variable.
2644 (mfont_get_prop): Adjusted for the change of MFont.
2645 (mfont_put_prop): Likewise.
2646 (mfont_set_selection_priority): Fix the way of setting
2647 font_score_priority[].
2648 (mfont_find): Use mfont__list instead of mfont__select.
2649 (mfont_resize_ratio): Adjusted for the change of MFont.
2650 (mfont_list): Use mfont__list.
2651 (mfont_check): New function.
2652 (font_score): Make it static.
2654 * fontset.h (mfont__realize_fontset): Prototype adjusted.
2655 (mfont__lookup_fontset): Likewise.
2657 * fontset.c (struct MFontset): Delete member font_spec_list.
2658 (struct MRealizedFontset): Type of member spec changed. New
2660 (load_font_group): Arg spec_list deleted.
2661 (load_fontset_contents): Adjusted for the change of fontset_def.
2662 (free_fontset): Fix the way of freeing fontset elements.
2663 (realize_fontset_elements): Argument changed.
2664 (get_per_script): New function.
2665 (free_realized_fontset_elements): Fix the way of feeing rfontset
2667 (update_fontset_elements): Fix args to realize_fontset_elements.
2668 (mfont__realize_fontset): New arg spec.
2669 (try_font_list): New function.
2670 (try_font_group): New arg request. Use try_font_list.
2671 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
2673 (mfontset): Adjusted for the change of MFontset.
2674 (mfontset_copy): Likewise. Don't share plists.
2675 (mfontset_modify_entry): Adjusted for the change of MFontset.
2676 (mfontset_lookup): Call get_per_script.
2677 (mdebug_dump_fontset): Print also the address of fonts.
2679 * input.c (shift_state): Don't reset ic_info->vars.
2680 (take_action_list): Call MDEBUG_PRINT fore calling
2683 * internal-gui.h (MFontDriver): Don't typedef it here.
2685 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
2686 (MXFont): This type deleted.
2688 (struct _MFontX): New struct.
2689 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
2690 (MDisplayInfo): Member base_font_list deleted.
2691 (DEFAULT_FONT): Definition changed.
2692 (FALLBACK_FONT): This maclr deleted.
2693 (free_display_info): Adjusted for the change of MDisplayInfo.
2694 (free_device): Argument to mfont__free_realized changed.
2695 (xfont_driver): Adjusted for the change of MFontDriver.
2696 (xfont_registry_list): Use MFontX instead of MXFont.
2697 (MRealizedFontX): Renamed from MXFontInfo.
2698 (xfont_select): Return the font found first.
2699 (close_xfont): Change MXFontInfo to MRealizedFontX.
2700 (xfont_open): Return the realized font.
2701 (xfont_find_metric): Get xfont from rfont->fontp.
2702 (xfont_has_char): New function.
2703 (xfont_encode_char): Adjusted for the argument change.
2704 (xfont_render): Get xfont from rfont->fontp.
2705 (xfont_list): Adjusted for the argument change.
2706 (MRealizedFontXft): Renamed from MXftFontInfo.
2707 (xft_driver): Ajusted for the change of MFontDriver.
2708 (close_xft): Change MXtfFontInfo to MRealizedFontXft
2709 (xft_open_font): Argument changed.
2710 (xft_open): Argument changed. Return the realized font.
2711 (xft_find_metric): Get xft_font from rfont->fontp.
2712 (xft_has_char, xft_encode_char): New functions.
2713 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
2714 font if not yet opened.
2715 (device_open): Don't set frame->font.
2717 * m17n-gd.c (gd_font_driver): Adjusted for the change of
2719 (gd_font_open): New function.
2720 (gd_render): Don't use the local variable ft_info.
2721 (device_init): Adjusted for the change of gd_font_driver.
2723 * textprop.c (mtext__prop_init): Initialize text_property_table.
2724 Call M17N_OBJECT_ADD_ARRAY.
2725 (mtext__prop_fini): Don't call mdebug__report_object.
2727 * plist.c (mplist__init): Initialize plist_table.
2728 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
2729 (mplist__fini): Don't call mdebug__report_object.
2731 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
2732 (mtext__fini): Don't call mdebug__report_object.
2733 (MTEXT_FORMAT_UTF_16): Correct type.
2734 (mtext_data): New function.
2735 (mtext_text): Fix calculation of limit and args to
2738 * language.c: Include "plist.h".
2739 (M_script_lang_list): New variable.
2740 (mlang__init): Read languages and their information from m17n
2742 (mlanguage__list): New function.
2743 (Miso639_1, Miso639_2): New variables.
2745 * language.h (mlanguage__list): Extern it.
2747 * database.c (get_database_stream): Use SAFE_* macros for
2748 allocating and freeing path.
2749 (mdatabase__init): Likewise.
2751 * symbol.c (msymbol__fini): Don't free symbols here.
2752 (msymbol__free_table): New function.
2753 (msymbol_is_managing_key): New function.
2755 * symbol.h (msymbol__free_table): Extern it.
2756 (msymbol__list): Extern it.
2758 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
2760 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
2761 (struct _M17NObjectArray): New member name and next.
2762 (mdebug__add_object_array): Extern it.
2763 (M17N_OBJECT_ADD_ARRAY): New macro.
2764 (mdebug__report_object): Don't extern it.
2766 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
2768 * m17n-gui.c (free_frame): Don't free frame->font.
2769 (null_device_fini): Fix code for freeing
2770 null_device.realized_font_list.
2771 (m17n_fini_win): Free interface.
2772 (mframe): Cast the return value of dlsym. Set frame->font here.
2773 (mframe_get_prop): Check frame->rface->rfont before accessing the
2776 * m17n-gui.h (Mfontfile): Extern it.
2777 (mfont_check): Extern it.
2778 (mface_equal): Extern it.
2780 * m17n-core.c: Include "symbol.h".
2781 (report_header_printed): This variable deleted.
2782 (object_array_root): New variable.
2783 (report_object_array): New function.
2784 (mdebug__report_object): This function deleted.
2785 (mdebug__add_object_array): New function.
2786 (m17n_init_core): Call mchartable_init () before mtext_init ().
2787 (m17n_fini_core): Call report_object_array (if necessary) and
2788 msymbol__free_atable at the end.
2790 * m17n-core.h (msymbol_is_managing_key): Extern it.
2791 (mtext_data): Extern it.
2792 (MTEXT_FORMAT_UTF_16): Correct type.
2793 (M17NLIB_MINOR_VERSION): Changed to 3.
2794 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
2796 * chartab.c (mchartable__init): Initalize chartable_table.count.
2797 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
2798 mdebug__report_object.
2800 2005-05-26 Kenichi Handa <handa@m17n.org>
2802 * m17n.h (Miso639_1, Miso639_2): Extern them.
2804 * symbol.h (msymbol__list): Extern it.
2806 * symbol.c (msymbol__list): New function.
2808 2005-05-19 Kenichi Handa <handa@m17n.org>
2810 * input-gui.c (minput__win_init): Don't change the value of
2813 2005-05-16 Kenichi Handa <handa@m17n.org>
2815 * m17n-core.c (m17n_object): Be sure to initialize all members.
2817 * font-ft.c (fc_decode_prop): Fix args to msymbol.
2819 2005-05-09 Kenichi Handa <handa@m17n.org>
2821 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
2823 2005-04-27 Kenichi Handa <handa@m17n.org>
2825 * language.c (mlang__init): Add "an" (Aragonese).
2827 * word-thai.c: Add support for libthai.
2828 (mtext__word_thai_init): Initialize wordseg library conditionaly.
2829 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
2831 * mtext.c: Include "word-thai.h" conditionaly.
2832 (mtext__init): Call mtext__word_thai_init conditionaly.
2833 (mtext__fini): Call mtext__word_thai_fini conditionaly.
2835 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
2836 not WORDCUT_LD_FLAGS.
2838 2005-04-19 Kenichi Handa <handa@m17n.org>
2840 * word-thai.c (wordseg_propertize): Always unref the attached
2842 (thai_wordseg): Don't unref the property.
2844 2005-04-18 Kenichi Handa <handa@m17n.org>
2846 * word-thai.c: Include stdlib.h.
2847 (wordseg_propertize): Add dummy function for the case that wordcut
2848 library doesn't exist.
2849 (wordseg_propertize): Fix for old wordcut library.
2851 2005-04-16 Kenichi Handa <handa@m17n.org>
2853 * word-thai.c: Include <stdio.h>.
2855 2005-04-15 Kenichi Handa <handa@m17n.org>
2857 * draw.c: Include mtext.h.
2858 (linebreak_table, M_break_at_space, M_break_at_word)
2859 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
2860 (compose_glyph_string): Check POS before getting Mface text
2862 (truncate_gstring): Give correct TO arg to line_break function.
2863 (GET_LB_TYPE): New macro.
2864 (find_break_backward, find_break_forward): New functions.
2865 (mdraw__init): Initialize the above new variables.
2866 (mdraw__fini): Free linebreak_table.
2867 (mdraw_default_line_break): Use find_break_backward and
2870 * word-thai.c: New file.
2872 * word-thai.h: New file.
2874 * mtext.c: Include word-thai.h.
2875 (wordseg_func_table): New variable.
2876 (mtext__init): Initialize wordseg_func_table and call
2877 mtext__word_thai_init.
2878 (mtext__fini): Call mtext__word_thai_fini, free
2880 (MTextWordsegFunc): New type.
2881 (mtext__word_segment): New function.
2883 * mtext.h (wordseg_func_table): Extern it.
2884 (mtext__word_segment): Extern it.
2886 * m17n.c (m17n_init): Fix typo (== -> =).
2888 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
2889 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
2891 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
2892 (MTEXTPROP_VAL): New macros.
2894 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
2896 2005-04-07 Kenichi Handa <handa@m17n.org>
2898 * database.c (load_chartable): Fix pursing of symbol name.
2900 2005-03-24 Kenichi Handa <handa@m17n.org>
2902 * m17n.c (m17n_init): Fix typo (== -> =).
2904 2005-03-11 Kenichi Handa <handa@m17n.org>
2906 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
2908 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
2910 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
2913 2005-03-09 handa <handa@m17n.org>
2915 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
2916 calling m17n_init ().
2918 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
2919 calling m17n_init_core ().
2921 2005-02-28 Kenichi Handa <handa@m17n.org>
2923 * font-flt.c (mfont__flt_run): Add resulting code sequence in
2926 2005-02-17 Kenichi Handa <handa@m17n.org>
2928 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
2929 (M_description, M_command, M_variable): New variables.
2930 (load_im_info_keys): New variables.
2931 (load_im_info, check_command_keyseq, get_description_advance)
2932 (parse_command_list, get_command_list, parse_variable_list)
2933 (get_variable_list, input_method_hook): New functions.
2934 (command_list, variable_list): New variables.
2935 (minput__init): Put input_method_hook to Minput_method.
2936 Initialize M_description, M_command, M_variable, Mdetail_text,
2937 load_im_info_keys, command_list, variable_list.
2938 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
2939 (Mdetail_text): New variable.
2940 (minput_get_description, minput_get_commands)
2941 (minput_assign_command_keys, minput_get_variables)
2942 (minput_set_variable): New functions.
2944 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
2945 (minput_assign_command_keys, minput_get_variables)
2946 (minput_set_variable): Extern them.
2948 * plist.c (UNGETC): Just decrement st->p.
2949 (read_mtext_element): New arg skip.
2950 (read_integer_element): Likewise.
2951 (read_symbol_element): Likewise.
2952 (read_element): New arg KEYS.
2953 (mplist__from_plist): Don't increment ref-count of NULL object.
2954 (mplist__from_file): New arg KEYS.
2955 (mplist_put): Don't increment ref-count of NULL object.
2956 (mplist_add): Likewise.
2957 (mplist_push): Likewise.
2958 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
2960 * plist.h (mplist__from_file): Prototype adjusted.
2962 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
2963 (get_database_stream): New function.
2964 (load_database): Use get_database_stream.
2965 (M_database_hook): New variable
2966 (mdatabase__init): Initialize M_database_hook.
2967 (mdatabase__load_for_keys): New function.
2968 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
2970 (mdatabase_define): Free mdb->extra_info if necessary.
2972 * database.h (mdatabase__dir_list, M_database_hook)
2973 (mdatabase__load_for_keys): Extern them.
2974 (MDatabaseHookFunc): New type.
2976 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
2978 2004-12-27 Kenichi Handa <handa@m17n.org>
2980 * Version 1.2.0 released.
2982 2004-12-27 Kenichi Handa <handa@m17n.org>
2984 * input.c (minput_filter): Don't reset ic->xxx_changed.
2986 * mtext.c (mtext_from_data): Fix documentation.
2988 2004-12-25 Kenichi Handa <handa@m17n.org>
2990 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
2991 (M17NLIB_VERSION_NAME): Update to "1.2.".
2993 2004-12-24 Kenichi Handa <handa@m17n.org>
2995 * input.c (reset_ic): Set key_unhandled to 0.
2997 2004-12-21 Kenichi Handa <handa@m17n.org>
2999 * m17n-gui.h (mfont_from_spec): Delete extern.
3001 * input-gui.c (win_callback): Handle Minput_reset.
3002 (minput__win_init): Register reset_ic as a callback for
3005 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
3006 changed. At first, shift to the initial state.
3007 (minput__init): Initialize Minput_reset. Register reset_ic as a
3008 callback for Minput_reset.
3009 (Minput_reset): New variable.
3010 (minput_filter): Always set ic->xxx_changed to 0.
3011 (minput_reset_ic): New function.
3012 (integer_value): Fix typo ('>' -> '<') and calculation of length
3015 * m17n-core.c (merror_code): Change type to `int'.
3017 * m17n-misc.h (merror_code): Adjust type.
3019 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
3021 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
3022 (mtext_change_prop): Delete extern.
3024 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
3025 to `int'. Move the documents to m17n-core.h.
3027 2004-12-13 Kenichi Handa <handa@m17n.org>
3029 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
3030 (MTextProperty): Document it.
3032 2004-12-09 Kenichi Handa <handa@m17n.org>
3034 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
3036 2004-12-03 Kenichi Handa <handa@m17n.org>
3038 * internal.h (m17n__core_initialized, m17n__shell_initialized,
3039 m17n__gui_initialized): New externs.
3041 * m17n-core.h (enum M17NStatus): New enum.
3042 (m17n_status): Extern it.
3044 * m17n-core.c (core_initialized): Delete this variable.
3045 (m17n__core_initialized, m17n__shell_initialized,
3046 m17n__gui_initialized): New variables.
3047 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
3048 instead of core_initialized.
3049 (m17n_status): New function.
3051 * m17n.c (shell_initialized): Delete this variable.
3052 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
3055 * m17n-gui.h (m17n_init_win): Adjust the prototype.
3057 * m17n-gui.c (win_initialized): Delete this variable.
3058 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
3059 instead of gui_initialized.
3061 2004-11-19 Kenichi Handa <handa@m17n.org>
3063 * input.c (reset_ic): Check if ic_info->state is NULL.
3064 (filter): If ic_info->state is NULL, return 0.
3065 (load_input_method): Don't unref `maps' it it's not created.
3067 2004-11-15 Kenichi Handa <handa@m17n.org>
3069 * input.c (find_candidates_group): If INDEX is -1, find the last
3071 (take_action_list): If the previous of the first candidate is
3072 requested, select the last candidate.
3074 2004-11-08 Kenichi Handa <handa@m17n.org>
3076 * m17n-X.c (device_open): Try at most 32 fonts to find a
3077 non-autoscaled font.
3079 * font.c (xlfd_parse_name): Fix previous change.
3081 2004-11-05 Kenichi Handa <handa@m17n.org>
3083 * font.c: (commont_style): Include dummy elements "slanted" and
3084 "rslanted" to prefer "o" to "r" if "i" is requested.
3086 * font-ft.c (ft_to_prop): Fix "oblique" entry.
3088 2004-10-29 Kenichi Handa <handa@m17n.org>
3090 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
3092 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
3093 New members smallest and larger.
3094 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
3095 (xfont_registry_list): Likewise.
3096 (xfont_select): Likewise.
3099 2004-10-28 Kenichi Handa <handa@m17n.org>
3101 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
3102 font name comparison.
3103 (xfont_select): Fix logic for selecting a larger size font.
3105 2004-10-25 Kenichi Handa <handa@m17n.org>
3107 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
3110 2004-10-22 Kenichi Handa <handa@m17n.org>
3112 * input.c (update_candidate): Renamed from udpate_candidate.
3113 (take_action_list): Show more debugging info on arithmetic commands.
3115 * m17n-X.c (device_open): Fix previous change.
3117 * draw.c (compose_glyph_string): Don't get face property at the
3120 2004-10-21 Kenichi Handa <handa@m17n.org>
3122 * draw.c (compose_glyph_string): Fix for the case of category
3125 2004-10-19 Kenichi Handa <handa@m17n.org>
3127 * input.c (mdebug_mask): New variable.
3128 (shift_state): Print debug information.
3129 (take_action_list): Likewise.
3130 (handle_key): Likewise.
3132 2004-10-14 Kenichi Handa <handa@m17n.org>
3134 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
3136 2004-10-13 Kenichi Handa <handa@m17n.org>
3138 * m17n-X.c (device_open): Be sure to register at least one font
3141 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
3142 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
3144 2004-10-12 Kenichi Handa <handa@m17n.org>
3146 * draw.c (alloc_gstring): Fix previous change.
3148 * font-ft.c (ft_list_generic): Fix for the case of not
3151 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
3153 * font.c (mfont_list): If no font is found, return NULL.
3154 (load_font_encoding_table): Put entries of nil registry first.
3155 (find_encoding): Adjust for the above change.
3157 2004-10-11 Kenichi Handa <handa@m17n.org>
3159 * m17n-gui.h (mfont_list): Adjust prototype.
3161 * m17n-X.c (xfont_list): New arg maxnum.
3163 * font.h (struct MFontDriver): Change prototype of <list>.
3165 * font-ft.c (fc_generic_family_list): Delete it.
3166 (Mserif, Msans_serif, Mmonospace): Delete them.
3167 (M_generic_family_info): New variable.
3168 (enum GenericFamilyType): New enum.
3169 (struct GenericFamilyInfo): New struct.
3170 (generic_family_table): New variable.
3171 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
3173 (add_font_info): Get style here.
3174 (ft_list_family): Don't initialize fc_config here. Don't list
3176 (ft_list_generic): New function.
3177 (ft_select): Pay attention to generic familes here.
3178 (ft_open): Fix calculation of ascent and descent.
3179 (ft_list): Pay attention to generic families.
3180 (mfont__ft_init): Initialize M_generic_family_info,
3181 generic_family_table, and fc_config..
3182 (mfont__ft_fini): Finalize generic_family_table.
3184 * draw.c (compose_glyph_string): Use more constant font for
3185 glyphs. Adjust for the member change in MGlyph.
3186 (layout_glyph_string): Adjust for the member change in MGlyph.
3187 (alloc_gstring): Intilize scracth_glyph to avoid
3188 compose_glyph_string on it.
3189 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
3190 (mdraw_coordinates_position): Fix previous change.
3192 * internal-gui.h (glyph_category): New enum.
3193 (MGlyph): Change type of <category> to enum glyph_category.
3195 * face.c (mface__realize): Delete args langauge and charset.
3196 (mface__for_chars): Fix for the case that glyphs have different
3198 (mface__update_frame_face): Adjust for mface__realize change.
3200 * face.h (mface__realize): Adjust prototype.
3202 2004-10-05 Kenichi Handa <handa@m17n.org>
3204 * language.c (mlang__init): Add Akan.
3206 2004-10-04 Kenichi Handa <handa@m17n.org>
3208 * font-ft.c (add_font_info): Add instead of push the element.
3209 (ft_list_family): For generic fonts, try all
3210 substituted. families.
3212 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
3213 (run_rule): Don't update cluster range here.
3214 (run_command): Update cluster range on appending a glyph.
3215 (run_otf): Update cluster range for glyphs generated by OTF.
3217 2004-10-02 Kenichi Handa <handa@m17n.org>
3219 * m17n-X.c (device_open): Handle Mfont key in PLIST.
3221 2004-09-30 Kenichi Handa <handa@m17n.org>
3223 * font-ft.c (ft_select): Ignore family on calling mfont__score.
3225 2004-09-30 Kenichi Handa <handa@m17n.org>
3227 * font.h: Include <fontconfig/fontconfig.h>.
3228 (MFTInfo): New member langset.
3229 (mfont__encoding_list): Extern it.
3231 * font.c (mfont__encoding_list): New function.
3232 (mdebug_dump_font_list): New function.
3234 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
3235 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
3237 (ft_family_list): New variable.
3238 (set_font_info): New arg basep. Callers changed.
3239 (fc_list): Check the return value of FcPatternGetString.
3240 (add_font_info): New arg plist. Callers changed. Update
3242 (ft_list_family): New function (merged fc_list and ft_list_all).
3243 (ft_select): Use ft_list_family.
3244 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
3246 (mfont__ft_init): Initialize above new variables.
3247 (mfont__ft_fini): Free ft_family_list.
3248 (STRDUP_LOWER): New macro.
3249 (set_font_info): Use STRDUP_LOWER.
3250 (ft_list_family): Avoid duplicate addition of font path. Use
3252 (fc_decode_prop): Fix typo.
3254 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
3255 (xfont_registry_list): Change argument disp_info to frame.
3257 (xfont_list_all): New function.
3258 (xfont_list): If FONT is not NULL, check all fonts.
3260 2004-09-28 Kenichi Handa <handa@m17n.org>
3262 * m17n-X.c (MXFont, MXFontList): New types.
3263 (MDisplayInfo): Delete members font_registry_list,
3264 iso8859_1_family_list, iso10646_1_family_list, new members
3265 font_list, base_font_list.
3266 (free_display_info): Adusted for the change of MDisplayInfo.
3267 (xfont_driver): Initialize with xfont_list.
3268 (font_compare): New function.
3269 (build_font_list): Deleted.
3270 (xfont_registry_list): New function.
3271 (xfont_select): Use xfont_registry_list.
3272 (xfont_list): New function.
3273 (device_open): Adusted for the change of MDisplayInfo.
3275 * font-ft.c (add_font_info): New arg languages. Callers changed.
3276 (fc_list): Get languages from fonts..
3277 (ft_list_all): Renamed from ft_list. Callers changed.
3278 (ft_list): New function.
3279 (mfont__ft_driver): Initalize with ft_list.
3281 * font.c (mfont_list): New function.
3283 * font.h (struct MFontDriver): New member `list'.
3284 (MFTInfo): New member languages.
3286 * m17n-gui.h (mfont_list): Extern it.
3288 2004-09-27 Kenichi Handa <handa@m17n.org>
3290 * internal-gui.h (struct MGlyphString): Delete members mt,
3291 sub_width, sub_lbrearing, sub_rbearing, and region.
3293 * draw.c (MSubTextExtents): New type.
3294 (layout_glyphs): New arg extents. Set its members.
3295 (layout_glyph_string): Adjusted for the above change.
3296 (alloc_gstring): Don't set gstring->mt.
3297 (truncate_gstring): Call line_break function with mt instead of
3300 2004-09-22 Kenichi Handa <handa@m17n.org>
3302 * mtext.c (count_utf_16_chars): Count each code of invalid
3305 2004-09-19 Kenichi Handa <handa@m17n.org>
3307 * mtext.c (default_utf_16, default_utf_32): Rename them to
3308 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
3311 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
3314 2004-09-13 Kenichi Handa <handa@m17n.org>
3316 * draw.c (Mlatin): Don't declare it here.
3317 (visual_order): Fix reordering of combining characters.
3318 (compose_glyph_string): Fix detection of script.
3319 (layout_glyphs): Don't fix reordering of combining characters
3321 (layout_glyph_string): Pay attention to
3322 control->disable_overlapping_adjustment.
3323 (truncate_gstring): Include at least on character in a line.
3324 (get_gstring): Always scan one full line.
3325 (mdraw__init): Don't initialize Mlatin here.
3326 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
3327 have a font, use ascent/descent of an ASCII font. Allow
3328 ink_array_return and logical_array_return to be NULL.
3329 (mdraw_coordinates_position): Fix iteration.
3331 * font-ft.c (MFTtoProp): Member completely changed.
3332 (ft_to_prop): Adjusted for the above change.
3333 (ft_to_prop_size): Likewise.
3334 (set_font_info): Adjusted for the change of MFTtoProp.
3335 (fc_generic_family_list): New variable.
3336 (fc_list): Add special handling of generic font names.
3337 (mfont__ft_init): Adjusted for the change of MFTtoProp.
3338 Initialize fc_generic_family_list.
3339 (mfont__ft_fini): Don't free ft_to_prop. Free
3340 fc_generic_family_list.
3341 (FC_vs_M17N_font_prop): New type.
3342 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
3343 (fc_decode_prop, fc_encode_prop): New functions.
3344 (mfont__ft_parse_name): Use fc_decode_prop.
3345 (mfont__ft_unparse_name): Use fc_encode_prop.
3347 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
3348 (MWDevice): Add member realized_font_list.
3349 (free_display_info): Don't free disp_info->realized_font_list.
3350 (free_device): Free device->realized_fontset_list.
3351 (xft_find_metric): Use gstring->frame instead of rfont->frame.
3352 (device_open): Don't initialize disp_info->realized_font_list.
3353 (device_open): Initialize device->realized_font_list and set it to
3354 frame->realized_font_list.
3356 * fontset.c (try_font_group): New function.
3357 (mfont__lookup_fontset): Use try_font_group.
3359 * font.c (common_weight): Change the order of "regular".
3361 * face.c (Mlatin): Don't make it static.
3362 (mface__realize): Be sure to set work_gstring.frame.
3363 (mface__for_chars): Likewise.
3365 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
3368 * internal-gui.h (Mlatin): Extern it.
3370 * m17n-gui.h (MDrawControl): New member
3371 disable_overlapping_adjustment.
3373 2004-09-06 Kenichi Handa <handa@m17n.org>
3375 * font-flt.c (run_otf): Fix typo ('}'->']').
3377 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
3378 (COMBINING_PRECOMPUTED_P): New macros.
3380 * draw.c (layout_glyphs): Handle precomputed combining code.
3382 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
3383 precomupted combining code.
3385 2004-09-03 Kenichi Handa <handa@m17n.org>
3387 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
3390 2004-08-27 Kenichi Handa <handa@m17n.org>
3392 * face.c (mface_put_prop): If the new value is the same as the
3393 current one, don't increment frame->tick.
3395 2004-08-25 Kenichi Handa <handa@m17n.org>
3397 * fontset.c (mfontset): Initialize font_spec_list member.
3398 (mfontset_copy): Load fontset if necessary.
3400 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
3401 'metrics' to for C++.
3403 * draw.c (mdraw_glyph_info): Adjusted for the member name change
3406 2004-08-16 Kenichi Handa <handa@m17n.org>
3408 * Version 1.1.0 released.
3410 2004-08-13 Kenichi Handa <handa@m17n.org>
3412 * language.c (mlang__init): Add Dhivehi.
3414 * m17n-gui.c (Mx, Mfreetype): Delete it.
3415 (m17n_init_win): Don't initialize Mx and Mfreetype here.
3417 * m17n-gui.h (Mfreetype, Mxft): Extern them.
3418 (mfont_resize_ratio): Extern it.
3419 (MDrawGlyphInfo): New member logical_width;
3420 (MDrawGlyph): New type.
3421 (mdraw_glyph_list): Prototype adjusted.
3423 * m17n-X.c (xfont_open): Set type and fontp members.
3424 (xft_open): Likewise.
3426 * internal-gui.h (Mx, Mfreetype): Delete extern.
3428 * font.h (struct MRealizedFont): New member type and fontp.
3430 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
3431 (Mx, Mfreetype): Declare here.
3432 (Mxft): New variable.
3433 (mfont_resize_ratio): New function.
3435 * font-ft.c (ft_open): Set type and fontp members.
3437 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
3440 2004-08-11 Kenichi Handa <handa@m17n.org>
3442 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
3445 2004-08-06 Kenichi Handa <handa@m17n.org>
3447 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
3450 * font-flt.c (run_otf): Print debugging information if necessary.
3452 2004-08-05 Kenichi Handa <handa@m17n.org>
3454 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
3455 positioning_type 5 and 6. Switch simplified.
3457 2004-08-04 Kenichi Handa <handa@m17n.org>
3459 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
3461 2004-08-02 Kenichi Handa <handa@m17n.org>
3463 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
3464 set val to 1 even if it is greater than 1.
3466 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
3468 2004-07-29 Kenichi Handa <handa@m17n.org>
3470 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
3471 debugging information.
3473 * internal.h (MDEBUG_PRINT5): New macro.
3475 * draw.c (layout_glyphs): Don't combine a zero width glyph with
3476 the previous one if the zero width glyph has left or right
3479 2004-07-26 Kenichi Handa <handa@m17n.org>
3481 * m17n-X.c (xft_render): Pay attention to members left_padding and
3482 right_padding of MGlyph.
3484 * draw.c (visual_order): Allocate one more elements for arrays as
3485 a workaround of fribidi bug.
3486 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
3487 instead of MGlyph->bidi_sensitive.
3488 (layout_glyph_string): Pay attentinon to
3489 control->orientation_reversed when padding at the head or tail.
3490 Fix adjustment of space glyph width.
3491 (get_gstring): If cursor_width or cursor_bidi is changed, don't
3494 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
3495 instead of MGlyph->bidi_sensitive.
3497 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
3499 2004-07-26 Kenichi Handa <handa@m17n.org>
3501 * draw.c (visual_order): Don't treat combined glyphs specially.
3502 (layout_glyphs): Don't get metrics glyphs that are already ready.
3503 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
3504 width with the previous one.
3505 (draw_background): Fix bar cursor position on a r2l glyph.
3507 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
3508 (run_rule): Fix place of updating cluster_begin_pos and
3509 cluster_end_pos here.
3510 (run_otf): Don't set left_padding.
3512 * font-ft.c (adjust_anchor): Type of argument `code' changed.
3514 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
3515 Fix handling of GPOS.
3516 (mfont__ft_drive_gpos): Delete this function.
3518 * font.h (mfont__ft_drive_otf): Renamed back from
3519 mfont__ft_drive_gsub.
3520 (mfont__ft_drive_gpos): Delete extern.
3522 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
3523 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
3525 2004-07-23 Kenichi Handa <handa@m17n.org>
3527 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
3528 the same bidi level.
3530 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
3532 2004-07-22 Kenichi Handa <handa@m17n.org>
3534 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
3536 2004-07-20 Kenichi Handa <handa@m17n.org>
3538 * draw.c (render_glyphs): Fix checking of g->code validity.
3540 * face.c (mface__realize): Set g.type.
3542 2004-07-18 Kenichi Handa <handa@m17n.org>
3544 * Makefile.am: Prepend ${top_srcdir} to all *.la in
3547 * m17n-gui.c (mframe): Print error message give by dlopen to
3550 2004-07-16 Kenichi Handa <handa@m17n.org>
3552 * draw.c (compose_glyph_string): Improve the way of deciding a
3553 script. For a character that doesn't have script property, use
3554 the last non-latin script.
3556 * font-ft.c (fc_list): Cancel previous change.
3557 (mfont__ft_init): Add more entries in ft_to_prop_name.
3559 2004-07-15 Kenichi Handa <handa@m17n.org>
3561 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
3562 previous or next character glyphs.
3564 2004-07-14 Kenichi Handa <handa@m17n.org>
3566 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
3567 of type GLYPH_SPACE.
3569 * fontset.c (mfont__lookup_fontset): If glyph type is
3570 GLYPH_SPACE, get codes for SPACE.
3572 * internal-gui.h (Mfont): Delete extern.
3574 * m17n-gui.h (Mfont): Delete duplicated extern.
3576 2004-07-13 Kenichi Handa <handa@m17n.org>
3578 * font-ft.c (DEVICE_DELTA): New macro.
3579 (adjust_anchor): New function.
3580 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
3582 (mfont__ft_drive_gpos): New function.
3584 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
3585 (FontLayoutContext): Delete member `rfont'.
3586 (run_otf): Set g->otf_cmd. Call
3587 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
3588 only whne HAVE_OTF is defined.
3590 * fontset.c: Include "config.h".
3592 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
3593 (MGlyph): New member otf_cmd.
3595 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
3596 (mfont__ft_drive_gpos): Extern it.
3598 * face.c: Include "config.h".
3600 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
3602 * input-gui.c: Include "config.h".
3604 * plist.c: Include "config.h".
3606 2004-07-06 Kenichi Handa <handa@m17n.org>
3608 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
3609 internal-gui.h: Cancel previous changes.
3611 * m17n-gd.h: Delete it.
3613 * Makefile.am (libm17n_core_la_LIBADD): New variable.
3614 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
3615 @XML2_LD_FLAGS@ to above.
3616 (libm17n_la_LIBADD): Add -ldl.
3617 (libm17n_la_LDFLAGS): Add -export-dynamic.
3618 (X_LD_FLAGS): Fix the order of linking.
3619 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
3620 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
3621 (libm17n_X_la_LDFLAGS): Add -module.
3622 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
3623 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3624 (libm17n_gd_la_LDFLAGS): Add -module.
3625 (include_HEADERS): Delete m17n-gd.h.
3627 2004-06-30 Kenichi Handa <handa@m17n.org>
3629 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
3630 (MDeviceLibraryInterface): Delete it.
3631 (register_device_library): Delete it.
3632 (m17n__device_library_list): Renamed from device_library_list.
3634 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
3635 (m17n_init_win): Adjust prototype.
3637 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
3638 (m17n_init_gd): New function.
3640 * m17n-gd.h: New file.
3642 * m17n-X.h: Include <m17n-gui.h>.
3643 (m17n_init_X): Extern it.
3644 (M17N_INIT): Redefine it.
3646 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
3647 (m17n_init_X): New function.
3649 * internal-gui.h (m17n__device_library_list): Extern it.
3650 (struct MDeviceDriver): New members initialized, init, and fini.
3652 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
3654 (libm17n_X_la_LIBADD): Delete aboves.
3655 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
3656 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3657 (libm17n_gd_la_LDFLAGS): Delete it.
3658 (include_HEADERS): Add m17n-gd.h.
3660 2004-06-25 Kenichi Handa <handa@m17n.org>
3662 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
3663 (libm17n_gd_la_LDFLAGS): Cancel previous change.
3665 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
3667 * font-ft.c (fc_list): If FcFontList finds no font, try
3670 * draw.c (compose_glyph_string): Terminate the last loop after
3671 doing default combining if necessary.
3673 2004-06-24 Kenichi Handa <handa@m17n.org>
3675 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
3677 * character.c (mchar_define_property): Add const to an arg.
3679 * charset.c (mchar_define_charset): Add const to an arg.
3681 * coding.c (MCodingSystem): Add const to an arg or decoder.
3682 (finish_decoding): Add const to an arg.
3683 (decode_coding_charset, decode_coding_utf_8)
3684 (decode_coding_utf_16, decode_coding_utf_32)
3685 (decode_coding_iso_2022, decode_coding_sjis)
3686 (mconv_define_coding): Likewise.
3688 * m17n-X.c (xft_find_metric): Delete unused variable.
3690 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
3693 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
3696 * mtext.c (count_utf_8_chars, count_utf_16_chars)
3697 (mtext__from_data, mtext_from_data): Add `const' to an arg.
3699 * mtext.h (mtext__from_data): Ajust prototype.
3701 2004-06-23 Kenichi Handa <handa@m17n.org>
3703 * draw.c (compose_glyph_string): Always get glyph codes by
3705 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
3706 (mdraw_glyph_list): New function.
3708 * font-flt.c (mfont__flt_run): Be sure to call
3709 rfont->driver->encode_char.
3711 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
3712 (ft_encode_char): Delete arg C.
3713 (ft_render): Don't call FT_Get_Char_Index.
3715 * font.c (mfont__encodable_p): Delete it.
3716 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
3718 * font.h (struct MFontDriver): Delete arg C of encode_char.
3719 (mfont__encodable_p): Delete extern.
3721 * m17n-X.c (xfont_encode_char): Delete arg C.
3722 (xft_find_metric): Don't cal FT_Get_Char_Index.
3723 (xft_render): Likewise.
3725 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
3727 (mdraw_glyph_list): Extern it.
3729 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
3731 2004-06-22 Kenichi Handa <handa@m17n.org>
3733 * m17n-gui.h (mfontset_lookup): Extern it.
3735 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
3737 * fontset.c (realize_fontset_elements)
3738 (free_realized_fontset_elements, update_fontset_elements): New
3740 (mfont__realize_fontset): Call realize_fontset_elements.
3741 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
3742 (mfont__lookup_fontset): If a fontset was modified, update
3743 the realized fontset.
3744 (mfontset_modify_entry): Increment fontset->tick.
3745 (mfontset_lookup): New function.
3747 2004-06-21 Kenichi Handa <handa@m17n.org>
3749 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
3751 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
3752 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
3753 length of source text 0.
3755 2004-06-21 Kenichi Handa <handa@m17n.org>
3757 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
3758 (compare): Pay attention to format other than utf-8.
3759 (copy): Delete this function.
3760 (count_by_utf_8, count_by_utf_16, insert): New functions.
3761 (count_utf_16_chars): Fix handling of a surrogate pair.
3762 (find_char_forward, find_char_backward): Likewise.
3763 (mtext__from_data): Delete unnecessary check. Fix number of
3765 (mtext_from_data): Don't count items.
3766 (mtext_ref_char): Optimize the code.
3767 (mtext_set_char): Pay attention to format other than utf-8.
3768 (mtext_cat_char): Likewise.
3769 (mtext_dup): Don't call copy, instead do allocation here.
3770 (mtext_cat): Call insert instead of copy.
3771 (mtext_ncat): Likewise.
3772 (mtext_cpy): Delete character at first and call insert instead of
3774 (mtext_ncpy): Likewise.
3775 (mtext_copy): Likewise.
3776 (mtext_duplicate): Call insert instead of copy.
3777 (mtext_del): Pay attention to format other than utf-8.
3778 (mtext_ins): Simply call insert.
3779 (mtext_ins_char): Pay attention to format other than utf-8.
3780 (mtext_tok): Call insert instead of copy.
3781 (mtext_text): Call UNIT_BYTES.
3783 * textprop.c (mtext__adjust_plist_for_change): New function.
3785 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
3786 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
3787 (CHAR_UNITS_AT): Fix typo.
3788 (CHAR_UNITS_BY_HEAD): Fix typo.
3789 (STRING_CHAR_AND_UNITS): Fix typo.
3791 * internal.h (MTEXT_READ_ONLY_P): New macro.
3793 * mtext.h (mtext__replace): Delete the extern.
3794 (mtext__adjust_foramt): Adjust prototype.
3796 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
3797 if possible. Otherwise make a copy of mmt.
3799 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
3802 2004-06-18 Kenichi Handa <handa@m17n.org>
3804 * character.h (CHAR_STRING_UTF16): Fix syntax.
3806 2004-06-16 Kenichi Handa <handa@m17n.org>
3808 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
3809 (libm17n_X_la_LIBADD): Delete it.
3810 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
3812 * m17n-X.c (device_open): Add parens in `if' condition.
3814 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
3815 (DEC_POSITION): Likewise.
3816 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
3818 2004-06-15 Kenichi Handa <handa@m17n.org>
3820 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
3823 * draw.c (compose_glyph_string): If langauge is specified, call
3824 mface__for_chars even if a text is all latin. Fix condition for
3825 setting non_ascii_found.
3827 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
3829 * m17n.h (minput_char_to_key): Delete extern.
3831 * m17n-gui.h (minput_event_to_key): Cancel previous change.
3833 * m17n-gui.c (null_device_open): Set several members of frame.
3835 2004-06-14 Kenichi Handa <handa@m17n.org>
3837 * m17n-gui.h (minput_event_to_key): Delete extern.
3839 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
3841 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
3843 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
3845 2004-06-08 Kenichi Handa <handa@m17n.org>
3847 * character.c (mchar_put_prop): Don't increment the ref-count of
3850 2004-06-04 Kenichi Handa <handa@m17n.org>
3852 * m17n-core.c (mdebug__register_object): New function.
3853 (mdebug__unregister_object): Likewise.
3855 * internal.h (mdebug__register_object, mdebug__unregister_object):
3857 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
3860 * charset.c (mcharset__load_from_database): Don't call
3861 mconv__register_charset_coding here.
3863 * coding.c (find_coding): Get a real name from an element of
3864 coding_definition_list.
3865 (mconv__register_charset_coding): Set the real name at the top of
3867 (mcoding__load_from_database): Likewise.
3868 (mconv_list_codings): Adjusted for the above change.
3870 2004-06-03 Kenichi Handa <handa@m17n.org>
3872 * coding.c (find_coding): Find by canonicalized name. Don't have
3873 to modify the element of coding_definition_list by
3875 (mconv__define_coding_from_charset): Delete it.
3876 (mconv__register_charset_coding): Canonicalize sym.
3877 (mcoding__load_from_database): Register plist modified by
3880 * coding.h (mconv__define_coding_from_charset): Don't extern it.
3882 * font-ft.c (ft_open): Fix setting of rfont->descent.
3884 2004-06-02 Kenichi Handa <handa@m17n.org>
3886 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
3887 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
3888 (xlfd_unparse_name): Renamed from xfont_build_name.
3889 (mfont__init): Initialized Mfontconfig.
3890 (mfont__free_realized): Unconditionally unref rfont->info.
3891 (mfont__select): Free `this' if it's not best.
3892 (mfont__open): Don't check frame->realized_font_list.
3893 (mfont__parse_name_into_font): New function.
3894 (Mfontconfig): New variable.
3895 (mfont_from_name): Call mfont_parse_name.
3896 (mfont_name): Call mfont_unparse_name.
3897 (mdebug_dump_font): Likewise.
3899 * font.h (struct MFontDriver): Delete members parse_name and
3901 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
3902 (mfont__parse_name_into_font): Extern it.
3904 * font-ft.c: Include "symbol.h".
3905 (close_ft): Unconditionally free filename and charmap_list of
3907 (ft_open): Duplicate base->filename. Increment ref-count of
3908 ft_info->charmap_list. Free ft_info->charmap_list and
3909 ft_info->filename on error.
3910 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
3912 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
3914 (enum xlfd_field_idx): Moved to font.c.
3915 (split_font_name, build_font_name): Likewise.
3916 (build_font_list): Call mfont__parse_name_info_font.
3917 (xfont_open): Call mfont__unparse_name. Free name.
3918 (xfont_parse_name, xfont_build_name): Moved to font.c
3919 (xft_select): Prototype deleted.
3920 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
3921 Call mfont_pase_name.
3923 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
3924 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
3927 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
3930 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
3932 2004-06-01 Kenichi Handa <handa@m17n.org>
3934 * fontset.c (mfontset_modify_entry): Pay attention to the case
3935 that fontset->font_spec_list is NULL.
3937 2004-05-31 Kenichi Handa <handa@m17n.org>
3939 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3941 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3943 * font.c (mfont__select): Print score the a font for debugging.
3945 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
3947 * coding.c (reset_coding_sjis): Check kanji and kana instead of
3948 kanji_sym and kana_sym.
3950 2004-05-28 Kenichi Handa <handa@m17n.org>
3952 * Makefile.am (VINFO): New variable.
3953 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
3954 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
3956 2004-05-27 Kenichi Handa <handa@m17n.org>
3958 The following chanages are to make device dependent functions
3959 accessible only from MDeviceDriver structure, and to add GD and
3960 null device drivers. Font drivers get also device dependent.
3962 * m17n.c (m17n_init): Increament shell_initialized.
3963 (m17n_fini): Decremented shell_initialized.
3965 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
3967 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
3968 (Mwidget, Mcolormap, Mx): Extern them.
3970 * m17n-gui.c: Include <dlfcn.h> and "config.h".
3971 (free_frame): Call frame->driver->close instead of
3973 (DLOPEN_SHLIB_EXT): New macro.
3974 (MDeviceLibraryInterface): New type.
3975 (device_library_list): New variable.
3976 (register_device_library): New function.
3977 (null_device): New variable.
3978 (null_device_close, null_device_get_prop)
3979 (null_device_realize_face, null_device_free_realized_face): New
3981 (null_driver): New variable.
3982 (null_device_init, null_device_fini, null_device_open): New
3984 (null_interface): New variable.
3985 (Mfreetype, Mdevice): Declare them.
3986 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
3987 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
3988 Mwin__Close_Device. Register drivers for Mx and Mgd.
3989 (m17n_fini_win): Decremented win_initialized. Call "fini"
3990 function of all opened devices. Don't call mwin__fini.
3991 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
3993 (mframe): Handle Mdevice key of PLIST.
3994 (mframe_get_prop): Call frame->device->get_prop instead of
3995 mwin__device_get_prop.
3997 * m17n-gd.c: New file.
3999 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
4000 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
4002 * m17n-core.c (m17n_init_core): Increate core_initialized.
4003 (m17n_fini_core): Decremented core_initialized.
4005 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
4006 (Mcolormap): Don't extern them here.
4008 * m17n-X.c (FRAME_DEVICE): New macro.
4009 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
4010 (free_display_info): Use MPLIST_DO.
4011 (free_device): Free rface->info.
4012 (xft_close): Delete it.
4013 (device_init): Renamed from mwin__init.
4014 (device_fini): Renamed from mwin__fini.
4015 (device_open): Renamed from mwin__open_device.
4016 (x_driver): New variable.
4017 (MXFontInfo): Delete member frame, add member display.
4018 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
4019 Don't declare them here.
4021 * internal-gui.h (MDeviceType): New enum.
4022 (MWDefice): Delete it.
4023 (struct MFrame): Change type of device to void *. New members
4024 device_type, driver, font_driver_list.
4025 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
4026 (MDeviceDriver): New type.
4027 (Mx, Mgd, Mfreetype): Extern them.
4028 (mwin__XXX): Delete all of them.
4030 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
4032 (win_destroy_ic): Likewise.
4033 (adjust_window_and_draw): Likewise.
4034 (win_callback): Likewise.
4035 (Mxim): Declare it here.
4036 (minput_event_to_key): Call M_CHECK_READABLE.
4038 * fontset.c (mfont__lookup_fontset): Delete local variable
4041 * font.h (struct MFontDriver): Delete member close, add members
4042 parse_name and build_name.
4043 (mfont__driver_list): Delete extern.
4044 (mfont__close): Delete extern.
4046 * font.c (mfont__init): Don't set mfont__driver_list.
4047 (mfont__fini): Don't unref mfont__driver_list.
4048 (mfont__select): Try font drivers in frame->font_driver_list. Set
4049 driver member of a realized font.
4050 (mfont__close): Delete it.
4051 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
4052 functions of the default frame.
4054 * font-ft.c (close_ft): Check ft_info->ft_face and work
4056 (add_font_info): Allocate ft_info by M17N_OBJECT.
4057 (ft_close): Delete it.
4058 (mfont__ft_driver): Don't set ft_close.
4059 (ft_select): Increment ref-count of best_font.
4060 (ft_open): Decremented ref-count of base. On error, call
4061 FT_Done_Face and free ft_info.
4062 (ft_find_metric): Always use XXX_MONO in load_flags.
4063 (ft_render): Fix setting of width. Call
4064 frame->driver->draw_points instead of mwin__draw_points.
4065 (ft_to_prop): Don't set mfont__driver_list.
4066 (mfont__ft_fini): Just unref ft_info.
4068 * face.c (mface__init): Exchange foreground and background of
4069 mface__default. Call mface_put_prop to set hline of
4071 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
4072 (mface__free_realized): Don't call mwin__free_realized_face.
4074 * draw.c (Mdepth): Don't declare it here.
4075 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
4076 (render_glyphs, render_glyph_string): Likewise.
4077 (mdraw__init): Don't set Mdepth.
4078 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
4080 (mdraw_text_per_char_extents): Return 0 on success and -1 on
4082 (mdraw_text_items): Check FRAME is writable.
4083 (mdraw_per_char_extents): Implement body.
4085 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
4087 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
4088 (GUI_SOURCES): Delete it.
4089 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
4090 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
4091 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
4092 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
4093 (linkgui_LDADD): Set to libm17n-gui.la
4094 (linkgui_LDFLAGS): New target.
4095 (SRC): Include ${libm17n_gui_la_SOURCES} and
4096 ${libm17n_gd_la_SOURCES}.
4098 2004-05-24 Kenichi Handa <handa@m17n.org>
4100 * draw.c (draw_background): Don't draw background even if
4101 rface->face.property[MFACE_BACKGROUND] is not Mnil.
4103 2004-05-22 Kenichi Handa <handa@m17n.org>
4105 * m17n-X.c (xft_open_font): Fix anti_alias setting.
4107 2004-05-20 Kenichi Handa <handa@m17n.org>
4109 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
4111 * m17n-gui.c: Include "plist.h".
4112 (mframe): If PLIST is NULL, initialize it to emply plist.
4114 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
4115 (xft_driver): New variable.
4116 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
4117 (xft_find_metric, xft_render): New function.
4118 (mwin__init): Adjusted for the new mfont__driver_list.
4119 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
4120 generated face to PARAM.
4121 (mwin__realize_face): Fix setting of box colors. Don't call hook
4123 (mwin__draw_hline): New function.
4124 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
4125 (mwin__xft_render): Delete these function.
4127 * internal-gui.h (struct MFrame): New member tick.
4128 (struct MGlyphString): New member tick.
4129 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
4130 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
4131 (mwin__xft_render): Delete extern.
4133 * fontset.c (mfont__lookup_fontset): Make the code simpler.
4134 (mfontset): Always increment the reference count of returned
4137 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
4138 (MFTInfo): Moved to font.h.
4139 (ft_iso8859_1_font_list): Delete this variable.
4140 (set_font_info): Don't set font->property[MFONT_TYPE].
4141 (set_font_info): Don't udpate ft_iso8859_1_font_list.
4142 (add_font_info): Change type to void.
4143 (fc_list): Change anme from xft_list. Caller changed. Include
4144 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
4145 (mfont__ft_driver): Change name from ft_driver. Caller changed.
4146 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
4147 (close_ft): Don't call mwin__xft_close. Unref
4148 ft_info->extra_info.
4149 (ft_open): Don't setup ft_info->fontname. Don't call
4151 (ft_find_metric): Don't call mwin__xft_get_metric.
4152 (ft_encode_char): Call rfont->driver->open instead of ft_open.
4153 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
4154 (mfont__ft_init): Adjusted for new mfont__driver_list.
4155 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
4157 * font.c (mfont__driver_list): Make it MPlist.
4158 (mfont__init): Adjust initialization of mfont__driver_list.
4159 (mfont__fini): Free mfont__driver_list.
4160 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
4161 (mfont__select): Adjusted for the new mfont__driver_list.
4163 * font.h (enum MFontProperty): Delete MFONT_TYPE.
4164 (mfont__drirver_list): Adjust prototype.
4165 (MFTInfo): Move to here from fron.c. Deleve member fontname.
4167 * face.h (struct MFace): Delete member realized_face_list, add
4169 (struct MRealizedFace): Delete member need_update
4170 andnofont_rface, add member non_ascii_list.
4171 (mface__update_frame_face): Extern it.
4173 * face.c (hline_prop_list, box_prop_list, noop_hook): New
4175 (get_hline_create, get_box_create): New functions.
4176 (find_realized_face): Cancel previous change. Arg RFONT deleted.
4178 (free_face): Cancep previous change. Free face->frame_list.
4179 (serialize_hline): Do nothing if hline->width is zero.
4180 (serialize_box): Do nothing if box->width is zero.
4181 (mface__init): Setup all properties of mface__default.
4182 (mface__fini): Free hline_prop_list and box_prop_list.
4183 (mface__realize): Cancel previous change. Update
4184 face->frame_list. Setup rface->non_ascii_list.
4185 (mface__for_chars): Update rface->non_ascii_list.
4186 (mface__free_realized): Free rface->non_ascii_list.
4187 (mface__update_frame_face): New function.
4188 (mface): Initialize face->frame_list.
4189 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
4191 (mface_merge): Likewise.
4192 (mface_put_prop): If key is Mhline or Mbox, get value by
4193 get_hline_create or get_box_create respectively.
4194 (mface_put_prop): Update frame->tick and call
4195 mface__update_frame_face if necessary.
4196 (mface_update): Do nothing if func is noop_hook.
4198 * draw.c (render_glyphs): If a font is not found, use
4199 mwin__draw_empty_boxes.
4200 (alloc_gstring): Initialize gstring->tick.
4201 (get_gstring): Check gstring->tick.
4203 2004-05-17 Kenichi Handa <handa@m17n.org>
4205 * face.c (find_realized_face): Return value changed. If RFONT is
4206 NULL, avoid unnecessary checking.
4207 (free_face): Free face->realized_face_list.
4208 (mface__realize): Adjusted for the change of find_realized_face.
4209 If it returns a realized face that needs update, free it and
4210 realize a new one. Push a new realized face to
4211 frame->realized_face_list instead of appending.
4212 (mface__for_chars): Adjusted for the change of find_realized_face.
4213 Short cut if the required font is in rface->ascii_rface.
4214 (mface_put_prop): Free old value if necessary. Set need_update
4215 member of realized faces to 1.
4217 * face.h (struct MFace): Delete member tick, add member
4219 (struct MRealizedFace): Delete member tick, add member
4222 2004-05-13 Kenichi Handa <handa@m17n.org>
4224 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
4226 2004-05-12 Kenichi Handa <handa@m17n.org>
4228 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
4230 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
4231 parse it XftNameParse.
4233 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
4234 (all_fonts_scaned): New variable.
4235 (set_font_info): FAMILY may be Mnil.
4236 (add_font_info): Argument changed.
4237 (xft_list): Call add_font_info in it.
4238 (ft_list): Likewise.
4239 (ft_select): Make it work in the case family is Mnil.
4240 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
4241 (mfont__ft_fini): Set all_fonts_scaned to 0.
4243 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
4244 that is failed to open.
4246 2004-05-10 Kenichi Handa <handa@m17n.org>
4248 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
4249 device's depth is 1 (i.e. monochrome).
4251 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
4252 to work around the problem of libtool.
4254 * font-ft.c: Include <freetype/ftbdf.h>.
4255 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
4257 (mfont__ft_init): Initialize them.
4258 (ft_iso8859_1_font_list): New variable.
4259 (set_font_info): Detect a font containing iso8859-1 glyphs and
4260 register it in ft_iso8859_1_font_list. If the font is not
4261 scalable, assume it as BDF or PCF font and setup SIZE and RESY
4262 properties of the font from its properties.
4263 (add_font_list): If the font is not scalable, check if it is BDF
4264 or PCF font. If not, ignore it.
4265 (ft_select): If FAMILY is Mnil, return NULL only if the requested
4266 registry is not iso8859-1.
4267 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
4268 ft_iso8859_1_font_list.
4269 (ft_find_metric): If the font is not scalable, assume it as BDF
4270 or PCF, and get a metric from its properties.
4271 (mfont__ft_fini): Free ft_iso8859_1_font_list.
4273 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
4275 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
4276 (libm17n_la_LDFLAGS): Delete it.
4277 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
4278 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
4280 2004-05-06 Kenichi Handa <handa@m17n.org>
4282 * draw.c (compose_glyph_string): Fix previous change.
4284 2004-04-30 Kenichi Handa <handa@m17n.org>
4286 * font-ft.c (ft_list): Delete unused variable `result'.
4287 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
4289 2004-04-27 Kenichi Handa <handa@m17n.org>
4291 * m17n-X.c: Include config.h
4292 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
4293 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
4294 (MWDevice) [HAVE_XFT2]: New member xft_draw.
4295 (FRAME_CMAP, FRAME_VISUAL): New macros.
4296 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
4297 (xfont_driver): Make it static.
4298 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
4299 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
4300 info->xft_color_back.
4301 (MXftFontInfo) [HAVE_XFT2]: New type.
4302 (mwin__xft_close) [HAVE_XFT2]: New function.
4303 (mwin__xft_open) [HAVE_XFT2]: New function.
4304 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
4305 (mwin__xft_render) [HAVE_XFT2]: New function.
4307 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4308 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
4309 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
4312 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4314 * font-ft.c: Don't include FT_FREETYPE_H here.
4315 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
4316 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
4317 (MFTInfo): New member charmap_index.
4318 (MFTInfo) [HAVE_XFT2]: New member xft_info.
4319 (check_otf_filename): Renamed from check_filename. Return value
4321 (ft_set_property): This function deleted.
4322 (set_font_info): New function.
4323 (add_font_list): Argument changed. Add multiple fonts.
4324 (xft_list) [HAVE_XFT2]: New function.
4325 (ft_list) [not HAVE_XFT2]: New function.
4326 (ft_select): Add code for Xft.
4327 (close_ft): Likewise.
4328 (ft_open): Likewise.
4329 (ft_find_metric): Likewise.
4330 (ft_encode_char): Likewise.
4331 (ft_render): Likewise.
4333 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
4335 2004-04-26 Kenichi Handa <handa@m17n.org>
4337 * textprop.c (mtext_attach_property): Declare the return type as
4340 2004-04-21 Kenichi Handa <handa@m17n.org>
4342 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
4344 2004-04-09 Kenichi Handa <handa@m17n.org>
4346 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
4348 (load_command): Setup above members.
4350 2004-04-05 Kenichi Handa <handa@m17n.org>
4352 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
4354 2004-03-30 Kenichi Handa <handa@m17n.org>
4356 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
4359 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
4360 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
4362 2004-03-29 Kenichi Handa <handa@m17n.org>
4364 * Version 1.0 Patch Level 2 released.
4366 2004-03-29 Kenichi Handa <handa@m17n.org>
4368 * charset.c (make_charset): Set charset->fully_loaded and
4369 charset->simple correctly. Don't try to get charset->min_char and
4370 charset->max_char for a charset of method subset and superset.
4371 Don't load a mapping file here.
4372 (mcharset__init): Set unified_max.
4373 (mcharset__load_from_database): Free a working plist.
4375 * coding.c (mcoding__fini): Free all malloced data.
4377 * input-gui.c (win_create_ic): Set control.as_image for preediting
4380 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
4381 `count') to initialize the array.
4383 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
4386 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
4388 (mwin__create_window): Fix bug of setting a background pixel of a
4390 (mwin__adjust_window): Clear the window before drawing.
4392 * m17n-core.c (mdebug__report_object): Free array->objectes if
4394 (m17n_init_core): Don't set report_header_printed to 0 here.
4395 Fix debugging information.
4396 (m17n_fini_core): Set report_header_printed to 0 here.
4398 * m17n-core.h (mplist_deserialize): Extern it.
4400 * m17n-gui.c (m17n_fini_win): Fix debugging information.
4402 * m17n.c (m17n_fini): Fix debugging information.
4404 * mtext.c (mtext__adjust_foramt): New function.
4406 * mtext.h (mtext__adjust_foramt): Extern it.
4408 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
4410 * plist.h (mplist__deserialize): Don't extern it.
4412 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
4413 elements of symbol_table to NULL. Report about created and freed
4414 symbols if MDEBUG_FINI is set.
4416 2004-03-22 Kenichi Handa <handa@m17n.org>
4418 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
4420 * m17n.c (m17n_init): Fix the way of checking merror_code.
4422 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
4424 2004-03-22 Kenichi Handa <handa@m17n.org>
4426 * fontset.c (realize_font_group): Adjust the font size by
4427 mfont__resize before selecting a font.
4429 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
4431 2004-03-19 Kenichi Handa <handa@m17n.org>
4433 * Version 1.0 Patch Level 1 released.
4435 2004-03-19 Kenichi Handa <handa@m17n.org>
4437 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
4439 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
4441 2004-03-19 Kenichi Handa <handa@m17n.org>
4443 Re-apply the changes forgotten in the released version.
4445 * charset.c (mcharset__load_from_database): Call
4446 mchar_define_charset.
4448 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
4449 (mconv_encode_range): Put Mcoding text property.
4451 2004-03-18 Kenichi Handa <handa@m17n.org>
4453 * draw.c (Mdepth): New variable.
4454 (visual_order): Delete unused local var `pos'.
4455 (compose_glyph_string): Fix for the case that gstring->glyphs is
4456 realloced. Stop generating glyphs at TO. Fix handling of
4458 (layout_glyphs): Get metrics of all glyphs in advance. Set
4459 lbearing and rbearing of base of composition glyph correctly.
4460 Handle left-overhang glyphs correctly.
4461 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
4463 (dump_combining_code): Change the defualt off_x character to ".".
4464 (mdraw__init): Initialize Mdepth.
4466 * face.c (work_gstring): New variable
4467 (mface__init): Initialize work_gstring.
4468 (mface__fini): Free work_gstring.glyphs.
4469 (mface__realize): Don't handle videomode property here. Adjusted
4470 for the change of mfont__get_metric.
4471 (mface__for_chars): Adjusted for the change of mfont__get_metric.
4473 * face.h (enum face_gc): Moved to m17n-X.c.
4475 * font.h (struct MFontDriver): Arguments of find_metric changed.
4476 (mfont__select): Prototype adjusted.
4477 (mfont__get_metric): Likewise.
4478 (mfont__ft_drive_otf): Likewise.
4479 (mfont__flt_run): Likewise.
4481 * font.c (mfont__select): New argument layouter. If layouter is
4482 different in the registered font, make a new copy of realized
4484 (mfont__get_metric): Argument changed. Get metrics of multiple
4486 (mfont_find): Call mfont__select with layouter as Mnil.
4488 * font-flt.c (FontLayoutContext): New member rfont.
4489 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
4490 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
4492 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
4494 (NUM_POINTS): New macro.
4495 (MPointTable): New type.
4496 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
4497 (mfont__ft_drive_otf): New argument rfont.
4499 * fontset.c (realize_font_group): Adjusted for the changed of
4501 (check_fontset_element): This function deleted.
4503 * input-gui.c (adjust_window_and_draw): Locate a preedit window
4504 off the parent window if the preedit text is zero length.
4506 * internal-gui.h (struct MFrame): New members foreground,
4507 background, videomode, font.
4508 (struct MGlyphString): New member anti_alias.
4509 (MDrawPoint): New type.
4510 (mwin__draw_bitmap): Prototype deleted.
4511 (mwin__draw_points): Prototype added.
4513 * m17n-gui.h (MDrawControl): New member anti_alias.
4515 * m17n-gui.c (free_frame): Free frame->font.
4516 (mframe): Set the fontset of frame->face to the default fontset.
4518 * m17n-X.c (RGB_GC): New type.
4519 (enum gc_index): Renamed from enum face_gc. Member names changed.
4521 (struct MWDevice): Members foreground and background deleted. New
4522 member scratch_gc, gc_list.
4523 (DEFAULT_FONT, FALLBACK_FONT): New macros.
4524 (free_device): Free GCs in device->gc_list.
4525 (get_rgb_gc): New function.
4526 (get_gc): Renamed and argument changed from get_color.
4527 (get_gc_for_anti_alias): New function.
4528 (xfont_find_metric): Arguments changed. Get metrics of multiple
4530 (set_region): Argument changed. Caller changed.
4531 (xfont_render): Allways set a font in gc.
4532 (x_error_handler, x_io_error_handler): Define only if
4533 X_SET_ERROR_HANDLER is defined.
4534 (mwin__open_device): Create device->scratch_gc. Set members
4535 foreground, background, and videomode of frame. Call
4536 XSetErrorHandler and XSetIOErrorHandler only if
4537 X_SET_ERROR_HANDLER is defined.
4538 (struct gc_list): Deleted.
4539 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
4540 (mwin__realize_face): Adjusted for the change of the format of
4541 rface->info and the charge of set_region.
4542 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
4543 (mwin__draw_box): Likewise.
4544 (mwin__draw_bitmap): This function deleted.
4545 (mwin__draw_points): New function.
4546 (mwin__verify_region): Adjusted for the change of the format of
4547 rface->info and the charge of set_region.
4548 (mwin__create_window): Inherit backgound pixel from parent.
4549 (mwin__dump_gc): Adjusted for the change of the format of
4552 2004-03-16 Kenichi Handa <handa@m17n.org>
4554 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
4556 * input.c (M_key_alias): New variable.
4557 (handle_key): Try M_key_alias property of a key too.
4558 (minput__init): Initialize M_key_alias. Give that property to
4559 symbols in one_char_symbol. Fix bug of initializing
4562 * draw.c (compose_glyph_string): Don't handle
4563 ignore_formatting_char here. Include formatting characters in the
4564 range processed by a FTL.
4565 (layout_glyph_string): Handle ignore_formatting_char here.
4567 2004-03-12 Kenichi Handa <handa@m17n.org>
4569 * input-gui.c (win_create_ic): Enable bidi in status control.
4571 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
4573 2004-03-09 Kenichi Handa <handa@m17n.org>
4575 * input.c (load_input_method): If title is not specified, use the
4576 input method name as title.
4578 * m17n-X.c (get_color): Make it static.
4579 (xim_create_ic, xim_destroy_ic, x_error_handler)
4580 (x_io_error_handler): Likewise.
4582 2004-03-01 Kenichi Handa <handa@m17n.org>
4584 * Version 1.0 released.
4587 Copyright (C) 2003, 2004
4588 National Institute of Advanced Industrial Science and Technology (AIST)
4589 Registration Number H15PRO112
4591 This file is part of the m17n library.
4593 The m17n library is free software; you can redistribute it and/or
4594 modify it under the terms of the GNU Lesser General Public License
4595 as published by the Free Software Foundation; either version 2.1 of
4596 the License, or (at your option) any later version.
4598 The m17n library is distributed in the hope that it will be useful,
4599 but WITHOUT ANY WARRANTY; without even the implied warranty of
4600 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4601 Lesser General Public License for more details.
4603 You should have received a copy of the GNU Lesser General Public
4604 License along with the m17n library; if not, write to the Free
4605 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
4606 Boston, MA 02110-1301, USA.