1 2008-09-25 Kenichi Handa <handa@m17n.org>
3 * input.c (load_macros): Don't parse the action list here.
4 (load_im_info): Parse action lists of all macros.
6 2008-09-24 Kenichi Handa <handa@m17n.org>
8 * m17n-flt.c (mflt_find): Setup coverage of "combining" flt.
10 2008-09-19 Kenichi Handa <handa@m17n.org>
12 * input.c (fully_initialize): Rename "@reload" to "-reload".
14 2008-09-17 Kenichi Handa <handa@m17n.org>
16 * m17n-flt.c (run_stages): Fix combining with a variable width
19 2008-08-04 Kenichi Handa <handa@m17n.org>
21 * input.c (fully_initialize): Add more aliaese (e.g. C-M-1
24 2008-07-22 Kenichi Handa <handa@m17n.org>
26 * input.c (fully_initialize): Fix previous change.
28 2008-07-19 Kenichi Handa <handa@m17n.org>
30 * input.c (fully_initialize): Fix previous change.
32 2008-07-14 Kenichi Handa <handa@m17n.org>
34 * font-ft.c (ft_list_family): New arg CHECK_ALIAS. Callers changed.
36 2008-07-14 Kenichi Handa <handa@m17n.org>
38 * input.c (fully_initialize): Handle C-M-1, etc.
40 2008-07-11 Kenichi Handa <handa@m17n.org>
42 * input.c (minput_open_im): Check if the arg NAME is not Mnil.
44 2008-06-23 Kenichi Handa <handa@m17n.org>
46 * Version 1.5.2 released.
48 2008-06-23 Kenichi Handa <handa@m17n.org>
50 * m17n-core.h (M17NLIB_MINOR_VERSION): Changed to 5.
51 (M17NLIB_PATCH_LEVEL): Changed to 2.
52 (M17NLIB_VERSION_NAME): Changed "1.5.2".
54 2008-06-13 Kenichi Handa <handa@m17n.org>
56 * input.c (minput_config_file): Comment fixed for man-page.
58 2008-06-13 Harshula <harshula@gmail.com> (tiny change)
60 * Makefile.am (libm17n_gd_la_LIBADD): Add @FREETYPE_LD_FLAGS@.
62 2008-05-24 Kenichi Handa <handa@m17n.org>
64 * m17n-flt.c (mdebug_dump_flt): Change return value to (MFLT *).
66 2008-05-23 Kenichi Handa <handa@m17n.org>
68 * Makefile.am (libm17n_gui_la_LIBADD): Include libm17n-core.la.
69 (libm17n_X_la_LIBADD): Include libm17n-core.la, libm17n.la, and
71 (libm17n_gd_la_LIBADD): Likewise.
73 * input.c (take_action_list): Fix debug info.
75 2008-05-14 Kenichi Handa <handa@m17n.org>
77 * m17n-flt.c (run_rule): Check SRC_REGEX at first.
78 (run_stages): Fix index of g_indices.
80 2008-04-03 Kenichi Handa <handa@m17n.org>
82 * draw.c (compose_glyph_string): Don't run flt striding over the
84 (get_gstring): Don't use the cached gstring if cursor position is
87 2008-04-02 Kenichi Handa <handa@m17n.org>
89 * input.c (integer_value): Delete the 3rd arg VALUE.
90 (resolve_expression): Adjust the call of integer_value.
91 (take_action_list): Likewise.
93 2008-03-06 Kenichi Handa <handa@m17n.org>
95 * font-ft.c (ft_drive_otf): Don't ignore the otf-spec to apply all
98 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
100 * Version 1.5.1 released.
102 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
104 * draw.c (mdraw_glyph_list): Refer to mfont__ft_driver only when
105 HAVE_FREETYPE is defined.
107 * font.h (OTF_Tag): Be sure that it is defined in any cases.
109 2008-01-30 Kenichi Handa <handa@ni.aist.go.jp>
111 * font.h (enum MFontOpenTypeTable, MFontCapability): Define them
114 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
116 * input.c (parse_action_list): Handle the case "(insert INTEGER)".
118 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
120 * input.c (parse_action_list): Check M_candidates.
121 (get_im_info): If key is Mnil, be sure to set im_info->states to a
124 2008-01-23 Kenichi Handa <handa@ni.aist.go.jp>
126 * input.c (integer_value): Fix interpretation of "@-N".
128 2008-01-17 Kenichi Handa <handa@ni.aist.go.jp>
130 * input.c (get_following_char): Fix interpretation of POS.
131 (get_following_char): Fix interpretation of "@+N".
133 2008-01-15 Kenichi Handa <handa@ni.aist.go.jp>
135 * font-ft.c (ft_drive_otf): Don't refer to otf_gstring if HAVE_OTF
138 * Makefile.am (FLT_SOURCES): Include internal-flt.h.
140 2008-01-07 Kenichi Handa <handa@ni.aist.go.jp>
142 * m17n-flt.c (UPDATE_CLUSTER_RANGE): Don't check if clustering
144 (run_rule): Call UPDATE_CLUSTER_RANGE when necessary.
145 (run_command): Check if clustering now before calling
146 UPDATE_CLUSTER_RANGE.
148 2008-01-06 Kenichi Handa <handa@m17n.org>
150 * font.c (mfont__get_glyph_id): Return -1 if some code is invalid.
152 * font-ft.c (ft_drive_otf): Fix checking of negative feature.
154 * m17n-X.c (xft_find_metric): Set g->g.measured.
156 * m17n-flt.c (Mequal): New variable.
157 (m17n_init_flt): Initialize it.
158 (FontLayoutCmdRule): Merge members supported_glyph and otf_spec
159 into a new member facility.
160 (load_command): Modify parsing of Mfont_facility.
161 (run_rule): Adjuted for the change of FontLayoutCmdRule.
162 (run_otf): Adjusted metrics if a->back is nonzero.
164 2007-12-28 Kenichi Handa <handa@ni.aist.go.jp>
166 * Version 1.5.0 released.
168 2007-12-13 Kenichi Handa <handa@ni.aist.go.jp>
170 * m17n-core.c (m17n_init_core): Handle the lang. env. MDEBUG_FLT.
172 * m17n-flt.c (mdebug_flag): Set to MDEBUG_FLT.
173 (run_rule): Check if a font has the specific glyph correctly.
175 * internal.h (enum MDebugFlag): Delete MDEBUG_FONT_OTF, change
176 MDEBUG_FONT_FLT to MDEBUG_FLT.
178 * font.c (mfont__get_glyph_id): Encode g->g.code (not g->g.c).
180 * font-flt.c: Delete it.
182 2007-12-08 Kenichi Handa <handa@ni.aist.go.jp>
184 * m17n-flt.c (run_rule): Fix printing of debug info. Don't update
185 TO for the rule of SRC_HAS_GLYPH.
187 * draw.c (run_flt): Argument changed.
188 (compose_glyph_string): Adjusted for the above change.
190 2007-12-07 Kenichi Handa <handa@ni.aist.go.jp>
192 * plist.c (read_mtext_element): Don't free the malloced buffer.
194 2007-12-04 Kenichi Handa <handa@ni.aist.go.jp>
196 * m17n-core.h (merror_code): Extern it.
198 * m17n-misc.h (merror_code): Don't extern it.
200 * m17n.h: Handle the case of _M17N_FLT_H_ being defined.
202 * m17n-flt.h: Handle the case of _M17N_H_ being defined.
204 2007-11-22 Kenichi Handa <handa@ni.aist.go.jp>
206 * draw.c (compose_glyph_string): Check g->rface->layouter, not
207 g->rface->rfont->layouter.
209 * font-ft.c (ft_drive_otf): Fix setting of g->g.from and g->g.to.
211 * m17n-flt.c (FontLayoutContext): New member encoded_offset.
212 (run_rule): Use ctx->encoded_offset.
213 (run_command): Likewise.
214 (run_stages): Set ctx->encoded_offset.
216 2007-11-21 Kenichi Handa <handa@ni.aist.go.jp>
218 * m17n-flt.c (enum GlyphInfoMask): Adjusted for the change of
219 bit-size of MFLTGlyph->internal.
221 2007-11-20 Kenichi Handa <handa@ni.aist.go.jp>
223 * draw.c (visual_order): Exclude the last anchor glyph from the
226 * m17n-flt.h (MFLTGlyph): New member <adjusted>.
228 * m17n-flt.c (run_otf): Set adjusted flag of glyphs if necessary.
229 (run_stages): Likewise.
230 (load_flt): Unref top after checking plist.
232 * m17n-X.c (xft_render): Check adjusted flag of glyphs.
234 2007-11-12 Kenichi Handa <handa@ni.aist.go.jp>
236 * font-ft.c (ft_check_otf): Fix arg to OTF_check_features.
238 * m17n-flt.c (Mcombining): New variable.
239 (Mfont_facility): Renamed from Mfont_has. Referrer changed.
240 (enum FontLayoutCmdRuleSrcType): Delete SRC_EXIST, add
241 SRC_HAS_GLYPH and SRC_OTF_SPEC.
242 (FontLayoutCmdRule): Delete src.exist, add src.supported_glyph and
244 (load_command): Adjusted for the above changes.
245 (run_rule): Likewise.
246 (combining_code_from_class): Delete it.
247 (mflt_get): Check flt->name against Mcombining, not Mt.
249 * internal-flt.h (Mcombining): Extern it.
251 * draw.c (compose_glyph_string): Call run_flt with Mcombining for
252 combining characters.
254 2007-11-09 Kenichi Handa <handa@ni.aist.go.jp>
256 * face.c (mface__realize): Reset measured flag before calling
259 * m17n-flt.c (run_stages): Fix handing of off_x and off_y.
260 (setup_combining_coverage): New function.
261 (setup_combining_flt): New function.
262 (mflt_get): If flt is not found, return NULL. If name if Mt,
263 call setup_combining_flt.
264 (mflt_run): For debugging, print font family name.
266 * font-ft.c (ft_render): Fix handling of baseline_offset.
267 (ft_encapsulate): Set metrics in 26.6 fixed pixel.
268 (ft_render): Check pixel_mode to determine anti_alias.
270 * m17n-X.c (xfont_find_metric): Delete invalid "continue" line.
271 (xfont_find_metric): Set metrics in 26.6 fixed pixel.
272 (xfont_render): Set baseline_offset in pixel.
273 (xft_render): Fix handling of baseline_offset.
275 * draw.c (run_flt): Set font.font.family.
276 (compose_glyph_string): Fix handling of combining characters.
278 * fontset.c (try_font_list): Check if the named flt is surely
281 2007-11-07 Kenichi Handa <handa@ni.aist.go.jp>
283 * draw.c (analyse_bidi_level): New function.
284 (visual_order): Do reordering using the already decided
286 (compose_glyph_string): Decide bidi-level before calling flt.
288 * m17n-flt.c (mflt_run): Fix typo.
290 * font-ft.c (ft_drive_otf): Fix indexing gstring->glyphs.
292 2007-11-06 Kenichi Handa <handa@ni.aist.go.jp>
294 * draw.c (visual_order): Don't rely on the width of glyphs.
295 (run_flt): Fix culculation of g->g.to.
297 * m17n-flt.c (run_rule): Don't set error code here.
298 (run_cond): Likewise.
299 (run_otf): Fix culculation of xoff and yoff.
300 (run_command): Don't set error code here.
304 * m17n-X.c (xfont_open): Keep rfont's metrics in 26.6 fixed pixels.
305 (xfont_find_metric): Set glyph's yadv to 0.
306 (xft_find_metric): Likewise.
308 * font-ft.c (ft_open): Keep rfont's metrics in 26.6 fixed pixels.
309 (ft_find_metric): Adjust glyph's metrics.
310 (ft_encapsulate): Keep rfont's metrics in 26.6 fixed pixels.
311 (ft_drive_otf): Set mark glyph's xadv to 0.
313 * face.c (mface__for_chars): Adjusts the unit of face's ascent and
316 2007-10-29 Kenichi Handa <handa@m17n.org>
318 * m17n-flt.h (struct _MFLTOtfSpec): Adjusted for the new FLT handling.
319 (mflt_get): Adjusted for the argument change.
320 (mflt_name): Adjusted for the return value change.
322 * m17n-flt.c (Mgenerator, Mend): New variables.
323 (flt_min_coverage, flt_max_coverage): New variables.
326 (Mfont_has): Renamed from Mexist. Referrers chagned.
327 (gen_otf_tag): Handle the trailing whitespaces.
328 (otf_count_features, otf_store_features): Fix for negative features.
329 (parse_otf_command): Adjusted for the change of MFLTOtfSpec.
330 (load_otf_command): Likewise.
331 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
332 (load_flt): Argument changed. Caller changed.
333 (free_flt_list): New function.
334 (run_rule): Adjusted for the change of FontLayoutContext.
335 (mflt_run): Adjusted for the change of FontLayoutContext.
337 * m17n-gui.c (m17n_init_win): Call m17n_init_flt.
338 (m17n_fini_win): Call m17n_fini_flt.
340 * m17n-gui.h: Include m17n-flt.h.
342 * m17n-gd.c: Adusted for the change of MGlyph.
344 * m17n-X.c: Adusted for the change of MGlyph.
345 (xft_check_otf, xft_drive_otf): New functions.
347 * internal-gui.h (MGlyph): Modified for new FLT handling.
349 * fontset.c (try_font_list): Adusted for the change of MGlyph.
351 * font-ft.c: Adjusted for the change of MGlyph.
352 (ft_check_cap_otf): Renamed from ft_check_otf. Callers changed.
353 (get_glyph_metric): Deleted.
354 (ft_check_otf): New function.
355 (ft_drive_otf): New fucntion.
357 * font.c: Adjusted for the change of MGlyph.
358 (mfont__init): Don't call mfont__flt_init.
359 (mfont__fini): Don't call mfont__flt_fini.
360 (mfont__get_glyph_id, mfont__get_metrics): New functions.
362 * font.h (struct MRealizedFont): New members x_ppem and y_ppem.
363 (MFLTFontForRealized): New struct.
364 (struct MFontDriver): New members check_otf and drive_otf.
365 (mfont__get_glyph_id, mfont__get_metrics): Extern them.
367 * face.c: Adjusted for the change of MGlyph.
369 * draw.c: Adjusted for the change of MGlyph.
371 * m17n.c (m17n_init): Don't call mchar_init.
373 * m17n-core.c (m17n_init_core): Call mchar_init.
375 * m17n-core.h (mchartable_min_char, mchartable_max_char): Extern them.
377 * input.c: Include "m17n.h" instead of "m17n-gui.h".
379 * chartab.c (mchartable): Initialize table->min_char to -1.
380 (mchartable_min_char): New function.
381 (mchartable_max_char): New function.
383 * Makefile.am (GUI_SOURCES): Delete font-flt.c.
384 (libm17n_gui_la_LIBADD): Add ${top_builddir}/src/libm17n-flt.la.
386 2007-10-12 Kenichi Handa <handa@m17n.org>
388 * m17n-core.h (Mcharset): Extern it.
389 Move detabase related declarations from m17n.h.
391 * m17n-flt.h: Include m17n-core.h instead of m17n.h.
392 (struct _MFLTOtfFeatures): New struct.
393 (struct _MFLTOtfSpec): Delete gsub, gpos, etc, add gsub_gpos.
394 (struct _MFLTFont): Delete otf, add check_otf.
395 (MCHAR_INVALID_CODE): Define it.
397 * plist.c (read_mtext_element): Simplify the code.
399 * m17n.h: Move database related declarations to m17n-core.h
400 (Mharset): Don't extern it.
402 * m17n.c (m17n_init): Don't call mdatabase__init.
404 * m17n-gd.c (read_rgb_txt): Check also /etc/X11/rgb.txt. Downcase
407 * m17n-flt.c: Include m17n-core.h instead of m17n.h.
408 (Mexist): New variable.
409 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
410 (FontLayoutCmdRule): New member src.exist.
411 (parse_otf_command): Handle gsub_count and gpos_count separately.
412 (load_otf_command): Adjusted for the change of MFLTOtfSpec.
413 (load_command): Handle the command "exist".
414 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
415 (run_rule): Handle the case SRC_EXIST.
416 (run_otf): Adjusted for the change of MFLTOtfSpec.
417 (run_command): Check the range of FROM.
418 (check_otf_spec): Delete it.
419 (m17n_init_flt): Call m17n_init_core instead of m17n_init.
421 (m17n_fini_flt): Call m17n_fini_core instead of m17n_fiini.
422 (mflt_find): Call font->check_otf instead of check_otf_spec.
423 (mflt_run): Keep the metrics in 26.6 fixed point.
425 * m17n-core.c (mdatabase__finder, mdatabase__loader): Delete them.
426 (m17n_init_core): Call mdatabase__init.
428 * m17n-X.c (device_open): Use mplist_add, not mplist_push.
430 * internal.h (mdatabase__finder, mdatabase__loader): Delete externs
433 * font-flt.c (Mexist): New variable.
434 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
435 (FontLayoutCmdRule): New member src.exist.
436 (load_category_table): Use isalnum, not isalpha.
437 (load_command): Check the command "exist".
438 (run_rule): Hande the case SRC_EXIST.
439 (run_command): Check the range of FROM.
440 (mfont__flt_init): Initialize Mexist.
442 * draw.c (layout_glyphs): Fix calculation of off_x and off_y.
444 * database.h (mdatabase__load_charset_func): Extern it.
446 * database.c: Include m17n-core.h instead of m17n.h.
447 (load_chartable): Use mtext__from_data.
448 (load_charset): Moved to charset.c
449 (load_database): Call mdatabase__load_charset_func instead of
451 (mdatabase__load_charset_func): New variable.
452 (mdatabase__init): Initialize mdatabase__load_charset_func and
453 Mcharset. Don't set mdatabase__finder and mdatabase__loader.
454 (mdatabase__save): Use fwrite, not mconv_encode_stream.
455 (Mcharset): Declare it here.
457 * charset.c: Include "database.h.".
458 (load_charset): Moved from database.c.
459 (mcharset__init): Initialize mdatabase__load_charset_func, don't
462 * character.c (mchar_define_property): Call mdatabase_find directly.
463 (mchar_get_prop): Call mdatabase_add directly.
464 (mchar_put_prop): Call mdatabase_load directly.
465 (mchar_get_prop_table): Likewise.
467 * Makefile.am (libm17n_core_la_SOURCES): Add database.[ch].
468 (libm17n_la_SOURCES): Remove database.[ch].
469 (libm17n_flt_la_LIBADD): Delete libm17n.la, add libm17n-core.la.
471 2007-09-18 Kenichi Handa <handa@m17n.org>
473 * face.c (mface__realize): Try Freetype based font at first.
475 * font.c: Include <ctype.h>
477 2007-09-16 Kenichi Handa <handa@m17n.org>
479 * m17n-flt.c (load_flt): New arg full. If full is zero, load only
481 (run_otf): Call font->get_metrics, not font->get_metric.
482 (run_stages): Likewise.
483 (CHECK_FLT_COVERAGE): New macro.
484 (CHECK_FLT_STAGES): Call load_flt with the second arg 1.
485 (check_otf_spec): New function.
486 (m17n_fini_flt): Unref flt->coverage.
487 (mflt_find): Argument changed.
488 (mflt_name): New function.
489 (mflt_coverage): Use CHECK_FLT_COVERAGE.
491 * m17n-flt.h (MFLTFont): Member get_metrics renamed from get_metric.
492 (mflt_find): Prototype adjusted.
493 (mflt_name): Extern it.
495 2007-09-14 Kenichi Handa <handa@m17n.org>
497 * m17n-flt.h (struct _MFLTGlyph): Change signedness of members.
499 * font-flt.c (run_otf): Make debug info printing comaptible with
501 (run_command): Likewise.
502 (mfont__flt_run): Likewise.
504 * m17n-flt.c (UPDATE_CLUSTER_RANGE): ctx->cluster_begin_idx is
505 invalid only when it's negative.
507 (run_command): Likewise.
508 (mflt_run): Initialize ctx.cluster_begin_idx to -1.
510 2007-09-10 Kenichi Handa <handa@m17n.org>
512 * m17n-flt.h (struct _MFLTGlyph): New member encoded and measured.
513 (struct _MFLTFont): Prototype of get_glyph_id changed.
515 * m17n-flt.c (enum GlyphInfoMask): Delete EncodedMask and
517 (GAPPEND): Delete this macro.
518 (GET_ENCODED, SET_ENCODED, GET_MEASURED, SET_MEASURED): Adjusted
519 for the change of MFLTGlyph. Caller changed.
520 (run_otf): Simply calls font->get_glyph_id.
521 (run_command): Reset g->encoded and g->measured for direct code.
522 (positioning): Delete this function.
523 (run_stages): Simply calls font->get_glyph_id and font->get_metric.
525 2007-09-07 Kenichi Handa <handa@m17n.org>
527 * draw.c (compose_glyph_string): Improve script detection.
529 2007-09-06 Kenichi Handa <handa@m17n.org>
531 * m17n-flt.h (mflt_get): Extern it.
533 * m17n-flt.c (run_stages): Call positioning only if
534 font->get_metric is non-NULL.
535 (CHECK_FLT_STAGES): Fix typo.
536 (mflt_get): New function.
538 * font-flt.c (mfont__flt_run): Improve debug info printing.
540 2007-09-04 Kenichi Handa <handa@m17n.org>
542 * m17n-flt.c (MFontLayoutTable): Delete this type.
543 (struct _MFLT): New member mdb and coverage.
544 (list_flt): Set flt->mdb.
545 (load_generator): Argument and return value changed. Caller
547 (get_font_layout_table): Delete this function.
548 (run_stages): Argument changed. Caller changed.
549 (CHECK_FLT_STAGES): New macro.
550 (mfont__flt_encode_char): Argument changed.
551 (mflt_find): Likewise.
552 (mflt_coverage): New function.
553 (mflt_run): Argument changed.
554 (mdebug_dump_flt): Likewise.
556 * m17n-flt.h (mflt_coverage): Extern it.
557 (mflt_find): Prototype adjusted.
559 2007-09-03 Kenichi Handa <handa@m17n.org>
561 * internal.h (MTABLE_CALLOC_SAFE, MSTRUCT_CALLOC_SAFE): New macros.
563 * database.c (mdatabase__props): New function.
565 * database.h (mdatabase__props): Extern it.
567 * m17n-flt.h (struct _MFLTGlyphString): Delete user_data, add
569 (struct _MFLTFont): Add suitable_p.
570 (mflt_find): Extern it.
572 * m17n-flt.c: Include "database.h".
573 (struct _MFLT): New struct.
574 (list_flt): New function.
575 (load_flt): Don't update flt_list.
576 (get_font_layout_table): Use flt_list.
577 (m17n_init_flt): Don't initialize flt_list.
578 (m17n_fini_flt): Adjusted for the change of flt_list.
579 (mflt_find): New function.
580 (mflt_run): Fix debug printing.
582 2007-08-23 Kenichi Handa <handa@m17n.org>
584 * m17n-flt.c (run_otf): Remove #ifdef HAVE_OTF and #endi.
585 (run_stages): Print separator in encoded string as "|".
587 2007-08-23 Kenichi Handa <handa@m17n.org>
589 * font-flt.c (mfont__flt_run): Don't calculate a glyph metric if
590 the glyph is already handled by OTF.
592 2007-08-21 Kenichi Handa <handa@m17n.org>
594 * font-ft.c (ft_check_capability): Check cap->script_tag at first.
596 2007-08-20 Kenichi Handa <handa@m17n.org>
598 * font-flt.c (mfont__flt_run): Get glyph metrics before printing
601 2007-08-17 Kenichi Handa <handa@m17n.org>
603 * m17n-flt.h (struct _MFLTGlyphString): Member pointer renamed to
605 (MFLTOtfSpec): Renamed from MFLT_OTF_Spec.
606 (MFLTFont): Prototype of the member drive_otf adjusted.
608 * m17n-flt.c (run_stages): Fix handling of padding.
610 * font-ft.c (get_glyph_metric): New function.
611 (DEVICE_DELTA): Return 26.6 fixed point value.
612 (adjust_anchor): Likewise.
613 (mfont__ft_drive_otf): Use get_glyph_metric.
615 * font-flt.c (mfont__flt_run): Pay attention to padding on
618 2007-08-16 Kenichi Handa <handa@m17n.org>
620 * m17n-flt.c (run_stages): Fix typo.
622 * font-ft.c (adjust_anchor): Argument changed. Calculte based on
624 (mfont__ft_drive_otf): Don't call OTF_check_features for GPOS.
625 Adjusted for the argument change of adjust_anchor. Calculte based
628 2007-08-15 Kenichi Handa <handa@m17n.org>
630 * charset.c (mcharset__load_from_database): Set mdebug_flag
631 instead of mdebug_mask.
633 * coding.c (mcoding__load_from_database): Set mdebug_flag instead
636 * database.c (load_database): Set mdebug_flag instead of
638 (mdatabase__load_for_keys): Likewise.
640 * draw.c: Include "internal-flt.h".
641 (dump_combining_code): Don't subtract 128 from combining code
644 * font-flt.c: Include "internal-flt.h". Set mdebug_flag instead
646 (run_rule): Print debug info only when MDEBUG_FLAG is greater than
648 (run_cond): Likewise.
650 (run_command): Likewise.
651 (mfont__flt_run): Change format of debug info.
653 * font-ft.c: Include "internal-flt.h".
654 Set mdebug_flag instead of mdebug_mask.
655 (mfont__ft_drive_otf): Fix arg to OTF_check_features.
657 * input.c: Set mdebug_flag instead of mdebug_mask.
658 (shift_state): New MDEBUG_FLAG macro.
659 (preedit_commit): Likewise.
662 * internal-flt.h: New file.
664 * internal-gui.h (MAKE_COMBINING_CODE, COMBINING_CODE_OFF_Y)
665 (COMBINING_CODE_OFF_X, COMBINING_CODE_BASE_X)
666 (COMBINING_CODE_BASE_Y, COMBINING_CODE_ADD_X)
667 (COMBINING_CODE_ADD_Y, MAKE_COMBINING_CODE_BY_CLASS)
668 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
669 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P): Move
670 these macros to internal-flt.h.
672 * internal.h (M17N_OBJECT_ADD_ARRAY): Adjusted for the change of
674 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Likewise.
675 (enum MDebugMaskBit): Delete this enum.
676 (enum MDebugFlag): New enum.
677 (mdebug__flag): Don't extern it.
678 (mdebug__flags): Extern it.
679 (MDEBUG_FLAG): New macro.
680 (MDEBUG_PRINT0): Use the macro MDEBUG_FLAG.
681 (MDEBUG_DUMP, MDEBUG_PUSH_TIME, MDEBUG_POP_TIME)
682 (MDEBUG_PRINT_TIME): Likewise.
684 * m17n-X.c (xfont_open): Set mdebug_flag instead of mdebug_mask.
685 (xfont_list): Likewise.
687 * m17n-core.c (mdebug__flag): Delete this variable.
688 (mdebug__flags): New variable.
689 (SET_DEBUG_FLAG): Make it a function.
690 (m17n_init_core): Set mdebug_flag instead of mdebug_mask.
691 (m17n_fini_core): Likewise.
693 * m17n-gui.c (m17n_init_win): Set mdebug_flag instead of mdebug_mask.
694 (m17n_fini_win): Likewise.
696 * m17n-misc.h (enum MErrorCode): Add MERROR_FLT.
698 * m17n.c (m17n_init): Set mdebug_flag instead of mdebug_mask.
699 (m17n_fini): Likewise.
701 * symbol.c (msymbol__free_table): Adjusted for the change of
704 * Makefile.am (BASICBUILDS): Add libm17n-flt.la.
705 (BASICHEADERS): Add m17n-flt.h.
706 (FLT_SOURCES): New variable.
707 (libm17n_flt_la_SOURCES, libm17n_flt_la_LIBADD)
708 (libm17n_flt_la_LDFLAGS): Likewise.
710 * m17n-flt.h: New file.
712 * m17n-flt.c: New file created by modifying font-flt.c.
714 2007-07-13 Kenichi Handa <handa@m17n.org>
716 * Version 1.4.0 released.
718 2007-07-12 Kenichi Handa <handa@m17n.org>
720 * input.c: Fix doxygen @ref commands.
722 2007-07-10 Kenichi Handa <handa@m17n.org>
724 * m17n-core.h (M17NFunc): Fix typo of Doxygen directive.
726 2007-07-09 Kenichi Handa <handa@m17n.org>
728 * m17n-core.h (M17N_BEGIN_HEADER, M17N_END_HEADER): New macros.
730 * m17n.h: Include m17n-core.h if not yet done. Use macros
731 M17N_BEGIN_HEADER and M17N_END_HEADER.
733 * m17n-gui.h: Likewise.
735 * m17n-misc.h: Likewise.
737 2007-06-13 Kenichi Handa <handa@m17n.org>
739 * font-flt.c (load_command): Prepend "^" in the regular expression.
741 2007-06-11 Kenichi Handa <handa@m17n.org>
743 * language.c (mlanguage_name_list): Fix previous change.
745 * coding.c (mcoding__load_from_database): Add aliases in
746 coding_definition_list.
748 2007-06-10 Kenichi Handa <handa@m17n.org>
750 * language.c (mlanguage_name_list): Fix previous change.
752 2007-06-08 Kenichi Handa <handa@m17n.org>
754 * input.c (update_candidate): Copy candidate_list earlier.
755 (re_init_ic): Provide pseudo initialize state if none.
757 2007-06-05 Kenichi Handa <handa@m17n.org>
759 * input.c (preedit_insert): Print debug information.
761 * database.c (expand_wildcard_database): New function.
762 (mdatabase_list): Fix handling of wildcard database.
764 * language.c (load_lang_name): New function.
765 (mlang__fini): Cancel the last two changes.
766 (mlanguage_name_list): New arg script and territories. Use
769 * m17n.h (mlangauge_name_list): Adjusted.
771 2007-06-04 Kenichi Handa <handa@m17n.org>
773 * input.c (open_im): Check if the input method has at least one
776 2007-06-01 Kenichi Handa <handa@m17n.org>
778 * input.c (shift_state): Change the format of debug print.
779 (preedit_commit): New arg need_prefix. Caller changed.
780 (update_candidate): Copy candidate_list.
781 (take_action_list): Likewise.
782 (handle_key): Change the format of debug print.
784 * font-flt.c (load_flt): Ignore unknown directives.
786 2007-05-25 Kenichi Handa <handa@m17n.org>
788 * m17n-core.c (mdebug__unregister_object): Small optimization.
790 * database.c (find_file): Merged into get_database_file.
791 (get_database_file): New arg result. Caller changed.
792 (mdatabase__check): Fix the logic.
794 2007-05-24 Kenichi Handa <handa@m17n.org>
796 * database.c (find_database): If unprocessed wildcard database is
797 found, register database filed and recursively call find_database.
798 (free_db_info): Unref db_info->properties.
799 (register_database): New arg properties. Delete code for
800 initializing mdatabase__list.
801 (register_databases_in_files): Argument changed. Caller changed.
802 (mdatabase__update): Don't list files by glob here.
803 (mdatabase_list): If unprocessed wildcard database is found,
804 register database filed and recursively call mdatabase_list.
806 * database.h (enum MDatabaseStatus): New enum
807 MDB_STATUS_AUTO_WILDCARD.
809 * input.c (load_branch): Fix previous change.
810 (update_global_info): If the global database is not found, return -1.
812 2007-05-23 Kenichi Handa <handa@m17n.org>
814 * database.c (Mversion): New variable.
815 (mdatabase__init): Initialize it.
816 (register_database): New arg properties. Caller changed.
817 (register_databases_in_files): Don't check version here.
818 (mdatabase__update): Likewise.
820 * database.h (MDatabaseInfo): New member properties.
822 2007-05-21 Kenichi Handa <handa@m17n.org>
824 * language.c: Include <ctype.h>
825 (mlanguage__info): Use strncasecmp (not memcmp).
826 (mlanguage_name): Downcase language name for backward
829 * input.c (filter): Don't check Mlanguage property of
832 2007-05-18 Kenichi Handa <handa@m17n.org>
834 * language.c (mlanguage_name): Fix it to handle M-text English
837 * input.c (config_command): Set NAME before using it.
838 (load_branch): Try to resolve a map name by variables.
840 2007-05-17 Kenichi Handa <handa@m17n.org>
842 * language.c (mlang__fini): Fix previous change.
844 2007-05-16 Kenichi Handa <handa@m17n.org>
846 * plist.c (free_plist): Cancel the last change.
847 (write_element): Check if PLIST is nested.
848 (mplist__from_plist): Label a plist as nested if appropriate.
849 (mplist__from_alist): Label a plist as nested.
850 (mplist__conc): Check the value of PL before referring it. Label
851 a plist as nested if appropriate.
852 (mplist_copy): Label a plist as nested if appropriate.
853 (mplist_put_func): Return Mnil if KEY is a managing key.
854 (mplist_push): Label a plist as nested if appropriate.
856 * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
859 * language.c (mlang__fini): Unref each element of langname_list.
861 2007-05-14 Kenichi Handa <handa@m17n.org>
863 * language.c: Include <string.h> and <locale.h>.
864 (langname_list): New variable.
865 (load_lang_script_list): Exclude invalid list elements.
866 (mlang__init): Initialize langname_list.
867 (mlang__fini): Unref langname_list.
868 (mlanguage__info): Adjusted for the change of English
869 name (symbol->M-text).
870 (mlanguage_name): Label it as obsolete.
871 (mlanguage_name_list): New function.
873 * m17n.h (mlanguage_name_list): Extern it.
875 * locale.c (make_locale): Fix setting of members of locale.
877 * plist.c (free_plist): Unref also nested plist.
879 2007-05-11 Kenichi Handa <handa@m17n.org>
881 * coding.c (mconv_reset_converter): Set internal->used to 0.
883 2007-05-08 Kenichi Handa <handa@m17n.org>
885 * input.c (check_description): Force copying the translated text.
887 2007-05-02 Kenichi Handa <handa@m17n.org>
889 * input.c (minput_save_config): Unref unnecessary plist. Use
890 free_im_list to free im_config_list.
892 2007-04-20 Kenichi Handa <handa@m17n.org>
894 * input.c (config_command): Fix previous change again.
895 (config_variable): Likewise.
896 (minput_config_command): Fix for the case of setting back to
898 (minput_config_variable): Likewise.
899 (minput_save_config): Include nil as documentation of customized
902 2007-04-05 Kenichi Handa <handa@m17n.org>
904 * input.c (config_command): Fix previous change.
905 (config_variable): Likewise.
907 * plist.c (mplist_get_func): Fix for backward compatiblity.
909 2007-04-04 Kenichi Handa <handa@m17n.org>
911 * input.c (minput_get_command, minput_config_command): Fix example
914 2007-03-29 Kenichi Handa <handa@m17n.org>
916 These changes are to avoid unsafe casting of a function pointer.
918 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
919 (struct MFace): New member hook.
921 * face.c (serialize_face): Adjusted for the change of MFace.
922 (deserialize_face): Likewise.
923 (mface__init): Likewise. Use msymbol_put_func.
924 (mface__realize): Adjusted for the change of MFace. Avoid
926 (mface_get_prop): Adjusted for the change of MFace.
927 (mface_put_prop): Likewise.
928 (mface_get_hook): New function.
929 (mface_put_hook): New function.
930 (mface_update): Adjusted for the change of MFace.
932 * input-gui.c (win_callback): Use mplsit_get_func.
933 (minput__win_init): Use mplsit_put_func.
935 * input.c (take_action_list): Use mplist_get_func.
936 (init_ic_info): Likewise.
937 (fini_ic_info): Likewise.
938 (minput_callback): Likewise.
939 (minput__init): Use mplist_put_func.
941 * language.c (mlang__init): Use msymbol_put_func.
943 * m17n-core.h (M17NFunc): New function type.
944 (M17N_FUNC): New macro.
945 (msymbol_put_func, msymbol_get_func): Extern them.
946 (mplist_put_func, mplist_get_func): Extern them.
948 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
950 * m17n-gui.c (mframe): Add a proper casting.
952 * plist.h (struct MPlist): Make the member val a union.
953 (MPLIST_VAL): Adjusted for the above change.
954 (MPLIST_FUNC): New macro.
955 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
957 * plist.c (mplist_put_func, mplist_get_func): New functions.
959 * symbol.c (msymbol__fini): Use MPLIST_VAL.
960 (msymbol_put_func, msymbol_get_func): New functions.
962 * textprop.c (mtext_serialize): Use msymbol_get_func.
963 (mtext_deserialize): Likewise.
965 2007-03-28 Kenichi Handa <handa@m17n.org>
967 * input.c (get_candidate_list): Avoid unnecessary unref.
969 2007-03-23 Kenichi Handa <handa@m17n.org>
971 * database.c (mdatabase__update): Unref plist at the tail.
973 2007-03-21 Kenichi Handa <handa@m17n.org>
975 * input.c (update_custom_info): Fix for the case "name == Mnil &&
977 (config_command): Fix for the case that configuration is
979 (config_variable): Likewise.
980 (minput_config_command): If keyseqlist is an empty list, cancel
982 (minput_config_variable) If value is an empty list, cancel the
984 (minput_save_config): Handle cancellation of config and customize
987 2007-03-15 Kenichi Handa <handa@m17n.org>
989 * input.c (minput_config_variable): Check custom->vars (not
992 2007-03-01 Kenichi Handa <handa@m17n.org>
994 * input.c (reload_im_info): Setup cmds, vars, and title of
996 (check_variable_value): Fix the return value.
998 * database.c (mdatabase__check): If necessary, update database and
1001 2007-02-28 Kenichi Handa <handa@m17n.org>
1003 * database.c (get_dir_info): Set dir_info->status to
1004 MDB_STATUS_OUTDATED.
1005 (check_version): New function.
1006 (register_database): Don't call find_database.
1007 (register_databases_in_files): Don't register a database of
1009 (mdatabase__update): Likewise. Avoid unnecessary scanning.
1011 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
1012 and MDB_STATUS_OUTDATED.
1014 * font.h (struct MFont): Types of members type, source, and
1015 spacing changed to unsigned.
1017 * internal-gui.h (struct): Types of members category and type
1018 changed to unsigned.
1020 * internal.h (struct MText): Types of members format and coverage
1021 changed to unsigned.
1023 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
1024 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
1026 2007-02-23 Kenichi Handa <handa@m17n.org>
1028 * input.c (Mpop): New variable.
1029 (fully_initialize): Initialize Mpop.
1030 (parse_action_list): Handle Mpop.
1031 (take_action_list): Likewise.
1032 (handle_key): When a key is unhandled, shift to the initial state
1033 only if the current state has no branch action.
1035 2007-02-12 Kenichi Handa <handa@m17n.org>
1037 * input.c (get_preceding_char): Unref mt if necessary.
1038 (get_following_char): Likewise.
1039 (parse_action_list): Fix handling of `insert' action as
1041 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
1042 (take_action_list): Check invalid candidate list.
1044 2007-02-06 Kenichi Handa <handa@m17n.org>
1046 * input.c (integer_value): Check also ic->produced for @-N.
1048 2007-01-26 Kenichi Handa <handa@m17n.org>
1050 * database.c (mdatabase__update): Check mdatabase__dir_list from
1053 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
1055 2007-01-12 Kenichi Handa <handa@m17n.org>
1057 * input.c (handle_key): Handle a branch action of the initial
1060 2007-01-10 Kenichi Handa <handa@m17n.org>
1062 * m17n-gd.c (gd_render): Delete superfluous line.
1064 2006-12-26 Kenichi Handa <handa@m17n.org>
1066 * m17n.h (minput_callback): Extern it.
1068 * input.h (minput__callback): Delte extern.
1070 * input.c (get_surrounding_text): Adjusted for the change of
1071 minput__callback to minput_callback.
1072 (delete_surrounding_text): Likewise.
1073 (minput_create_ic): Likewise.
1074 (minput_destroy_ic): Likewise.
1075 (minput_filter): Likewise.
1076 (minput_set_spot): Likewise.
1077 (minput_toggle): Likewise.
1078 (minput_reset_ic): Likewise.
1080 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
1081 and ic->candidate_to to 0.
1082 (minput_callback): Renamed from minput__callback.
1084 * input-gui.c (win_callback): Adjusted for the change of
1085 minput__callback to minput_callback.
1087 2006-12-15 Kenichi Handa <handa@m17n.org>
1089 * font-ft.c (ft_add_font): Fix typo.
1091 2006-12-06 Kenichi Handa <handa@m17n.org>
1093 * Version 1.3.4 released.
1095 2006-11-16 Kenichi Handa <handa@m17n.org>
1097 * input.c (parse_action_list): Allow (undo 0).
1098 (adjust_markers): New function.
1099 (preedit_insert, preedit_delete): Call adjust_markers.
1100 (preedit_replace): New function.
1101 (update_candidate): Call preedit_replace instead of preedit_insert
1103 (filter): When ic_info->commit_key_head is nonzero, shift input
1104 event keys even if there's no committed text.
1106 2006-11-10 Kenichi Handa <handa@m17n.org>
1108 * input.h (MInputContextInfo): New member commit_key_head.
1110 * input.c (preedit_commit): Update ic_info->commit_key_head.
1111 (take_action_list): Reset ic_info->commit_key_head on Mundo.
1112 (filter): When committed, shift keys by ic_info->commit_key_head.
1114 2006-10-30 Kenichi Handa <handa@m17n.org>
1116 * input.c (preedit_delete): Fix typo.
1117 (take_action_list): Print more debugging information. Allow
1118 variable in arg of 'select' and `pushback'.
1120 * database.c (gen_database_name): Don't put extra space.
1121 (load_database): Print debugging information.
1122 (register_databases_in_files): New arg headlen. Callers changed.
1123 (mdatabase__load_for_keys): Shorten debugging information.
1124 (mdatabase_load): Don't print debugging information here.
1126 2006-10-27 Kenichi Handa <handa@m17n.org>
1128 * input.c (marker_code): New arg surrounding. Callers changed.
1129 (surrounding_pos): Check if name[0] == '@'.
1130 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
1131 (take_action_list): Likewise.
1132 (get_preceding_char): If POS is zero, always call
1133 get_surrounding_text.
1135 2006-10-19 Kenichi Handa <handa@m17n.org>
1137 * input.c (load_variables): Fix setting of `global'.
1139 2006-10-16 Kenichi Handa <handa@m17n.org>
1141 * draw.c (draw_background): Be sure to set *to_x.
1142 (render_glyph_string): If from == to, just return.
1144 2006-10-18 Kenichi Handa <handa@m17n.org>
1146 * database.c (get_dir_info): Return NULL if the directory name is
1148 (register_databases_in_files): Call register_database with
1150 (mdatabase__update): Fix logic. Call register_database with
1152 (mdatabase_define): Call register_database with
1153 MDB_STATUS_EXPLICIT.
1155 * input.c (delete_surrounding_text): Be sure to set members
1156 preceding_text and following_text to NULL.
1157 (shift_state): Save variable values in ic_info->vars_saved.
1158 (preedit_commit): Don't print debug information here. Don't
1159 change ic_info->keys here.
1160 (get_candidate_list): Don't ref plist.
1161 (take_action_list): Don't unref return value of
1162 get_candidate_list. For undo, reset ic->produced and recover
1163 ic_info->vars. Be sure to set ic->candidate_list to NULL after
1165 (init_ic_info): Set ic_info->vars_saved.
1166 (fini_ic_info): Unref ic_info->vars_saved.
1167 (re_init_ic): Be sure to set ic->candidate_list to NULL after
1169 (filter): Be sure to set members preceding_text and following_text
1170 to NULL. Print debug information about produced text. Delete
1171 processed keys from ic_info->keys.
1173 * input.h (MInputContextInfo): New member vars_saved.
1175 2006-10-16 Kenichi Handa <handa@m17n.org>
1177 * database.c (mdatabase__update): Fix the way to get db_info.
1179 2006-10-02 Kenichi Handa <handa@m17n.org>
1181 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
1182 `size' changed to 24.
1184 * font.c (xlfd_unparse_name): Adjusted for the change of
1186 (font_score): Likewise.
1187 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
1189 * m17n-X.c (MFontX, _MFontX): Deleted.
1190 (SET_SIZE, HAVE_SIZE): Deleted.
1191 (free_display_info): Adjusted for the change of
1192 disp_info->font_list format.
1193 (xfont_registry_list): Likewise.
1194 (xfont_open): Likewise.
1195 (xfont_list): Likewise.
1196 (xfont_encode_char): Ignore size to find a realized font.
1197 (MRealizedFontXft): Change the order of members to make it
1198 compatible with MRealizedFontFT.
1200 2006-09-27 Kenichi Handa <handa@m17n.org>
1202 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
1203 (mfont_close): Add comments.
1205 * mtext-lbrk.c (mtext_line_break): Add comment.
1207 2006-09-26 Kenichi Handa <handa@m17n.org>
1209 * input.c (minput_get_description): Handle description about
1210 inclusion-only input methods.
1212 2006-09-21 Kenichi Handa <handa@m17n.org>
1214 * input.c (M_gettext): New variable.
1215 (fully_initialize): Initialize M_gettext.
1216 (check_description): New function.
1217 (load_commands): Call check_description.
1218 (config_all_commands): Be sure to unref pl.
1219 (load_variables): Call check_description.
1220 (config_all_variables): Be sure to unref pl.
1221 (load_im_info): Call check_description.
1223 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
1225 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
1226 and bind_textdomain_codeset.
1228 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
1230 2006-09-15 Kenichi Handa <handa@m17n.org>
1232 * input.c (reload_im_info): Update custom and global info.
1233 (init_ic_info): Fix previous change.
1235 2006-09-14 Kenichi Handa <handa@m17n.org>
1237 * database.c: Include <libgen.h>.
1238 (mdatabase__lock): Make a directory if necessary.
1240 * input.c (resolve_command): Adjusted for the format change of
1241 configured_cmds member.
1242 (load_commands, load_variables): Fix for errornous data handling.
1243 (config_command, config_variable): New function.
1244 (config_all_commands, config_all_variables): Renamed from
1245 config_commands and config_variables. Utilize the above function.
1246 (check_variable_value): Argument changed. Callers changed.
1247 (load_im_info): Call config_all_commands and config_all_variables.
1248 (init_ic_info): Adjusted for the format change of configured_vars
1250 (minput__init): Initialize Mcustomized, Mconfigured, and
1252 (Mcustomized, Mconfigured, Minherited): New variables.
1253 (minput_get_command): Be sure to return NULL if an input method
1254 use no local command.
1255 (minput_get_variable): Be sure to return NULL if an input method
1256 use no local variable.
1257 (minput_config_command, minput_config_variable)
1258 (minput_save_config): Adjusted for the format change of
1259 configured_cmds and configured_vars members.
1261 * plist.c (write_element): Delete superfluous ':'.
1263 2006-09-13 Kenichi Handa <handa@m17n.org>
1265 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
1266 (minput_config_file): Extern it.
1268 * draw.c (Minherited): Declaration moved to input.c.
1269 (mdraw__init): Don't initialize Minherited here.
1271 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
1273 2006-09-07 Kenichi Handa <handa@m17n.org>
1275 * textprop.c (mtext_serialize): Call mplist__serialize with the
1278 * plist.h (mplist__serialize): Prototype adjusted.
1279 (mplist__assq): Extern it.
1281 * plist.c: Include <ctype.h>
1282 (PUTC, PUTS): New macros.
1283 (write_symbol): New function.
1284 (write_element): New arg indent.
1285 (dump_string, dump_plist_element): Delete them.
1286 (mplist__from_string): New arg pretty.
1287 (mplist__assq): New function.
1288 (mdebug_dump_plist): Use write_element.
1290 * mtext.c (mtext_cat_char): Allocate more memory.
1291 (mdebug_dump_mtext): Don't escal a newline character.
1293 * m17n.h (minput_get_command, minput_get_variable)
1294 (minput_config_command, minput_config_variable)
1295 (minput_save_config): Extern them.
1297 * m17n-core.c: Include <string.h>.
1298 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
1299 use the stream stdout instead of a file of that name.
1301 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
1304 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
1305 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1306 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
1307 (MDEBUG_DUMP): Flush the stream.
1309 * input.h (struct _MInputMethodInfo): Delete member im. New
1310 members mdb, language, name, extra, cmds, configured_cmds,
1311 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
1312 (MInputContextInfo): New member tick.
1314 * input.c: Big change to improve user-side input method
1315 customization. Here, list just public API changes.
1316 (minput_get_commands, minput_get_variables)
1317 (minput_assign_command_keys, minput_set_variable): Label them
1319 (minput_get_command, minput_get_variable)
1320 (minput_config_command, minput_config_variable)
1321 (minput_save_config): New functions.
1323 * database.h (PATH_MAX): Define it if not yet defined.
1324 (PATH_SEPARATOR): Likewise.
1325 (enum MDatabaseStatus): New enum.
1326 (struct MDatabaseInfo): Moved from database.c. New members status,
1327 time, lock_file, and uniq_file.
1328 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
1329 (mdatabase__unlock): Extern them.
1331 * database.c: Include <time.h>.
1332 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
1333 (GEN_PATH): Args changed. Callers changed.
1334 (struct MDatabaseInfo): Moved to database.h.
1335 (struct MDatabase, mdb_list): Deleted.
1336 (mdatabase__list): New var.
1337 (get_database_filename): Deleted. Callers changed to use
1339 (find_file, get_database_file): New files.
1340 (get_dir_info): Initialize new members of MDatabaseInfo.
1341 (find_database): Arg chagnded. Callers changed.
1342 (free_db_info, register_database, register_databases_in_files):
1344 (update_database_list): Deleted.
1345 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
1346 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
1347 (mdatabase__update): New function.
1348 (mdatabase__check): Return value changed.
1349 (mdatabase__file, mdatabase__lock, mdatabase__save)
1350 (mdatabase__unlock): New functions.
1352 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
1354 * input.c (get_surrounding_text): Return -2 when surrounding text
1356 (get_following_char): Likewise.
1357 (get_preceding_char): Likewise.
1358 (minput__callback): Return 0 if there is a callback function,
1361 2006-08-17 Kenichi Handa <handa@m17n.org>
1363 * input.c (reset_ic): Use shift_state to setup the current state.
1365 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
1367 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
1368 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
1369 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
1371 2006-08-02 Kenichi Handa <handa@m17n.org>
1373 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
1375 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
1377 * font-ft.c (ft_encapsulate): Add code for debugging.
1378 (mfont__ft_drive_otf): Be sure to encode character before getting
1381 2006-07-21 Kenichi Handa <handa@m17n.org>
1383 * draw.c (mdraw_text_extents): Fix previous typo.
1385 2006-07-19 Kenichi Handa <handa@m17n.org>
1387 * draw.c (gstring_width): New arg lbearing.
1388 (render_glyph_string): Adjusted for the change of gstring_width.
1389 (mdraw_text_extents): Fix lbearing of ink and line metrics.
1391 * m17n-core.h (Mlanguage): Extern it.
1393 * m17n.h (Mlanguage): Extern deleted.
1395 * mtext.c (mtext__init): Initialize Mlanguage.
1396 (Mlanguage): Declaration moved from locale.c
1398 * locale.c (mlocale__init): Don't initialize Mlanguage here.
1399 (Mlanguage): Declaration moved to mtext.c.
1401 * language.c (mlang__init): Don't initialize Mlanguage here.
1403 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
1405 2006-07-14 Kenichi Handa <handa@m17n.org>
1407 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
1408 (MRealizedFontFT): New member face_encapsulated.
1409 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
1410 (ft_gen_font): New function.
1411 (ft_add_font): Use ft_gen_font.
1412 (ft_list_script): Store lists in ft_script_list.
1413 (ft_check_otf): New arg ft_face. Caller changed.
1414 (ft_check_language): Likewise.
1415 (ft_check_script): Likewise.
1416 (ft_encapsulate, ft_close): New functions.
1417 (mfont__ft_driver): Initialize members encapsulate and close.
1418 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
1420 * font.h (struct MRealizedFont): New member encapsulating.
1421 (struct MFontDriver): New members encapsulate and close.
1423 * font.c (mfont__match_p): If FONT is realized, check capability
1424 by font drivers's check_capability method.
1425 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
1428 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
1429 declarations of foundry and fam local vars.
1430 (xft_driver): Make it static.
1432 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
1433 (mfont_close): Extern them.
1435 * m17n-gd.c (device_open): Don't specify foundry and family of the
1438 2006-07-11 Kenichi Handa <handa@m17n.org>
1440 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
1442 2006-07-13 Kenichi Handa <handa@m17n.org>
1444 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
1446 (ft_check_script): Delete unused var.
1447 (ft_list_capability): Likewise.
1449 * font.c (mfont__get_capability): Setup cap->otf.
1450 (Motf): Make it global.
1451 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
1453 * font.h (MFontCapability): New member otf.
1455 * language.c (mlang__fini): Delete unused vars.
1457 * m17n-gui.h (Motf): Extern it.
1459 * database.c (update_database_list): Delete unused vars.
1461 2006-07-07 Kenichi Handa <handa@m17n.org>
1463 * font-ft.c (DEVICE_DELTA): Fix typo.
1465 2006-07-06 Kenichi Handa <handa@m17n.org>
1467 * fontset.c (mfont__lookup_fontset): Don't ignore family and
1470 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1472 * database.c: Update comments.
1474 2006-07-05 Kenichi Handa <handa@m17n.org>
1476 * database.c (PATH_MAX): Define it if not yet defined.
1477 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
1479 (get_database_filename): Use GEN_PATH.
1480 (get_dir_info): Don't include the last '/' in directory name.
1481 (register_database): New function.
1482 (update_database_list): Use register_database. Search all
1483 directories in mdatabase__dir_list for wildcard databases.
1484 (mdatabase__init): Check "~/.m17n.d".
1486 2006-07-03 Kenichi Handa <handa@m17n.org>
1488 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
1489 push reverse property.
1491 * plist.c (dump_plist_element): Fix previous change.
1493 2006-06-28 Kenichi Handa <handa@m17n.org>
1495 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
1498 * draw.c (MbidiNSM): New variable.
1499 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
1500 attention to bidi type NSM.
1501 (mdraw__init): Initialize MbibiNSM.
1503 * language.c (mscript__char_list): Fix finding a char-list element.
1505 * plist.c (dump_string): Return number of printed characters.
1506 (dump_plist_element): Print elements more compactly.
1508 2006-06-23 Kenichi Handa <handa@m17n.org>
1510 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
1511 (include_HEADERS): Likewise.
1513 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
1515 * language.c: Update documentation.
1517 2006-06-23 Kenichi Handa <handa@m17n.org>
1519 * font-ft.c (struct MFontFT): Delete member lang.
1520 (free_ft_info): Don't unref member lang. Destroy members langset
1522 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
1523 changed. Set members langset and charset.
1524 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
1526 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
1528 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
1529 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
1530 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
1531 characters at first. If it fails, try listing by language names.
1532 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
1533 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
1534 change of MFontCapability.
1535 (ft_list_capability): Likewise. Try listing by languages, then by
1536 scripts. Check OTF at last.
1537 (ft_check_script): New function.
1538 (ft_select): Adjusted for the check of MFontCapability.
1539 (ft_list_family_names): New function.
1540 (ft_check_capability): If cap->script is not Mnil, call
1542 (mfont__ft_driver): Initialize with ft_list_family_names.
1544 * font.h (struct MFontDriver): New member list_fmaily_names.
1545 (struct): Change member "MSymbol *lang" to "MSymbol language".
1547 * font.c: Include "language.h".
1548 (Motf): New variable.
1549 (otf_script_list, load_otf_script_list): Delete it.
1550 (find_script_from_otf_tag): Delete it.
1551 (merge_capability): New function.
1552 (mfont__init): Init Motf.
1553 (mfont__fini): Don't unref otf_script_list.
1554 (free_font_capability): Check cap->script_tag to determine if
1555 OTF-related capability is set.
1556 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
1557 the change of type MFontCapability.
1558 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
1559 and Motf properties.
1560 (mfont_list): Call merge_capability for LANGUAGE arg.
1561 (mfont_list_family_names): New function.
1563 * input-gui.c: Typo in comments fixed.
1565 * input.c: Typo in comments fixed.
1567 * language.h (mlanguage__list): Delete it.
1568 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
1571 * language.c: Include "mtext.h".
1572 (M_script_lang_list): Delete it.
1573 (language_list, script_list): New variables.
1574 (load_lang_script_list, init_language_list, init_script_list): New
1576 (mlang__init): Don't load language database here.
1577 (mlang__fini): Unref language_list and script_list if not NULL.
1578 (mlanguage__list): Delete it.
1579 (mlanguage__info, mscript__info, mscript__char_list)
1580 (mscript__otf_tag, mscript__from_otf_tag): New functions.
1581 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
1582 (mscript_list, mscript_language_list): New functions.
1584 * m17n-gui.h (mfont_list_family_names): Extern it.
1586 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
1587 (mlanguage_text, mscript_list, mscript_language_list): Extern
1590 2006-06-21 Kenichi Handa <handa@m17n.org>
1592 * m17n-X.c (xfont_driver): Initialize with
1593 xfont_list_family_names.
1594 (xfont_list_family_names): New function.
1595 (xft_driver): Initialize with NULL for list_family_names member.
1596 (device_init): Set list_family_names member of xft_driver to that
1597 of mfont__ft_driver.
1599 2006-06-06 Kenichi Handa <handa@m17n.org>
1601 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
1603 2006-03-24 Kenichi Handa <handa@m17n.org>
1605 * font-ft.c (ft_open): Improve debug message.
1607 * fontset.c (mfontset__get_font): Fix for the case that no font in
1608 per_script list is available.
1610 2006-02-06 Kenichi Handa <handa@m17n.org>
1612 * Version 1.3.3 released.
1614 2006-02-22 Kenichi Handa <handa@m17n.org>
1616 * textprop.c: Fix some typos in documentation.
1618 * plist.c: Fix some typos in documentation.
1620 * m17n-core.h: Fix some typos in documentation.
1621 (M17NLIB_PATCH_LEVEL): Updated to 3.
1622 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
1624 * symbol.c: Fix some typos in documentation.
1626 * mtext.c: Fix some typos in documentation.
1628 * input.c: Fix several typos in documentation.
1630 2006-02-06 Kenichi Handa <handa@m17n.org>
1632 * Version 1.3.2 released.
1634 2006-02-03 Kenichi Handa <handa@m17n.org>
1636 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
1637 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
1639 * font.c (xlfd_parse_name): Fix handling of the name "nil".
1641 * draw.c (layout_glyphs): Fix handling left_padding of
1644 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
1646 2006-02-02 Kenichi Handa <handa@m17n.org>
1648 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
1649 if WITH_GUI is true.
1651 2006-01-25 Kenichi Handa <handa@m17n.org>
1653 * input.c (resolve_expression): If the value of PLIST is a plist,
1654 but the first element is not symbol, return 0.
1656 2006-01-17 Kenichi Handa <handa@m17n.org>
1658 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
1659 HAVE_GD is 2 or the greater.
1661 2006-01-16 Kenichi Handa <handa@m17n.org>
1663 * Version 1.3.1 released.
1665 2006-01-16 Kenichi Handa <handa@m17n.org>
1667 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
1668 simulating anti-aliasing.
1670 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
1671 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
1673 2006-01-12 Kenichi Handa <handa@m17n.org>
1675 * input.c (get_surrounding_text): Always pop ic->plist.
1676 (reset_ic): Don't reset ic->plist.
1678 2006-01-10 Kenichi Handa <handa@m17n.org>
1680 * input.c (preedit_commit): For debugging, print only commiting
1681 charactes. Don't set ic->candidate_show to 0.
1682 (handle_key): Don't run branch-actions just by shifting to the
1684 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
1685 Reset vars and plist.
1687 2006-01-07 Kenichi Handa <handa@m17n.org>
1689 * input.c (load_branch): Confirm that maps is not NULL.
1691 2006-01-05 Kenichi Handa <handa@m17n.org>
1693 * input-gui.c (win_filter): Try to convert arg to key only when
1696 * plist.c (read_integer_element): If '#' and '-' are followed by
1697 non-integer-constituent, read them as a part of a symbol.
1698 (read_symbol_element): New arg C.
1699 (read_element): Adjust args to read_symbol_element.
1701 * input.c (load_macros): On overwriting a macro, free the old
1703 (minput__init): Store Mmap in load_im_info_keys.
1704 (minput_get_title_icon): If the input method has no title, be sure
1706 (minput_get_description): If the input method has no description,
1707 be sure to return NULL.
1708 (minput_get_variables): Fix documentation.
1709 (handle_key): Pay attention to the case that key is Mnil.
1710 (filter): Likewise. Fix handling of such symbol as S-A.
1712 2005-12-22 Kenichi Handa <handa@m17n.org>
1714 * Version 1.3.0 released.
1716 2005-12-22 Kenichi Handa <handa@m17n.org>
1718 * font-ft.c (ft_list): If the specified font has no property,
1721 2005-12-20 Kenichi Handa <handa@m17n.org>
1723 * character.c (mchar_get_prop): Check char_prop_list.
1724 (mchar_put_prop, mchar_get_prop_table): Likewise.
1726 2005-12-18 Kenichi Handa <handa@m17n.org>
1728 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
1729 file name sans language.
1731 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
1733 * input.c: Fix typo in comments.
1735 2005-12-14 Kenichi Handa <handa@m17n.org>
1737 * input.c (minput_get_title_icon): Check the default icon for the
1740 2005-12-13 Kenichi Handa <handa@m17n.org>
1742 * input.c (Mless_equal, Mgreater_equal): New variables.
1743 (parse_expression, resolve_expression, parse_action_list)
1744 (take_action_list): Handle the aboves.
1745 (filter): Treat key S-X as X.
1746 (minput__init): Initialize Mless_equal and Mgreater_equal.
1747 (minput_get_title_icon): New function.
1749 * m17n.h (minput_get_title_icon): Extern it.
1751 * database.c (get_database_filename): Return a filename instead of
1753 (load_database): Adjusted for the above change.
1754 (mdatabase__load_for_keys): Likewise.
1755 (mdatabase__find_file): New function.
1757 * database.h (mdatabase__find_file): Extern it.
1759 * font.h (mfont__resize): Delete extern.
1761 * font.c (mfont__list): Check resize ratio.
1762 (mfont__resize): Delete it.
1763 (mfont_resize_ratio): Include the code of mfont__resize.
1765 * font-ft.c (ft_open): Check resize ratio.
1767 * m17n-X.c (xfont_open): Check resize ratio.
1768 (xft_open): Likewise.
1770 2005-12-07 Kenichi Handa <handa@m17n.org>
1772 * input.c (take_action_list): If take_action_list return -1,
1774 (handle_key): Likewise.
1776 * face.c (mface__for_chars): When font is specified and layouter
1777 is found for it, if the layouter doesn't support one of a
1778 character, use a face sans layouter for it.
1780 2005-12-06 Kenichi Handa <handa@m17n.org>
1782 * fontset.c (mfont__lookup_fontset): If only a fallback font is
1783 found, don't use it for more than one character.
1785 2005-12-05 Kenichi Handa <handa@m17n.org>
1787 * face.c (mface__realize): Set rfont->layouter to Mnil.
1788 (mface__for_chars): Fix handling of layouter.
1790 * character.h (mchar__define_prop): Extern it.
1792 * database.c (update_database_list): Call mchar__define_prop if
1795 * character.c (mchar__init): Don't call mchar_define_property.
1796 Instead just initialize property keys.
1797 (mchar__fini): Free char_prop_list only if it's not NULL.
1798 (mchar__define_prop): New function.
1799 (mchar_define_property): Call mchar__define_prop.
1801 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
1804 2005-12-02 Kenichi Handa <handa@m17n.org>
1806 * language.c (mlang__init): Handle extra chars.
1808 * m17n-gui.h (mfont_check): Adjust prototype.
1810 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
1811 (xfont_check_capability): New function.
1812 (xft_driver): Specify xft_check_capability.
1813 (xft_check_capability): New function.
1815 * font-ft.c (M0_3): Delete it.
1817 (ft_get_charmaps): Refer to M0.
1818 (fc_parse_pattern): Fix previous change.
1819 (ft_list_language): Check also extra chars.
1820 (ft_check_otf): Define it even if HAVE_OTF is undef.
1821 (ft_check_lang): Check the result of FcLangSetHasLang against
1822 FcLangDifferentLang. Check also extra chars.
1823 (ft_list_capability): Delete ifdef HAVE_OTF.
1824 (ft_select): Likewise.
1825 (ft_open): Improve debug information.
1826 (ft_check_capability): New function.
1827 (mfont__ft_driver): Specify ft_check_capability.
1828 (mfont__ft_init): Initialize M0.
1830 * fontset.c (get_font_from_group): New function.
1831 (mfontset__get_font): New function.
1833 * fontset.h (mfontset__get_font): Extern it.
1835 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
1836 (mfont__fini): Delete ifdef HAVE_OTF.
1837 (free_font_capability): Likewise.
1838 (mfont__get_capability): Likewise.
1839 (mfont__check_capability): New function.
1840 (mfont_check): Change the order of arguments. Use
1843 * font.h (struct MFontDriver): New member check_capability.
1844 (MFontCapability): Delete ifdef HAVE_OTF.
1845 (mfont__check_capability): Extern it.
1847 * face.c (mface__realize): Fix handling of FONT arg.
1848 (mface__for_chars): Fix handling of explicitly specified font.
1850 2005-11-25 Kenichi Handa <handa@m17n.org>
1852 * font-flt.c (run_command): Print debug info for
1855 * draw.c (layout_glyphs): Fix handling of left/right_padding.
1857 * face.c (mface__for_chars): Check rfont before accessing the
1860 2005-11-21 Kenichi Handa <handa@m17n.org>
1862 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
1865 * fontset.c (fontset_table): New variable.
1866 (free_fontset): Call M17N_OBJECT_UNREGISTER.
1867 (mfont__fontset_init): Add fontset_table as an object array.
1868 (mfont__realize_fontset): Ref FONTSET.
1869 (mfont__free_realized_fontset): Unref REALIZED->fontset.
1870 (mfontset): Call M17N_OBJECT_REGISTER.
1871 (mfontset_copy): Likewise.
1873 * input.c (handle_key): For debugging, print information about
1875 (filter): Add an alias for Meta and Alt modifiers.
1876 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
1878 (minput__init): Initialize them.
1879 (parse_expression): New function.
1880 (resolve_expression): New function.
1881 (parse_action_list): Handle expressions by parse_expression.
1882 (take_action_list): Handle expressions by resolve_expression.
1883 (parse_nested_list_value): Fix previous change.
1884 (resolve_command): Fix handling of the return value of
1887 2005-11-18 Kenichi Handa <handa@m17n.org>
1889 * font-ft.c (ft_check_otf, otf_script_list): Define only when
1890 HAVE_OTF is defined.
1891 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
1893 (ft_select): Likewise.
1895 * font.c (mfont_list): Fix for the case that FONT is NULL.
1896 (OTF_tag): Delete it.
1897 (load_otf_script_list): Define only when HAVE_OTF is defined.
1898 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
1901 * draw.c (truncate_gstring): Be sure to truncate at
1902 glapheme-cluster boundary.
1904 2005-11-11 Kenichi Handa <handa@m17n.org>
1906 * input.c (delete_surrounding_text): Clear cache if necessary.
1908 2005-11-09 Kenichi Handa <handa@m17n.org>
1910 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
1911 glyph prev is also supported by the current flt.
1913 2005-11-08 Kenichi Handa <handa@m17n.org>
1915 * m17n-X.c (xft_render): Cancel previous change.
1917 2005-11-07 Kenichi Handa <handa@m17n.org>
1919 * input.c: Include <stdlib.h>.
1920 (get_surrounding_text, delete_surrounding_text)
1921 (get_preceding_char, get_following_char): New functions.
1922 (integer_value): New arg surrounding. If it is nonzero, try to
1923 get a surrounding character. Callers changed.
1924 (take_action_list): Check `value' before setting an element.
1925 (destroy_ic): Unref ic_info->preceding_text and
1926 ic_info->following_text.
1927 (minput__init): Initialize Minput_get_surrounding_text and
1928 Minput_delete_surrounding_text.
1929 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
1931 (filter): Unref ic_info->preceding_text and
1932 ic_info->following_text.
1934 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
1937 * input.h (MInputContextInfo): New members preceding_text and
1940 2005-11-04 Kenichi Handa <handa@m17n.org>
1942 * input.c (parse_nested_list_value): Fix handling of the global
1944 (get_nested_list): Get global definitions by load_partial_im_info.
1945 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
1946 MInputCandidatesChanged.
1947 (take_action_list): Likewise.
1948 (reset_ic): Likewise.
1949 (create_ic): Don't pay special attention to
1950 Mcandidates_group_size.
1951 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
1952 (minput_set_variable): Get a definition of varible by
1953 mplist_find_by_value, not mplist_get.
1955 * m17n.h (enum MInputCandidatesChanged): New enum.
1957 2005-11-01 Kenichi Handa <handa@m17n.org>
1959 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
1961 (mwin__destroy_window): If xft_draw's drawable is win, change it
1962 to device->drawable before destroying win.
1964 2005-10-31 Kenichi Handa <handa@m17n.org>
1966 * input.c (load_im_info): Fix adding of state.
1968 * m17n-core.c (m17n_fini_core): Fix reporting of module
1971 * m17n.c (m17n_fini): Fix reporting of module finalization.
1973 * m17n-gui.c (m17n_init_win): Fix reporting of module
1976 2005-10-29 Kenichi Handa <handa@m17n.org>
1978 * input.c (get_candidate_list): Fix the timing of referring plist.
1980 2005-10-28 Kenichi Handa <handa@m17n.org>
1982 * input.c (load_branch): Ignore an undefined map name.
1983 (load_im_info): Set im_info->title from `name' only if it's not
1985 (shift_state): Always update ic->status.
1986 (adjust_candidates): Renamed from adjust_candidate_command.
1987 Argument changed. Caller changed.
1988 (get_candidate_list, regularize_action): New functions.
1989 (take_action_list): Use them. On handling Munhandle, don't set
1991 (handle_key): If KEY is not handled by MAP, and MAP has
1992 branch_actions, perform them.
1994 * database.c (mdatabase__fini): Free dir_info->filename;
1996 2005-10-20 Kenichi Handa <handa@m17n.org>
1998 * input.c (marker_code): Accept '@@'.
1999 (integer_value): Handle '@@'.
2000 (parse_action_list): Accept a symbol argument.
2001 (take_action_list): Resolve the symbol argument. Handle the
2004 2005-10-18 Kenichi Handa <handa@m17n.org>
2006 * input.c: Include "charset.h".
2007 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
2009 (MIMState): New member (M17NObject control).
2010 (lookup_nested_list, set_nested_list, parse_nested_list_value)
2011 (get_nested_list, resolve_variable): New functions.
2012 (integer_value): New arg (MPlist **value). Set it to the plist
2013 element containing the value.
2014 (resolve_command): New function.
2015 (load_translation): New arg (MPlist *map_actions).
2016 (load_branch): New args language and name. If `keylist' is a
2017 symbol, resolved that as a command name.
2018 (free_map): New arg top. Free map->map_actions only if top is
2020 (free_state): New function.
2021 (load_state): New arg name.
2022 (im_info_list): New variable.
2023 (free_im_info, get_im_info_by_tags): New functions.
2024 (load_im_info): Arg key changed to plist. Handle `include'.
2025 Return (MInputMethodInfo *).
2026 (preedit_commit): Ref ic->candidate_list.
2027 (get_select_charset, adjust_candidate_command): New functions.
2028 (take_action_list): Handle `include'. Adjust candidate action
2029 properly. Handle control variables `candidates-charset' and
2030 `candidates-group-size'.
2031 (open_im): Use get_im_info.
2032 (create_ic): Get global variables.
2033 (load_partial_im_info): New function.
2034 (get_im_info): New function.
2035 (check_command_keyseq, check_command_list, check_variable_list):
2037 (minput__init): Don't handle M_database_hook and Mdetail_text.
2038 Initialize M_candidates, Mcandidates_group_size,
2039 Mcandidates_charset.
2040 (parse_variable_list, get_variable_list, parse_command_list)
2041 (get_command_list): Delete them.
2042 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
2043 (minput__fini): Simply unref command_list and variable_list.
2044 (minput_get_description): Adjusted for the new form of description.
2045 (minput_get_commands): Use get_nested_list.
2046 (minput_assign_command_keys): Likewise.
2047 (minput_get_variables, minput_set_variable): Likewise.
2049 * input.h (MInputMethodInfo): New members im and maps.
2051 * database.h (M_database_hook): Delete extern.
2052 (MDatabaseHookFunc): Delete extern.
2053 (mdatabase__check): Extern it.
2055 * database.c: Include <glob.h>.
2056 (MAX_TIME): New macro.
2057 (Masterisk): New variable.
2058 (get_database_stream): Argument changed to (MDatabaseInfo *).
2060 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
2061 (find_database): New function.
2062 (update_database_list): New function.
2063 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
2064 calling update_database_list.
2065 (mdatabase__check): New function.
2066 (mdatabase_find): Use update_database and find_database. Don't
2067 handle MDatabaseHookFunc.
2068 (mdatabase_list): Call update_database at first.
2069 (mdatabase_define): Adjusted for the change of mdb->extra_info.
2070 (MDatabaseList): New type.
2072 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
2074 * m17n.h (Mdetail_text): Delete extern.
2076 * m17n-core.h (mplist_conc): Delete extern.
2078 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
2080 (mplist_conc): Renamed to mplist__conc.
2081 (mplist__pop_unref): New function.
2083 2005-10-14 Kenichi Handa <handa@m17n.org>
2085 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
2087 (read_element): If keys is an empty plist, return any element
2089 (dump_plist_element): Check if plist is nested.
2090 (mplist_conc): Always ref tail.
2091 (mplist_set): If key is a managing key, ref val in advance.
2093 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
2094 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
2095 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
2098 * fontset.c (free_fontset): Unref fontset_list if necessary.
2099 (mfont__fontset_fini): Don't free fontset_list. Unref
2101 (mfont__realize_fontset): Initialize request.
2102 (mfontset): Ref default_fontset or fontset only if necessary.
2103 (mfontset_copy): Don't ref copy.
2105 * draw.c (render_glyphs): Check gend->type before checking
2108 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
2109 unrefed plists to NULL.
2111 2005-10-04 Kenichi Handa <handa@m17n.org>
2113 * textprop.c (mtext_serialize): Be sure to make mt
2114 MTEXT_FORMAT_UTF_8 and NULL terminated.
2116 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
2118 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
2120 2005-10-03 Kenichi Handa <handa@m17n.org>
2122 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
2123 is not at the beginning of line.
2125 2005-09-22 Kenichi Handa <handa@m17n.org>
2127 * input.c: Include <sys/stat.h> and <unistd.h>.
2128 (Minclude, Mcommit, Munhandle): New variables.
2129 (minput__init): Initialize them. Push only Mstate to
2130 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
2131 (parse_action_list): Allow integer arg for undo. Handle Mcommit
2133 (load_input_method): Handle "include" directive. If no states are
2135 (shift_state): If state_name is Mt, shift back to the previous
2136 state. Call preedit_commit to commit preedit text.
2137 (preedit_commit): New function.
2138 (take_action_list): Improve debug printing. Handle commit and
2140 (handle_key): Check the return value of take_action_list. Don't
2141 take branch_actions just after changing to the root map.
2142 (reset_ic): Reset all ic_info members.
2143 (filter): When a key is not handled, just move ic_info->keys
2144 instead fo calling reset_ic.
2145 (load_im_info): If key is not Mstate, push Mmap to
2147 (MDatabaseStatList): New type.
2148 (imdir_stat_list): New variable.
2149 (input_method_hook): Don't cancel the hook. Check the
2150 modification time of directories.
2151 (minput__fini): Free imdir_stat_list;
2153 * input.h (MInputContextInfo): New member prev_state.
2155 * m17n-core.h (mplist_conc): Extern it.
2157 * plist.c (mplist_conc): New function.
2159 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
2161 * font.h (MRealizedFont): New member average_width.
2163 * font-ft.c (ft_open): Set rface->average_width.
2165 * font.c (xlfd_unparse_name): Print '*' before registry name.
2167 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
2168 (xfont_open): Set rfont->average_width.
2169 (xft_open): Likewise.
2170 (device_open): Initialize disp_info->AVERAGE_WIDTH.
2172 * internal-gui.h (struct MFrame): New member average_width.
2174 * m17n-gui.c (mframe): Fix setting of frame->rfont.
2175 (mframe_get_prop): Return the average_width of a font.
2177 * face.c (mface__realize): Set rface->average_width.
2178 (mface__update_frame_face): Set frame->average_width.
2180 * face.h (MRealizedFace): New member average_width.
2182 2005-09-19 Kenichi Handa <handa@m17n.org>
2184 * font.c (xlfd_unparse_name): New arg full_xlfd.
2185 (mfont__encode_char): Use shortcut only for X core fonts.
2186 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
2187 (mfont_put_prop): Handle `language' property.
2188 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
2189 Print file can capability info too.
2191 * m17n-core.c (mdebug__output): New variable.
2192 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
2193 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
2194 (m17n_fini_core): Close mdebug__output if it's not stderr.
2196 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
2197 (xfont_open): Handle baseline_offset.
2198 (xfont_find_metric): Likewise.
2199 (xfont_render): Likewise.
2200 (xft_open): Likewise.
2201 (xft_render): Likewise.
2203 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
2204 (mdebug__output): Extern it.
2205 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
2206 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
2207 (MDEBUG_DUMP): New macro.
2208 (MDEBUG_PRINT_TIME): Print to medebug__output.
2210 * font.h (MRealizedFont): New member baseline_offset.
2212 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
2214 (fc_weight_table): Add FC_WEIGHT_REGULAR.
2215 (ft_list_family): Check alias.
2216 (ft_list_language): If language is "en", don't try to the second
2218 (ft_default_list): New variable.
2219 (ft_list_default): New function.
2220 (ft_select): If family is not specified, try only the default
2221 fonts. Treat the weights normal and medium same.
2222 (ft_open): Fix debug message. If registry is not specified, try
2223 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
2224 (ft_find_metric): Likewise.
2225 (ft_render): Likewise.
2226 (ft_list): Fix debug message. Accept the registring iso8859-1.
2227 If family is not specified, try only the default fonts.
2229 * face.c (mface__realize): Fix logic of opening a font.
2231 2005-09-16 Kenichi Handa <handa@m17n.org>
2233 * face.c (mface__realize):
2235 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
2238 * input.c (shift_state): Fix the condition of taking init actions.
2239 (take_action_list): Fix handling of pushback action.
2240 (handle_key): Don't change key while checking its alias.
2241 (minput__init): Initialize new variables.
2242 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
2245 2005-09-12 Kenichi Handa <handa@m17n.org>
2247 * mtext.c (mtext__uppercase): Add proper open/close parens.
2248 (mtext_titlecase): Add proper casting.
2250 * input.c (parse_action_list): Handle the case that the arg is a
2251 key sequence (MText or MPlist).
2252 (take_action_list): Likewise.
2253 (shift_state): Shorter debug message.
2254 (handle_key): Terminate a debug message by "\n".
2255 (reset_ic): Don't take initial actions here.
2256 (minput_open_im): Print a debug message.
2257 (minput_close_im): Likewise.
2258 (minput_create_ic): Likewise.
2259 (minput_destroy_ic): Likewise.
2261 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
2263 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
2266 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
2267 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
2270 * character.c: Add Japanese documentation for
2271 mchar_get_prop_table ().
2273 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
2275 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
2276 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
2277 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
2279 (init_case_conversion): New function.
2280 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
2281 (uppercase_precheck, lowercase_precheck, final_sigma)
2282 (after_soft_dotted, more_above, before_dot, after_i)
2283 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
2285 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
2287 * plist.c (read_mtext_element): Fix previous change.
2289 2005-09-05 Kenichi Handa <handa@m17n.org>
2291 * plist.c (read_mtext_element): Handle \uXXXX notation.
2293 * internal.h (MTABLE_MALLOC): Don't use a local variable.
2294 (MTABLE_ALLOCA): Change the name of local variable.
2296 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
2297 HAVE_FREETYPE are defined.
2299 * m17n-X.c: Check HAVE_X11.
2301 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
2302 directory listing libraries.
2303 (noinst_PROGRAMS): Define it only in maintainer mode.
2305 2005-09-02 Kenichi Handa <handa@m17n.org>
2307 * m17n-gui.h (mdraw_line_break_option): Extern it.
2309 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
2310 end of the first glyph.
2311 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
2313 (mdraw_line_break_option): New variable.
2314 (mdraw_default_line_break): Use mtext_line_break.
2316 * mtext.h (wordseg_func_table): Don't extern it.
2317 (mtext__wseg_fini): Extern it.
2319 * mtext.c: Don't include word-thai.h.
2320 (wordseg_func_table): Delete this variable.
2321 (mtext__init): Don't initialize above. Don't call
2322 mtext__word_thai_init.
2323 (mtext__fini): Don't free wordseg_func_table. Call
2324 mtext__wseg_fini instead fo mtext__word_thai_fini.
2325 (MTextWordsegFunc): Don't typedef it.
2326 (mtext__word_segment): Moved to mtext-wseg.c.
2328 * m17n-core.h (enum MTextLineBreakOption): New enum.
2329 (mtext_line_break): Extern it.
2331 * mtext-wseg.c: New file.
2333 * mtext-lbrk.c: New file.
2335 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
2336 add mtext-lbrk.c and mtext-wseg.c.
2338 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
2339 the case that head is NULL.
2341 2005-09-01 Kenichi Handa <handa@m17n.org>
2343 * word-thai.c (wordseg_propertize): If the property value is nil,
2344 don't make the property no-merge.
2345 (thai_wordseg): Don't require *from and *to are set a priori. Pay
2346 attention to the case that they are NULL.
2347 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
2350 * character.c (mchar_get_prop_table): New function.
2352 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
2354 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
2355 (mchar_get_prop_table): Extern it.
2357 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
2358 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
2360 * internal.h (enum MTextCoverage): New enum.
2361 (MText): New member coverage.
2363 * mtext.c (FORMAT_COVERAGE): New macro.
2364 (insert): Copy mt2->coverage.
2365 (mtext__from_data): Initialize mt->coverage.
2366 (mtext__adjust_format): Update mt->coverage.
2367 (mtext): Initialize mt->coverage.
2368 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
2369 Update mt->coverage if necessary.
2370 (mtext_duplicate): Copy mt->coverage.
2371 (mtext_insert, mtext_replace): New functions.
2372 (mtext_dup): Use mtext_duplicate.
2373 (mtext__word_segment): Don't set *from and *to if a word
2374 segmentation funcion is not found.
2375 (mtext_ins_char): Fix typo.
2377 2005-08-25 Kenichi Handa <handa@m17n.org>
2379 * font.h (MFont): New member for_full_width.
2381 * font.c (compare_font_score): Prefer a font of not
2384 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
2385 registry charset of a font is one of CJK charsets.
2387 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
2388 supports some of CJK.
2390 2005-08-24 Kenichi Handa <handa@m17n.org>
2392 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
2394 * m17n-gui.c (null_device_open): Check Mresolution param and set
2397 * m17n-gd.c (device_open): Check Mresolution param and set
2400 * m17n-X.c (MWDevice): New member resy.
2401 (xfont_open): Set ascent, descent, and max_advance members of
2403 (xft_open): Likewise.
2404 (device_open): Compare also screen_num to find a device. Set
2405 device->resy and frame->dpi.
2407 * internal-gui.h (MFrame): New member dpi.
2409 * font.h (MRealizedFont): New member max_advance.
2411 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
2412 (mfont__init): Don't initialize Mascent, Mdescent.
2413 (Mascent, Mdescent): Delete these variables.
2414 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
2415 Mfont_descent instead of Mascent and Mdescent.
2416 (mfont_put_prop): Allow negative size.
2417 (mfont_find): Handle the case of spec->size < 0. Fix previous
2419 (mfont_list): Handle the case of spec->size < 0.
2420 (mfont_check): Likewise.
2422 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
2423 (fc_get_pattern): Handle the case of font->size < 0.
2424 (ft_open): Set ascent, descent, and max_advance members of rfont.
2425 (ft_find_metric): Improve rounding.
2426 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
2429 * face.c (mface__realize): Handle the case of font->size < 0.
2431 2005-08-22 Kenichi Handa <handa@m17n.org>
2433 * coding.c (MConverterStatus): Change the member buf to union.
2434 (mconv_buffer_converter): Add const to the arg buf.
2435 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2436 (mconv_decode): Adjusted for the change of MConverterStatus.
2437 (mconv_encode_range): Likewise.
2439 * m17n.h (mconv_buffer_converter): Prototype adjusted.
2440 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2442 2005-08-20 Kenichi Handa <handa@m17n.org>
2444 * m17n-gui.h (mfont_from_name): Prototype adjusted.
2445 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
2447 * m17n-X.c (xfont_open): Set members ascent, descent, and
2448 max_advance of rfont.
2449 (xft_open): Likewise.
2451 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
2453 (mfont__ft_parse_name): Add const to the arg name.
2455 * font.c (xlfd_parse_name): Add const to the arg name. Call
2456 mfont__set_property instead of mfont_set_spec. Set font->spacing.
2457 (xlfd_unparse_name): Handle spacing.
2458 (mfont__init): Initialize new variables.
2459 (mfont__id): Handle spacing.
2460 (mfont__merge): Likewise.
2461 (mfont__set_spec): This function deleted.
2462 (mfont__parse_name_into_font): Add const to the arg name. Fix the
2463 condition of calling mfont__ft_parse_name.
2464 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
2465 (mfont_get_prop): Handle properties spacing, ascent, descent,
2467 (mfont_find): Return a realized font.
2468 (mfont_from_name): Add const to the arg name.
2470 * font.h (enum MFontProperty): New member MFONT_SPACING.
2471 (enum MFontSpacing): New enum.
2472 (MFont): New members spacing and max_advance.
2473 (mfont__ft_parse_name): Prototype adjusted.
2474 (mfont__set_spec): Extern deleted.
2475 (mfont__parse_name_into_font): Prototype adjusted.
2477 2005-08-19 Kenichi Handa <handa@m17n.org>
2479 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
2481 * font.c (mfont_list): If FONT is null, use a temporary font.
2482 (mfont_parse_name): Add const to the arg name.
2484 2005-08-18 Kenichi Handa <handa@m17n.org>
2486 * word-thai.c: Surround code by #ifdef and #endif to escape from
2489 * font-ft.c: Mostly re-written.
2491 * font-flt.c (FontLayoutCmdOTF): This type deleted.
2492 (FontLayoutCmd): Type of the member otf changed..
2493 (load_otf_command): Adjusted for the format change of otf command.
2494 (load_command): Likewise.
2495 (free_flt_command): Unref cmd->body.otf.
2496 (run_otf): Ajusted for the type change of otf_cmd.
2497 (run_command): Ajusted for the type change of otf_cmd. On
2498 debugging, print ctx->combining_code.
2499 (mfont__flt_run): Initialize ctx's members code_offset,
2500 combining_code, and left_padding to 0.
2502 * face.h (struct MRealizedFace): New member font.
2503 (mface__realize): Prototype adjusted.
2505 * face.c (find_realized_face): New arg font.
2506 (find_realized_face): Adjusted for the change of MFont.
2507 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
2508 (mface__fini): Don't call mdebug__report_object.
2509 (mface__realize): New arg font.
2510 (mface__for_chars): Adjusted for the change of mfont__encode_char.
2511 Optimize the latin case.
2512 (mface__free_realized): Free rface->font.
2513 (mface__update_frame_face): Adjusted for the change of mface__realize.
2514 (mface_equal): New function.
2516 * draw.c (Mcommon): New variable.
2517 (visual_order): Args to mfont__encode_char changed.
2518 (compose_glyph_string): Handle Mfont text property.
2519 (layout_glyphs): Adjusted for the change of MFont.
2520 (mdraw__init): Initialize Mcommon.
2521 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
2523 * font.h (enum MFontType): Members completely changed.
2524 (enum MFontProperty): Move MFONT_SIZE to the tail.
2525 (enum MFontSource): New enum.
2526 (struct MFont): New members type, source, sizes, file, capability,
2528 (struct MRealizedFont): Type of member font changed. Members
2529 score, status, and encoding deleted.
2530 (MFontScore): New type.
2531 (MFontList): Member changed.
2532 (struct MFontDriver): New member has_char. Types of members
2534 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2535 (Mapple_roman): Extern them.
2536 (OTF_Tag): Typedefed if not HAVE_OTF.
2537 (enum MFontOpenTypeTable): New enum.
2538 (MFontCapability): New type.
2539 (mfont__ft_drive_otf): Prototype adjusted.
2540 (mfont__score): Extern deleted.
2541 (mfont__merge): Extern it.
2542 (mfont__has_char): Extern it.
2543 (mfont__encode_char): Prototype adjusted.
2544 (mfont__open): Extern it.
2545 (mfont__set_spec): Prototype adjusted.
2546 (mfont__get_capability): Extern it.
2548 * font.c: Include "fontset.h".
2549 (M_font_capability, M_font_list, M_font_list_len): New variables.
2550 (font_score_priority): Change order of initial elements.
2551 (font_score_shift_bits): Fix array size.
2552 (common_weight): Add "thin", "semibold", and "heavy".
2553 (common_stretch): Add "ultracondensed", "extracondensed",
2554 "extraexpanded", and "utltraexpand".
2555 (font_weight_regular, font_weight_normal, font_weight_medium): New
2557 (gen_font_name): This function deleted.
2558 (find_encoding): Set font->encoding.
2559 (OTF_tag): New function.
2560 (otf_script_list): New variable.
2561 (load_otf_script_list): New function.
2562 (find_script_from_otf_tag): New function.
2563 (xlfd_parse_name): Set font->type and font->source.
2564 (mfont__free_realized): Free chains rfonts.
2565 (font_score): Renamed from mfont__score.
2566 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2567 (Mapple_roman): New variables.
2568 (mfont__init): Initilize new variables. Initalize
2569 default_encoding.encoding_name and
2570 default_encoding.encoding_charset to Municode_full and
2571 mcharset__unicode. Use SAFE* macros for allocating filepath
2573 (mfont__fini): Free otf_script_list.
2574 (mfont__id): New function.
2575 (mfont__match_p): Check also capability member of MFont.
2576 (mfont__merge): New funciton.
2577 (mfont__set_spec_from_face): Set type and source members.
2578 (mfont__set_spec_from_plist): Set capability and type members.
2579 (mfont__select): Argument changed.
2580 (mfont__available): New function.
2581 (compare_font_score): New function.
2582 (mfont__list): New function.
2583 (mfont__open): Return a realized font.
2584 (mfont__resize): Adjusted for the change of MFont.
2585 (mfont__has_char): New function.
2586 (mfont__encode_char): Argument changed.
2587 (mfont__set_spec): Argument changed.
2588 (free_font_capability): New function.
2589 (mfont__get_capability): New function.
2590 (MFontfile): New variable.
2591 (mfont_get_prop): Adjusted for the change of MFont.
2592 (mfont_put_prop): Likewise.
2593 (mfont_set_selection_priority): Fix the way of setting
2594 font_score_priority[].
2595 (mfont_find): Use mfont__list instead of mfont__select.
2596 (mfont_resize_ratio): Adjusted for the change of MFont.
2597 (mfont_list): Use mfont__list.
2598 (mfont_check): New function.
2599 (font_score): Make it static.
2601 * fontset.h (mfont__realize_fontset): Prototype adjusted.
2602 (mfont__lookup_fontset): Likewise.
2604 * fontset.c (struct MFontset): Delete member font_spec_list.
2605 (struct MRealizedFontset): Type of member spec changed. New
2607 (load_font_group): Arg spec_list deleted.
2608 (load_fontset_contents): Adjusted for the change of fontset_def.
2609 (free_fontset): Fix the way of freeing fontset elements.
2610 (realize_fontset_elements): Argument changed.
2611 (get_per_script): New function.
2612 (free_realized_fontset_elements): Fix the way of feeing rfontset
2614 (update_fontset_elements): Fix args to realize_fontset_elements.
2615 (mfont__realize_fontset): New arg spec.
2616 (try_font_list): New function.
2617 (try_font_group): New arg request. Use try_font_list.
2618 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
2620 (mfontset): Adjusted for the change of MFontset.
2621 (mfontset_copy): Likewise. Don't share plists.
2622 (mfontset_modify_entry): Adjusted for the change of MFontset.
2623 (mfontset_lookup): Call get_per_script.
2624 (mdebug_dump_fontset): Print also the address of fonts.
2626 * input.c (shift_state): Don't reset ic_info->vars.
2627 (take_action_list): Call MDEBUG_PRINT fore calling
2630 * internal-gui.h (MFontDriver): Don't typedef it here.
2632 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
2633 (MXFont): This type deleted.
2635 (struct _MFontX): New struct.
2636 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
2637 (MDisplayInfo): Member base_font_list deleted.
2638 (DEFAULT_FONT): Definition changed.
2639 (FALLBACK_FONT): This maclr deleted.
2640 (free_display_info): Adjusted for the change of MDisplayInfo.
2641 (free_device): Argument to mfont__free_realized changed.
2642 (xfont_driver): Adjusted for the change of MFontDriver.
2643 (xfont_registry_list): Use MFontX instead of MXFont.
2644 (MRealizedFontX): Renamed from MXFontInfo.
2645 (xfont_select): Return the font found first.
2646 (close_xfont): Change MXFontInfo to MRealizedFontX.
2647 (xfont_open): Return the realized font.
2648 (xfont_find_metric): Get xfont from rfont->fontp.
2649 (xfont_has_char): New function.
2650 (xfont_encode_char): Adjusted for the argument change.
2651 (xfont_render): Get xfont from rfont->fontp.
2652 (xfont_list): Adjusted for the argument change.
2653 (MRealizedFontXft): Renamed from MXftFontInfo.
2654 (xft_driver): Ajusted for the change of MFontDriver.
2655 (close_xft): Change MXtfFontInfo to MRealizedFontXft
2656 (xft_open_font): Argument changed.
2657 (xft_open): Argument changed. Return the realized font.
2658 (xft_find_metric): Get xft_font from rfont->fontp.
2659 (xft_has_char, xft_encode_char): New functions.
2660 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
2661 font if not yet opened.
2662 (device_open): Don't set frame->font.
2664 * m17n-gd.c (gd_font_driver): Adjusted for the change of
2666 (gd_font_open): New function.
2667 (gd_render): Don't use the local variable ft_info.
2668 (device_init): Adjusted for the change of gd_font_driver.
2670 * textprop.c (mtext__prop_init): Initialize text_property_table.
2671 Call M17N_OBJECT_ADD_ARRAY.
2672 (mtext__prop_fini): Don't call mdebug__report_object.
2674 * plist.c (mplist__init): Initialize plist_table.
2675 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
2676 (mplist__fini): Don't call mdebug__report_object.
2678 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
2679 (mtext__fini): Don't call mdebug__report_object.
2680 (MTEXT_FORMAT_UTF_16): Correct type.
2681 (mtext_data): New function.
2682 (mtext_text): Fix calculation of limit and args to
2685 * language.c: Include "plist.h".
2686 (M_script_lang_list): New variable.
2687 (mlang__init): Read languages and their information from m17n
2689 (mlanguage__list): New function.
2690 (Miso639_1, Miso639_2): New variables.
2692 * language.h (mlanguage__list): Extern it.
2694 * database.c (get_database_stream): Use SAFE_* macros for
2695 allocating and freeing path.
2696 (mdatabase__init): Likewise.
2698 * symbol.c (msymbol__fini): Don't free symbols here.
2699 (msymbol__free_table): New function.
2700 (msymbol_is_managing_key): New function.
2702 * symbol.h (msymbol__free_table): Extern it.
2703 (msymbol__list): Extern it.
2705 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
2707 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
2708 (struct _M17NObjectArray): New member name and next.
2709 (mdebug__add_object_array): Extern it.
2710 (M17N_OBJECT_ADD_ARRAY): New macro.
2711 (mdebug__report_object): Don't extern it.
2713 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
2715 * m17n-gui.c (free_frame): Don't free frame->font.
2716 (null_device_fini): Fix code for freeing
2717 null_device.realized_font_list.
2718 (m17n_fini_win): Free interface.
2719 (mframe): Cast the return value of dlsym. Set frame->font here.
2720 (mframe_get_prop): Check frame->rface->rfont before accessing the
2723 * m17n-gui.h (Mfontfile): Extern it.
2724 (mfont_check): Extern it.
2725 (mface_equal): Extern it.
2727 * m17n-core.c: Include "symbol.h".
2728 (report_header_printed): This variable deleted.
2729 (object_array_root): New variable.
2730 (report_object_array): New function.
2731 (mdebug__report_object): This function deleted.
2732 (mdebug__add_object_array): New function.
2733 (m17n_init_core): Call mchartable_init () before mtext_init ().
2734 (m17n_fini_core): Call report_object_array (if necessary) and
2735 msymbol__free_atable at the end.
2737 * m17n-core.h (msymbol_is_managing_key): Extern it.
2738 (mtext_data): Extern it.
2739 (MTEXT_FORMAT_UTF_16): Correct type.
2740 (M17NLIB_MINOR_VERSION): Changed to 3.
2741 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
2743 * chartab.c (mchartable__init): Initalize chartable_table.count.
2744 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
2745 mdebug__report_object.
2747 2005-05-26 Kenichi Handa <handa@m17n.org>
2749 * m17n.h (Miso639_1, Miso639_2): Extern them.
2751 * symbol.h (msymbol__list): Extern it.
2753 * symbol.c (msymbol__list): New function.
2755 2005-05-19 Kenichi Handa <handa@m17n.org>
2757 * input-gui.c (minput__win_init): Don't change the value of
2760 2005-05-16 Kenichi Handa <handa@m17n.org>
2762 * m17n-core.c (m17n_object): Be sure to initialize all members.
2764 * font-ft.c (fc_decode_prop): Fix args to msymbol.
2766 2005-05-09 Kenichi Handa <handa@m17n.org>
2768 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
2770 2005-04-27 Kenichi Handa <handa@m17n.org>
2772 * language.c (mlang__init): Add "an" (Aragonese).
2774 * word-thai.c: Add support for libthai.
2775 (mtext__word_thai_init): Initialize wordseg library conditionaly.
2776 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
2778 * mtext.c: Include "word-thai.h" conditionaly.
2779 (mtext__init): Call mtext__word_thai_init conditionaly.
2780 (mtext__fini): Call mtext__word_thai_fini conditionaly.
2782 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
2783 not WORDCUT_LD_FLAGS.
2785 2005-04-19 Kenichi Handa <handa@m17n.org>
2787 * word-thai.c (wordseg_propertize): Always unref the attached
2789 (thai_wordseg): Don't unref the property.
2791 2005-04-18 Kenichi Handa <handa@m17n.org>
2793 * word-thai.c: Include stdlib.h.
2794 (wordseg_propertize): Add dummy function for the case that wordcut
2795 library doesn't exist.
2796 (wordseg_propertize): Fix for old wordcut library.
2798 2005-04-16 Kenichi Handa <handa@m17n.org>
2800 * word-thai.c: Include <stdio.h>.
2802 2005-04-15 Kenichi Handa <handa@m17n.org>
2804 * draw.c: Include mtext.h.
2805 (linebreak_table, M_break_at_space, M_break_at_word)
2806 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
2807 (compose_glyph_string): Check POS before getting Mface text
2809 (truncate_gstring): Give correct TO arg to line_break function.
2810 (GET_LB_TYPE): New macro.
2811 (find_break_backward, find_break_forward): New functions.
2812 (mdraw__init): Initialize the above new variables.
2813 (mdraw__fini): Free linebreak_table.
2814 (mdraw_default_line_break): Use find_break_backward and
2817 * word-thai.c: New file.
2819 * word-thai.h: New file.
2821 * mtext.c: Include word-thai.h.
2822 (wordseg_func_table): New variable.
2823 (mtext__init): Initialize wordseg_func_table and call
2824 mtext__word_thai_init.
2825 (mtext__fini): Call mtext__word_thai_fini, free
2827 (MTextWordsegFunc): New type.
2828 (mtext__word_segment): New function.
2830 * mtext.h (wordseg_func_table): Extern it.
2831 (mtext__word_segment): Extern it.
2833 * m17n.c (m17n_init): Fix typo (== -> =).
2835 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
2836 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
2838 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
2839 (MTEXTPROP_VAL): New macros.
2841 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
2843 2005-04-07 Kenichi Handa <handa@m17n.org>
2845 * database.c (load_chartable): Fix pursing of symbol name.
2847 2005-03-24 Kenichi Handa <handa@m17n.org>
2849 * m17n.c (m17n_init): Fix typo (== -> =).
2851 2005-03-11 Kenichi Handa <handa@m17n.org>
2853 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
2855 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
2857 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
2860 2005-03-09 handa <handa@m17n.org>
2862 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
2863 calling m17n_init ().
2865 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
2866 calling m17n_init_core ().
2868 2005-02-28 Kenichi Handa <handa@m17n.org>
2870 * font-flt.c (mfont__flt_run): Add resulting code sequence in
2873 2005-02-17 Kenichi Handa <handa@m17n.org>
2875 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
2876 (M_description, M_command, M_variable): New variables.
2877 (load_im_info_keys): New variables.
2878 (load_im_info, check_command_keyseq, get_description_advance)
2879 (parse_command_list, get_command_list, parse_variable_list)
2880 (get_variable_list, input_method_hook): New functions.
2881 (command_list, variable_list): New variables.
2882 (minput__init): Put input_method_hook to Minput_method.
2883 Initialize M_description, M_command, M_variable, Mdetail_text,
2884 load_im_info_keys, command_list, variable_list.
2885 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
2886 (Mdetail_text): New variable.
2887 (minput_get_description, minput_get_commands)
2888 (minput_assign_command_keys, minput_get_variables)
2889 (minput_set_variable): New functions.
2891 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
2892 (minput_assign_command_keys, minput_get_variables)
2893 (minput_set_variable): Extern them.
2895 * plist.c (UNGETC): Just decrement st->p.
2896 (read_mtext_element): New arg skip.
2897 (read_integer_element): Likewise.
2898 (read_symbol_element): Likewise.
2899 (read_element): New arg KEYS.
2900 (mplist__from_plist): Don't increment ref-count of NULL object.
2901 (mplist__from_file): New arg KEYS.
2902 (mplist_put): Don't increment ref-count of NULL object.
2903 (mplist_add): Likewise.
2904 (mplist_push): Likewise.
2905 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
2907 * plist.h (mplist__from_file): Prototype adjusted.
2909 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
2910 (get_database_stream): New function.
2911 (load_database): Use get_database_stream.
2912 (M_database_hook): New variable
2913 (mdatabase__init): Initialize M_database_hook.
2914 (mdatabase__load_for_keys): New function.
2915 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
2917 (mdatabase_define): Free mdb->extra_info if necessary.
2919 * database.h (mdatabase__dir_list, M_database_hook)
2920 (mdatabase__load_for_keys): Extern them.
2921 (MDatabaseHookFunc): New type.
2923 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
2925 2004-12-27 Kenichi Handa <handa@m17n.org>
2927 * Version 1.2.0 released.
2929 2004-12-27 Kenichi Handa <handa@m17n.org>
2931 * input.c (minput_filter): Don't reset ic->xxx_changed.
2933 * mtext.c (mtext_from_data): Fix documentation.
2935 2004-12-25 Kenichi Handa <handa@m17n.org>
2937 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
2938 (M17NLIB_VERSION_NAME): Update to "1.2.".
2940 2004-12-24 Kenichi Handa <handa@m17n.org>
2942 * input.c (reset_ic): Set key_unhandled to 0.
2944 2004-12-21 Kenichi Handa <handa@m17n.org>
2946 * m17n-gui.h (mfont_from_spec): Delete extern.
2948 * input-gui.c (win_callback): Handle Minput_reset.
2949 (minput__win_init): Register reset_ic as a callback for
2952 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
2953 changed. At first, shift to the initial state.
2954 (minput__init): Initialize Minput_reset. Register reset_ic as a
2955 callback for Minput_reset.
2956 (Minput_reset): New variable.
2957 (minput_filter): Always set ic->xxx_changed to 0.
2958 (minput_reset_ic): New function.
2959 (integer_value): Fix typo ('>' -> '<') and calculation of length
2962 * m17n-core.c (merror_code): Change type to `int'.
2964 * m17n-misc.h (merror_code): Adjust type.
2966 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
2968 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
2969 (mtext_change_prop): Delete extern.
2971 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
2972 to `int'. Move the documents to m17n-core.h.
2974 2004-12-13 Kenichi Handa <handa@m17n.org>
2976 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
2977 (MTextProperty): Document it.
2979 2004-12-09 Kenichi Handa <handa@m17n.org>
2981 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
2983 2004-12-03 Kenichi Handa <handa@m17n.org>
2985 * internal.h (m17n__core_initialized, m17n__shell_initialized,
2986 m17n__gui_initialized): New externs.
2988 * m17n-core.h (enum M17NStatus): New enum.
2989 (m17n_status): Extern it.
2991 * m17n-core.c (core_initialized): Delete this variable.
2992 (m17n__core_initialized, m17n__shell_initialized,
2993 m17n__gui_initialized): New variables.
2994 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
2995 instead of core_initialized.
2996 (m17n_status): New function.
2998 * m17n.c (shell_initialized): Delete this variable.
2999 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
3002 * m17n-gui.h (m17n_init_win): Adjust the prototype.
3004 * m17n-gui.c (win_initialized): Delete this variable.
3005 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
3006 instead of gui_initialized.
3008 2004-11-19 Kenichi Handa <handa@m17n.org>
3010 * input.c (reset_ic): Check if ic_info->state is NULL.
3011 (filter): If ic_info->state is NULL, return 0.
3012 (load_input_method): Don't unref `maps' it it's not created.
3014 2004-11-15 Kenichi Handa <handa@m17n.org>
3016 * input.c (find_candidates_group): If INDEX is -1, find the last
3018 (take_action_list): If the previous of the first candidate is
3019 requested, select the last candidate.
3021 2004-11-08 Kenichi Handa <handa@m17n.org>
3023 * m17n-X.c (device_open): Try at most 32 fonts to find a
3024 non-autoscaled font.
3026 * font.c (xlfd_parse_name): Fix previous change.
3028 2004-11-05 Kenichi Handa <handa@m17n.org>
3030 * font.c: (commont_style): Include dummy elements "slanted" and
3031 "rslanted" to prefer "o" to "r" if "i" is requested.
3033 * font-ft.c (ft_to_prop): Fix "oblique" entry.
3035 2004-10-29 Kenichi Handa <handa@m17n.org>
3037 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
3039 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
3040 New members smallest and larger.
3041 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
3042 (xfont_registry_list): Likewise.
3043 (xfont_select): Likewise.
3046 2004-10-28 Kenichi Handa <handa@m17n.org>
3048 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
3049 font name comparison.
3050 (xfont_select): Fix logic for selecting a larger size font.
3052 2004-10-25 Kenichi Handa <handa@m17n.org>
3054 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
3057 2004-10-22 Kenichi Handa <handa@m17n.org>
3059 * input.c (update_candidate): Renamed from udpate_candidate.
3060 (take_action_list): Show more debugging info on arithmetic commands.
3062 * m17n-X.c (device_open): Fix previous change.
3064 * draw.c (compose_glyph_string): Don't get face property at the
3067 2004-10-21 Kenichi Handa <handa@m17n.org>
3069 * draw.c (compose_glyph_string): Fix for the case of category
3072 2004-10-19 Kenichi Handa <handa@m17n.org>
3074 * input.c (mdebug_mask): New variable.
3075 (shift_state): Print debug information.
3076 (take_action_list): Likewise.
3077 (handle_key): Likewise.
3079 2004-10-14 Kenichi Handa <handa@m17n.org>
3081 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
3083 2004-10-13 Kenichi Handa <handa@m17n.org>
3085 * m17n-X.c (device_open): Be sure to register at least one font
3088 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
3089 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
3091 2004-10-12 Kenichi Handa <handa@m17n.org>
3093 * draw.c (alloc_gstring): Fix previous change.
3095 * font-ft.c (ft_list_generic): Fix for the case of not
3098 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
3100 * font.c (mfont_list): If no font is found, return NULL.
3101 (load_font_encoding_table): Put entries of nil registry first.
3102 (find_encoding): Adjust for the above change.
3104 2004-10-11 Kenichi Handa <handa@m17n.org>
3106 * m17n-gui.h (mfont_list): Adjust prototype.
3108 * m17n-X.c (xfont_list): New arg maxnum.
3110 * font.h (struct MFontDriver): Change prototype of <list>.
3112 * font-ft.c (fc_generic_family_list): Delete it.
3113 (Mserif, Msans_serif, Mmonospace): Delete them.
3114 (M_generic_family_info): New variable.
3115 (enum GenericFamilyType): New enum.
3116 (struct GenericFamilyInfo): New struct.
3117 (generic_family_table): New variable.
3118 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
3120 (add_font_info): Get style here.
3121 (ft_list_family): Don't initialize fc_config here. Don't list
3123 (ft_list_generic): New function.
3124 (ft_select): Pay attention to generic familes here.
3125 (ft_open): Fix calculation of ascent and descent.
3126 (ft_list): Pay attention to generic families.
3127 (mfont__ft_init): Initialize M_generic_family_info,
3128 generic_family_table, and fc_config..
3129 (mfont__ft_fini): Finalize generic_family_table.
3131 * draw.c (compose_glyph_string): Use more constant font for
3132 glyphs. Adjust for the member change in MGlyph.
3133 (layout_glyph_string): Adjust for the member change in MGlyph.
3134 (alloc_gstring): Intilize scracth_glyph to avoid
3135 compose_glyph_string on it.
3136 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
3137 (mdraw_coordinates_position): Fix previous change.
3139 * internal-gui.h (glyph_category): New enum.
3140 (MGlyph): Change type of <category> to enum glyph_category.
3142 * face.c (mface__realize): Delete args langauge and charset.
3143 (mface__for_chars): Fix for the case that glyphs have different
3145 (mface__update_frame_face): Adjust for mface__realize change.
3147 * face.h (mface__realize): Adjust prototype.
3149 2004-10-05 Kenichi Handa <handa@m17n.org>
3151 * language.c (mlang__init): Add Akan.
3153 2004-10-04 Kenichi Handa <handa@m17n.org>
3155 * font-ft.c (add_font_info): Add instead of push the element.
3156 (ft_list_family): For generic fonts, try all
3157 substituted. families.
3159 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
3160 (run_rule): Don't update cluster range here.
3161 (run_command): Update cluster range on appending a glyph.
3162 (run_otf): Update cluster range for glyphs generated by OTF.
3164 2004-10-02 Kenichi Handa <handa@m17n.org>
3166 * m17n-X.c (device_open): Handle Mfont key in PLIST.
3168 2004-09-30 Kenichi Handa <handa@m17n.org>
3170 * font-ft.c (ft_select): Ignore family on calling mfont__score.
3172 2004-09-30 Kenichi Handa <handa@m17n.org>
3174 * font.h: Include <fontconfig/fontconfig.h>.
3175 (MFTInfo): New member langset.
3176 (mfont__encoding_list): Extern it.
3178 * font.c (mfont__encoding_list): New function.
3179 (mdebug_dump_font_list): New function.
3181 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
3182 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
3184 (ft_family_list): New variable.
3185 (set_font_info): New arg basep. Callers changed.
3186 (fc_list): Check the return value of FcPatternGetString.
3187 (add_font_info): New arg plist. Callers changed. Update
3189 (ft_list_family): New function (merged fc_list and ft_list_all).
3190 (ft_select): Use ft_list_family.
3191 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
3193 (mfont__ft_init): Initialize above new variables.
3194 (mfont__ft_fini): Free ft_family_list.
3195 (STRDUP_LOWER): New macro.
3196 (set_font_info): Use STRDUP_LOWER.
3197 (ft_list_family): Avoid duplicate addition of font path. Use
3199 (fc_decode_prop): Fix typo.
3201 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
3202 (xfont_registry_list): Change argument disp_info to frame.
3204 (xfont_list_all): New function.
3205 (xfont_list): If FONT is not NULL, check all fonts.
3207 2004-09-28 Kenichi Handa <handa@m17n.org>
3209 * m17n-X.c (MXFont, MXFontList): New types.
3210 (MDisplayInfo): Delete members font_registry_list,
3211 iso8859_1_family_list, iso10646_1_family_list, new members
3212 font_list, base_font_list.
3213 (free_display_info): Adusted for the change of MDisplayInfo.
3214 (xfont_driver): Initialize with xfont_list.
3215 (font_compare): New function.
3216 (build_font_list): Deleted.
3217 (xfont_registry_list): New function.
3218 (xfont_select): Use xfont_registry_list.
3219 (xfont_list): New function.
3220 (device_open): Adusted for the change of MDisplayInfo.
3222 * font-ft.c (add_font_info): New arg languages. Callers changed.
3223 (fc_list): Get languages from fonts..
3224 (ft_list_all): Renamed from ft_list. Callers changed.
3225 (ft_list): New function.
3226 (mfont__ft_driver): Initalize with ft_list.
3228 * font.c (mfont_list): New function.
3230 * font.h (struct MFontDriver): New member `list'.
3231 (MFTInfo): New member languages.
3233 * m17n-gui.h (mfont_list): Extern it.
3235 2004-09-27 Kenichi Handa <handa@m17n.org>
3237 * internal-gui.h (struct MGlyphString): Delete members mt,
3238 sub_width, sub_lbrearing, sub_rbearing, and region.
3240 * draw.c (MSubTextExtents): New type.
3241 (layout_glyphs): New arg extents. Set its members.
3242 (layout_glyph_string): Adjusted for the above change.
3243 (alloc_gstring): Don't set gstring->mt.
3244 (truncate_gstring): Call line_break function with mt instead of
3247 2004-09-22 Kenichi Handa <handa@m17n.org>
3249 * mtext.c (count_utf_16_chars): Count each code of invalid
3252 2004-09-19 Kenichi Handa <handa@m17n.org>
3254 * mtext.c (default_utf_16, default_utf_32): Rename them to
3255 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
3258 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
3261 2004-09-13 Kenichi Handa <handa@m17n.org>
3263 * draw.c (Mlatin): Don't declare it here.
3264 (visual_order): Fix reordering of combining characters.
3265 (compose_glyph_string): Fix detection of script.
3266 (layout_glyphs): Don't fix reordering of combining characters
3268 (layout_glyph_string): Pay attention to
3269 control->disable_overlapping_adjustment.
3270 (truncate_gstring): Include at least on character in a line.
3271 (get_gstring): Always scan one full line.
3272 (mdraw__init): Don't initialize Mlatin here.
3273 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
3274 have a font, use ascent/descent of an ASCII font. Allow
3275 ink_array_return and logical_array_return to be NULL.
3276 (mdraw_coordinates_position): Fix iteration.
3278 * font-ft.c (MFTtoProp): Member completely changed.
3279 (ft_to_prop): Adjusted for the above change.
3280 (ft_to_prop_size): Likewise.
3281 (set_font_info): Adjusted for the change of MFTtoProp.
3282 (fc_generic_family_list): New variable.
3283 (fc_list): Add special handling of generic font names.
3284 (mfont__ft_init): Adjusted for the change of MFTtoProp.
3285 Initialize fc_generic_family_list.
3286 (mfont__ft_fini): Don't free ft_to_prop. Free
3287 fc_generic_family_list.
3288 (FC_vs_M17N_font_prop): New type.
3289 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
3290 (fc_decode_prop, fc_encode_prop): New functions.
3291 (mfont__ft_parse_name): Use fc_decode_prop.
3292 (mfont__ft_unparse_name): Use fc_encode_prop.
3294 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
3295 (MWDevice): Add member realized_font_list.
3296 (free_display_info): Don't free disp_info->realized_font_list.
3297 (free_device): Free device->realized_fontset_list.
3298 (xft_find_metric): Use gstring->frame instead of rfont->frame.
3299 (device_open): Don't initialize disp_info->realized_font_list.
3300 (device_open): Initialize device->realized_font_list and set it to
3301 frame->realized_font_list.
3303 * fontset.c (try_font_group): New function.
3304 (mfont__lookup_fontset): Use try_font_group.
3306 * font.c (common_weight): Change the order of "regular".
3308 * face.c (Mlatin): Don't make it static.
3309 (mface__realize): Be sure to set work_gstring.frame.
3310 (mface__for_chars): Likewise.
3312 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
3315 * internal-gui.h (Mlatin): Extern it.
3317 * m17n-gui.h (MDrawControl): New member
3318 disable_overlapping_adjustment.
3320 2004-09-06 Kenichi Handa <handa@m17n.org>
3322 * font-flt.c (run_otf): Fix typo ('}'->']').
3324 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
3325 (COMBINING_PRECOMPUTED_P): New macros.
3327 * draw.c (layout_glyphs): Handle precomputed combining code.
3329 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
3330 precomupted combining code.
3332 2004-09-03 Kenichi Handa <handa@m17n.org>
3334 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
3337 2004-08-27 Kenichi Handa <handa@m17n.org>
3339 * face.c (mface_put_prop): If the new value is the same as the
3340 current one, don't increment frame->tick.
3342 2004-08-25 Kenichi Handa <handa@m17n.org>
3344 * fontset.c (mfontset): Initialize font_spec_list member.
3345 (mfontset_copy): Load fontset if necessary.
3347 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
3348 'metrics' to for C++.
3350 * draw.c (mdraw_glyph_info): Adjusted for the member name change
3353 2004-08-16 Kenichi Handa <handa@m17n.org>
3355 * Version 1.1.0 released.
3357 2004-08-13 Kenichi Handa <handa@m17n.org>
3359 * language.c (mlang__init): Add Dhivehi.
3361 * m17n-gui.c (Mx, Mfreetype): Delete it.
3362 (m17n_init_win): Don't initialize Mx and Mfreetype here.
3364 * m17n-gui.h (Mfreetype, Mxft): Extern them.
3365 (mfont_resize_ratio): Extern it.
3366 (MDrawGlyphInfo): New member logical_width;
3367 (MDrawGlyph): New type.
3368 (mdraw_glyph_list): Prototype adjusted.
3370 * m17n-X.c (xfont_open): Set type and fontp members.
3371 (xft_open): Likewise.
3373 * internal-gui.h (Mx, Mfreetype): Delete extern.
3375 * font.h (struct MRealizedFont): New member type and fontp.
3377 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
3378 (Mx, Mfreetype): Declare here.
3379 (Mxft): New variable.
3380 (mfont_resize_ratio): New function.
3382 * font-ft.c (ft_open): Set type and fontp members.
3384 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
3387 2004-08-11 Kenichi Handa <handa@m17n.org>
3389 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
3392 2004-08-06 Kenichi Handa <handa@m17n.org>
3394 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
3397 * font-flt.c (run_otf): Print debugging information if necessary.
3399 2004-08-05 Kenichi Handa <handa@m17n.org>
3401 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
3402 positioning_type 5 and 6. Switch simplified.
3404 2004-08-04 Kenichi Handa <handa@m17n.org>
3406 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
3408 2004-08-02 Kenichi Handa <handa@m17n.org>
3410 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
3411 set val to 1 even if it is greater than 1.
3413 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
3415 2004-07-29 Kenichi Handa <handa@m17n.org>
3417 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
3418 debugging information.
3420 * internal.h (MDEBUG_PRINT5): New macro.
3422 * draw.c (layout_glyphs): Don't combine a zero width glyph with
3423 the previous one if the zero width glyph has left or right
3426 2004-07-26 Kenichi Handa <handa@m17n.org>
3428 * m17n-X.c (xft_render): Pay attention to members left_padding and
3429 right_padding of MGlyph.
3431 * draw.c (visual_order): Allocate one more elements for arrays as
3432 a workaround of fribidi bug.
3433 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
3434 instead of MGlyph->bidi_sensitive.
3435 (layout_glyph_string): Pay attentinon to
3436 control->orientation_reversed when padding at the head or tail.
3437 Fix adjustment of space glyph width.
3438 (get_gstring): If cursor_width or cursor_bidi is changed, don't
3441 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
3442 instead of MGlyph->bidi_sensitive.
3444 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
3446 2004-07-26 Kenichi Handa <handa@m17n.org>
3448 * draw.c (visual_order): Don't treat combined glyphs specially.
3449 (layout_glyphs): Don't get metrics glyphs that are already ready.
3450 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
3451 width with the previous one.
3452 (draw_background): Fix bar cursor position on a r2l glyph.
3454 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
3455 (run_rule): Fix place of updating cluster_begin_pos and
3456 cluster_end_pos here.
3457 (run_otf): Don't set left_padding.
3459 * font-ft.c (adjust_anchor): Type of argument `code' changed.
3461 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
3462 Fix handling of GPOS.
3463 (mfont__ft_drive_gpos): Delete this function.
3465 * font.h (mfont__ft_drive_otf): Renamed back from
3466 mfont__ft_drive_gsub.
3467 (mfont__ft_drive_gpos): Delete extern.
3469 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
3470 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
3472 2004-07-23 Kenichi Handa <handa@m17n.org>
3474 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
3475 the same bidi level.
3477 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
3479 2004-07-22 Kenichi Handa <handa@m17n.org>
3481 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
3483 2004-07-20 Kenichi Handa <handa@m17n.org>
3485 * draw.c (render_glyphs): Fix checking of g->code validity.
3487 * face.c (mface__realize): Set g.type.
3489 2004-07-18 Kenichi Handa <handa@m17n.org>
3491 * Makefile.am: Prepend ${top_srcdir} to all *.la in
3494 * m17n-gui.c (mframe): Print error message give by dlopen to
3497 2004-07-16 Kenichi Handa <handa@m17n.org>
3499 * draw.c (compose_glyph_string): Improve the way of deciding a
3500 script. For a character that doesn't have script property, use
3501 the last non-latin script.
3503 * font-ft.c (fc_list): Cancel previous change.
3504 (mfont__ft_init): Add more entries in ft_to_prop_name.
3506 2004-07-15 Kenichi Handa <handa@m17n.org>
3508 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
3509 previous or next character glyphs.
3511 2004-07-14 Kenichi Handa <handa@m17n.org>
3513 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
3514 of type GLYPH_SPACE.
3516 * fontset.c (mfont__lookup_fontset): If glyph type is
3517 GLYPH_SPACE, get codes for SPACE.
3519 * internal-gui.h (Mfont): Delete extern.
3521 * m17n-gui.h (Mfont): Delete duplicated extern.
3523 2004-07-13 Kenichi Handa <handa@m17n.org>
3525 * font-ft.c (DEVICE_DELTA): New macro.
3526 (adjust_anchor): New function.
3527 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
3529 (mfont__ft_drive_gpos): New function.
3531 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
3532 (FontLayoutContext): Delete member `rfont'.
3533 (run_otf): Set g->otf_cmd. Call
3534 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
3535 only whne HAVE_OTF is defined.
3537 * fontset.c: Include "config.h".
3539 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
3540 (MGlyph): New member otf_cmd.
3542 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
3543 (mfont__ft_drive_gpos): Extern it.
3545 * face.c: Include "config.h".
3547 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
3549 * input-gui.c: Include "config.h".
3551 * plist.c: Include "config.h".
3553 2004-07-06 Kenichi Handa <handa@m17n.org>
3555 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
3556 internal-gui.h: Cancel previous changes.
3558 * m17n-gd.h: Delete it.
3560 * Makefile.am (libm17n_core_la_LIBADD): New variable.
3561 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
3562 @XML2_LD_FLAGS@ to above.
3563 (libm17n_la_LIBADD): Add -ldl.
3564 (libm17n_la_LDFLAGS): Add -export-dynamic.
3565 (X_LD_FLAGS): Fix the order of linking.
3566 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
3567 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
3568 (libm17n_X_la_LDFLAGS): Add -module.
3569 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
3570 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3571 (libm17n_gd_la_LDFLAGS): Add -module.
3572 (include_HEADERS): Delete m17n-gd.h.
3574 2004-06-30 Kenichi Handa <handa@m17n.org>
3576 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
3577 (MDeviceLibraryInterface): Delete it.
3578 (register_device_library): Delete it.
3579 (m17n__device_library_list): Renamed from device_library_list.
3581 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
3582 (m17n_init_win): Adjust prototype.
3584 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
3585 (m17n_init_gd): New function.
3587 * m17n-gd.h: New file.
3589 * m17n-X.h: Include <m17n-gui.h>.
3590 (m17n_init_X): Extern it.
3591 (M17N_INIT): Redefine it.
3593 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
3594 (m17n_init_X): New function.
3596 * internal-gui.h (m17n__device_library_list): Extern it.
3597 (struct MDeviceDriver): New members initialized, init, and fini.
3599 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
3601 (libm17n_X_la_LIBADD): Delete aboves.
3602 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
3603 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3604 (libm17n_gd_la_LDFLAGS): Delete it.
3605 (include_HEADERS): Add m17n-gd.h.
3607 2004-06-25 Kenichi Handa <handa@m17n.org>
3609 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
3610 (libm17n_gd_la_LDFLAGS): Cancel previous change.
3612 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
3614 * font-ft.c (fc_list): If FcFontList finds no font, try
3617 * draw.c (compose_glyph_string): Terminate the last loop after
3618 doing default combining if necessary.
3620 2004-06-24 Kenichi Handa <handa@m17n.org>
3622 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
3624 * character.c (mchar_define_property): Add const to an arg.
3626 * charset.c (mchar_define_charset): Add const to an arg.
3628 * coding.c (MCodingSystem): Add const to an arg or decoder.
3629 (finish_decoding): Add const to an arg.
3630 (decode_coding_charset, decode_coding_utf_8)
3631 (decode_coding_utf_16, decode_coding_utf_32)
3632 (decode_coding_iso_2022, decode_coding_sjis)
3633 (mconv_define_coding): Likewise.
3635 * m17n-X.c (xft_find_metric): Delete unused variable.
3637 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
3640 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
3643 * mtext.c (count_utf_8_chars, count_utf_16_chars)
3644 (mtext__from_data, mtext_from_data): Add `const' to an arg.
3646 * mtext.h (mtext__from_data): Ajust prototype.
3648 2004-06-23 Kenichi Handa <handa@m17n.org>
3650 * draw.c (compose_glyph_string): Always get glyph codes by
3652 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
3653 (mdraw_glyph_list): New function.
3655 * font-flt.c (mfont__flt_run): Be sure to call
3656 rfont->driver->encode_char.
3658 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
3659 (ft_encode_char): Delete arg C.
3660 (ft_render): Don't call FT_Get_Char_Index.
3662 * font.c (mfont__encodable_p): Delete it.
3663 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
3665 * font.h (struct MFontDriver): Delete arg C of encode_char.
3666 (mfont__encodable_p): Delete extern.
3668 * m17n-X.c (xfont_encode_char): Delete arg C.
3669 (xft_find_metric): Don't cal FT_Get_Char_Index.
3670 (xft_render): Likewise.
3672 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
3674 (mdraw_glyph_list): Extern it.
3676 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
3678 2004-06-22 Kenichi Handa <handa@m17n.org>
3680 * m17n-gui.h (mfontset_lookup): Extern it.
3682 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
3684 * fontset.c (realize_fontset_elements)
3685 (free_realized_fontset_elements, update_fontset_elements): New
3687 (mfont__realize_fontset): Call realize_fontset_elements.
3688 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
3689 (mfont__lookup_fontset): If a fontset was modified, update
3690 the realized fontset.
3691 (mfontset_modify_entry): Increment fontset->tick.
3692 (mfontset_lookup): New function.
3694 2004-06-21 Kenichi Handa <handa@m17n.org>
3696 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
3698 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
3699 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
3700 length of source text 0.
3702 2004-06-21 Kenichi Handa <handa@m17n.org>
3704 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
3705 (compare): Pay attention to format other than utf-8.
3706 (copy): Delete this function.
3707 (count_by_utf_8, count_by_utf_16, insert): New functions.
3708 (count_utf_16_chars): Fix handling of a surrogate pair.
3709 (find_char_forward, find_char_backward): Likewise.
3710 (mtext__from_data): Delete unnecessary check. Fix number of
3712 (mtext_from_data): Don't count items.
3713 (mtext_ref_char): Optimize the code.
3714 (mtext_set_char): Pay attention to format other than utf-8.
3715 (mtext_cat_char): Likewise.
3716 (mtext_dup): Don't call copy, instead do allocation here.
3717 (mtext_cat): Call insert instead of copy.
3718 (mtext_ncat): Likewise.
3719 (mtext_cpy): Delete character at first and call insert instead of
3721 (mtext_ncpy): Likewise.
3722 (mtext_copy): Likewise.
3723 (mtext_duplicate): Call insert instead of copy.
3724 (mtext_del): Pay attention to format other than utf-8.
3725 (mtext_ins): Simply call insert.
3726 (mtext_ins_char): Pay attention to format other than utf-8.
3727 (mtext_tok): Call insert instead of copy.
3728 (mtext_text): Call UNIT_BYTES.
3730 * textprop.c (mtext__adjust_plist_for_change): New function.
3732 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
3733 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
3734 (CHAR_UNITS_AT): Fix typo.
3735 (CHAR_UNITS_BY_HEAD): Fix typo.
3736 (STRING_CHAR_AND_UNITS): Fix typo.
3738 * internal.h (MTEXT_READ_ONLY_P): New macro.
3740 * mtext.h (mtext__replace): Delete the extern.
3741 (mtext__adjust_foramt): Adjust prototype.
3743 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
3744 if possible. Otherwise make a copy of mmt.
3746 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
3749 2004-06-18 Kenichi Handa <handa@m17n.org>
3751 * character.h (CHAR_STRING_UTF16): Fix syntax.
3753 2004-06-16 Kenichi Handa <handa@m17n.org>
3755 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
3756 (libm17n_X_la_LIBADD): Delete it.
3757 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
3759 * m17n-X.c (device_open): Add parens in `if' condition.
3761 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
3762 (DEC_POSITION): Likewise.
3763 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
3765 2004-06-15 Kenichi Handa <handa@m17n.org>
3767 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
3770 * draw.c (compose_glyph_string): If langauge is specified, call
3771 mface__for_chars even if a text is all latin. Fix condition for
3772 setting non_ascii_found.
3774 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
3776 * m17n.h (minput_char_to_key): Delete extern.
3778 * m17n-gui.h (minput_event_to_key): Cancel previous change.
3780 * m17n-gui.c (null_device_open): Set several members of frame.
3782 2004-06-14 Kenichi Handa <handa@m17n.org>
3784 * m17n-gui.h (minput_event_to_key): Delete extern.
3786 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
3788 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
3790 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
3792 2004-06-08 Kenichi Handa <handa@m17n.org>
3794 * character.c (mchar_put_prop): Don't increment the ref-count of
3797 2004-06-04 Kenichi Handa <handa@m17n.org>
3799 * m17n-core.c (mdebug__register_object): New function.
3800 (mdebug__unregister_object): Likewise.
3802 * internal.h (mdebug__register_object, mdebug__unregister_object):
3804 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
3807 * charset.c (mcharset__load_from_database): Don't call
3808 mconv__register_charset_coding here.
3810 * coding.c (find_coding): Get a real name from an element of
3811 coding_definition_list.
3812 (mconv__register_charset_coding): Set the real name at the top of
3814 (mcoding__load_from_database): Likewise.
3815 (mconv_list_codings): Adjusted for the above change.
3817 2004-06-03 Kenichi Handa <handa@m17n.org>
3819 * coding.c (find_coding): Find by canonicalized name. Don't have
3820 to modify the element of coding_definition_list by
3822 (mconv__define_coding_from_charset): Delete it.
3823 (mconv__register_charset_coding): Canonicalize sym.
3824 (mcoding__load_from_database): Register plist modified by
3827 * coding.h (mconv__define_coding_from_charset): Don't extern it.
3829 * font-ft.c (ft_open): Fix setting of rfont->descent.
3831 2004-06-02 Kenichi Handa <handa@m17n.org>
3833 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
3834 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
3835 (xlfd_unparse_name): Renamed from xfont_build_name.
3836 (mfont__init): Initialized Mfontconfig.
3837 (mfont__free_realized): Unconditionally unref rfont->info.
3838 (mfont__select): Free `this' if it's not best.
3839 (mfont__open): Don't check frame->realized_font_list.
3840 (mfont__parse_name_into_font): New function.
3841 (Mfontconfig): New variable.
3842 (mfont_from_name): Call mfont_parse_name.
3843 (mfont_name): Call mfont_unparse_name.
3844 (mdebug_dump_font): Likewise.
3846 * font.h (struct MFontDriver): Delete members parse_name and
3848 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
3849 (mfont__parse_name_into_font): Extern it.
3851 * font-ft.c: Include "symbol.h".
3852 (close_ft): Unconditionally free filename and charmap_list of
3854 (ft_open): Duplicate base->filename. Increment ref-count of
3855 ft_info->charmap_list. Free ft_info->charmap_list and
3856 ft_info->filename on error.
3857 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
3859 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
3861 (enum xlfd_field_idx): Moved to font.c.
3862 (split_font_name, build_font_name): Likewise.
3863 (build_font_list): Call mfont__parse_name_info_font.
3864 (xfont_open): Call mfont__unparse_name. Free name.
3865 (xfont_parse_name, xfont_build_name): Moved to font.c
3866 (xft_select): Prototype deleted.
3867 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
3868 Call mfont_pase_name.
3870 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
3871 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
3874 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
3877 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
3879 2004-06-01 Kenichi Handa <handa@m17n.org>
3881 * fontset.c (mfontset_modify_entry): Pay attention to the case
3882 that fontset->font_spec_list is NULL.
3884 2004-05-31 Kenichi Handa <handa@m17n.org>
3886 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3888 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3890 * font.c (mfont__select): Print score the a font for debugging.
3892 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
3894 * coding.c (reset_coding_sjis): Check kanji and kana instead of
3895 kanji_sym and kana_sym.
3897 2004-05-28 Kenichi Handa <handa@m17n.org>
3899 * Makefile.am (VINFO): New variable.
3900 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
3901 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
3903 2004-05-27 Kenichi Handa <handa@m17n.org>
3905 The following chanages are to make device dependent functions
3906 accessible only from MDeviceDriver structure, and to add GD and
3907 null device drivers. Font drivers get also device dependent.
3909 * m17n.c (m17n_init): Increament shell_initialized.
3910 (m17n_fini): Decremented shell_initialized.
3912 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
3914 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
3915 (Mwidget, Mcolormap, Mx): Extern them.
3917 * m17n-gui.c: Include <dlfcn.h> and "config.h".
3918 (free_frame): Call frame->driver->close instead of
3920 (DLOPEN_SHLIB_EXT): New macro.
3921 (MDeviceLibraryInterface): New type.
3922 (device_library_list): New variable.
3923 (register_device_library): New function.
3924 (null_device): New variable.
3925 (null_device_close, null_device_get_prop)
3926 (null_device_realize_face, null_device_free_realized_face): New
3928 (null_driver): New variable.
3929 (null_device_init, null_device_fini, null_device_open): New
3931 (null_interface): New variable.
3932 (Mfreetype, Mdevice): Declare them.
3933 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
3934 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
3935 Mwin__Close_Device. Register drivers for Mx and Mgd.
3936 (m17n_fini_win): Decremented win_initialized. Call "fini"
3937 function of all opened devices. Don't call mwin__fini.
3938 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
3940 (mframe): Handle Mdevice key of PLIST.
3941 (mframe_get_prop): Call frame->device->get_prop instead of
3942 mwin__device_get_prop.
3944 * m17n-gd.c: New file.
3946 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
3947 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
3949 * m17n-core.c (m17n_init_core): Increate core_initialized.
3950 (m17n_fini_core): Decremented core_initialized.
3952 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
3953 (Mcolormap): Don't extern them here.
3955 * m17n-X.c (FRAME_DEVICE): New macro.
3956 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
3957 (free_display_info): Use MPLIST_DO.
3958 (free_device): Free rface->info.
3959 (xft_close): Delete it.
3960 (device_init): Renamed from mwin__init.
3961 (device_fini): Renamed from mwin__fini.
3962 (device_open): Renamed from mwin__open_device.
3963 (x_driver): New variable.
3964 (MXFontInfo): Delete member frame, add member display.
3965 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
3966 Don't declare them here.
3968 * internal-gui.h (MDeviceType): New enum.
3969 (MWDefice): Delete it.
3970 (struct MFrame): Change type of device to void *. New members
3971 device_type, driver, font_driver_list.
3972 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
3973 (MDeviceDriver): New type.
3974 (Mx, Mgd, Mfreetype): Extern them.
3975 (mwin__XXX): Delete all of them.
3977 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
3979 (win_destroy_ic): Likewise.
3980 (adjust_window_and_draw): Likewise.
3981 (win_callback): Likewise.
3982 (Mxim): Declare it here.
3983 (minput_event_to_key): Call M_CHECK_READABLE.
3985 * fontset.c (mfont__lookup_fontset): Delete local variable
3988 * font.h (struct MFontDriver): Delete member close, add members
3989 parse_name and build_name.
3990 (mfont__driver_list): Delete extern.
3991 (mfont__close): Delete extern.
3993 * font.c (mfont__init): Don't set mfont__driver_list.
3994 (mfont__fini): Don't unref mfont__driver_list.
3995 (mfont__select): Try font drivers in frame->font_driver_list. Set
3996 driver member of a realized font.
3997 (mfont__close): Delete it.
3998 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
3999 functions of the default frame.
4001 * font-ft.c (close_ft): Check ft_info->ft_face and work
4003 (add_font_info): Allocate ft_info by M17N_OBJECT.
4004 (ft_close): Delete it.
4005 (mfont__ft_driver): Don't set ft_close.
4006 (ft_select): Increment ref-count of best_font.
4007 (ft_open): Decremented ref-count of base. On error, call
4008 FT_Done_Face and free ft_info.
4009 (ft_find_metric): Always use XXX_MONO in load_flags.
4010 (ft_render): Fix setting of width. Call
4011 frame->driver->draw_points instead of mwin__draw_points.
4012 (ft_to_prop): Don't set mfont__driver_list.
4013 (mfont__ft_fini): Just unref ft_info.
4015 * face.c (mface__init): Exchange foreground and background of
4016 mface__default. Call mface_put_prop to set hline of
4018 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
4019 (mface__free_realized): Don't call mwin__free_realized_face.
4021 * draw.c (Mdepth): Don't declare it here.
4022 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
4023 (render_glyphs, render_glyph_string): Likewise.
4024 (mdraw__init): Don't set Mdepth.
4025 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
4027 (mdraw_text_per_char_extents): Return 0 on success and -1 on
4029 (mdraw_text_items): Check FRAME is writable.
4030 (mdraw_per_char_extents): Implement body.
4032 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
4034 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
4035 (GUI_SOURCES): Delete it.
4036 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
4037 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
4038 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
4039 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
4040 (linkgui_LDADD): Set to libm17n-gui.la
4041 (linkgui_LDFLAGS): New target.
4042 (SRC): Include ${libm17n_gui_la_SOURCES} and
4043 ${libm17n_gd_la_SOURCES}.
4045 2004-05-24 Kenichi Handa <handa@m17n.org>
4047 * draw.c (draw_background): Don't draw background even if
4048 rface->face.property[MFACE_BACKGROUND] is not Mnil.
4050 2004-05-22 Kenichi Handa <handa@m17n.org>
4052 * m17n-X.c (xft_open_font): Fix anti_alias setting.
4054 2004-05-20 Kenichi Handa <handa@m17n.org>
4056 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
4058 * m17n-gui.c: Include "plist.h".
4059 (mframe): If PLIST is NULL, initialize it to emply plist.
4061 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
4062 (xft_driver): New variable.
4063 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
4064 (xft_find_metric, xft_render): New function.
4065 (mwin__init): Adjusted for the new mfont__driver_list.
4066 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
4067 generated face to PARAM.
4068 (mwin__realize_face): Fix setting of box colors. Don't call hook
4070 (mwin__draw_hline): New function.
4071 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
4072 (mwin__xft_render): Delete these function.
4074 * internal-gui.h (struct MFrame): New member tick.
4075 (struct MGlyphString): New member tick.
4076 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
4077 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
4078 (mwin__xft_render): Delete extern.
4080 * fontset.c (mfont__lookup_fontset): Make the code simpler.
4081 (mfontset): Always increment the reference count of returned
4084 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
4085 (MFTInfo): Moved to font.h.
4086 (ft_iso8859_1_font_list): Delete this variable.
4087 (set_font_info): Don't set font->property[MFONT_TYPE].
4088 (set_font_info): Don't udpate ft_iso8859_1_font_list.
4089 (add_font_info): Change type to void.
4090 (fc_list): Change anme from xft_list. Caller changed. Include
4091 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
4092 (mfont__ft_driver): Change name from ft_driver. Caller changed.
4093 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
4094 (close_ft): Don't call mwin__xft_close. Unref
4095 ft_info->extra_info.
4096 (ft_open): Don't setup ft_info->fontname. Don't call
4098 (ft_find_metric): Don't call mwin__xft_get_metric.
4099 (ft_encode_char): Call rfont->driver->open instead of ft_open.
4100 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
4101 (mfont__ft_init): Adjusted for new mfont__driver_list.
4102 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
4104 * font.c (mfont__driver_list): Make it MPlist.
4105 (mfont__init): Adjust initialization of mfont__driver_list.
4106 (mfont__fini): Free mfont__driver_list.
4107 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
4108 (mfont__select): Adjusted for the new mfont__driver_list.
4110 * font.h (enum MFontProperty): Delete MFONT_TYPE.
4111 (mfont__drirver_list): Adjust prototype.
4112 (MFTInfo): Move to here from fron.c. Deleve member fontname.
4114 * face.h (struct MFace): Delete member realized_face_list, add
4116 (struct MRealizedFace): Delete member need_update
4117 andnofont_rface, add member non_ascii_list.
4118 (mface__update_frame_face): Extern it.
4120 * face.c (hline_prop_list, box_prop_list, noop_hook): New
4122 (get_hline_create, get_box_create): New functions.
4123 (find_realized_face): Cancel previous change. Arg RFONT deleted.
4125 (free_face): Cancep previous change. Free face->frame_list.
4126 (serialize_hline): Do nothing if hline->width is zero.
4127 (serialize_box): Do nothing if box->width is zero.
4128 (mface__init): Setup all properties of mface__default.
4129 (mface__fini): Free hline_prop_list and box_prop_list.
4130 (mface__realize): Cancel previous change. Update
4131 face->frame_list. Setup rface->non_ascii_list.
4132 (mface__for_chars): Update rface->non_ascii_list.
4133 (mface__free_realized): Free rface->non_ascii_list.
4134 (mface__update_frame_face): New function.
4135 (mface): Initialize face->frame_list.
4136 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
4138 (mface_merge): Likewise.
4139 (mface_put_prop): If key is Mhline or Mbox, get value by
4140 get_hline_create or get_box_create respectively.
4141 (mface_put_prop): Update frame->tick and call
4142 mface__update_frame_face if necessary.
4143 (mface_update): Do nothing if func is noop_hook.
4145 * draw.c (render_glyphs): If a font is not found, use
4146 mwin__draw_empty_boxes.
4147 (alloc_gstring): Initialize gstring->tick.
4148 (get_gstring): Check gstring->tick.
4150 2004-05-17 Kenichi Handa <handa@m17n.org>
4152 * face.c (find_realized_face): Return value changed. If RFONT is
4153 NULL, avoid unnecessary checking.
4154 (free_face): Free face->realized_face_list.
4155 (mface__realize): Adjusted for the change of find_realized_face.
4156 If it returns a realized face that needs update, free it and
4157 realize a new one. Push a new realized face to
4158 frame->realized_face_list instead of appending.
4159 (mface__for_chars): Adjusted for the change of find_realized_face.
4160 Short cut if the required font is in rface->ascii_rface.
4161 (mface_put_prop): Free old value if necessary. Set need_update
4162 member of realized faces to 1.
4164 * face.h (struct MFace): Delete member tick, add member
4166 (struct MRealizedFace): Delete member tick, add member
4169 2004-05-13 Kenichi Handa <handa@m17n.org>
4171 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
4173 2004-05-12 Kenichi Handa <handa@m17n.org>
4175 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
4177 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
4178 parse it XftNameParse.
4180 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
4181 (all_fonts_scaned): New variable.
4182 (set_font_info): FAMILY may be Mnil.
4183 (add_font_info): Argument changed.
4184 (xft_list): Call add_font_info in it.
4185 (ft_list): Likewise.
4186 (ft_select): Make it work in the case family is Mnil.
4187 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
4188 (mfont__ft_fini): Set all_fonts_scaned to 0.
4190 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
4191 that is failed to open.
4193 2004-05-10 Kenichi Handa <handa@m17n.org>
4195 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
4196 device's depth is 1 (i.e. monochrome).
4198 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
4199 to work around the problem of libtool.
4201 * font-ft.c: Include <freetype/ftbdf.h>.
4202 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
4204 (mfont__ft_init): Initialize them.
4205 (ft_iso8859_1_font_list): New variable.
4206 (set_font_info): Detect a font containing iso8859-1 glyphs and
4207 register it in ft_iso8859_1_font_list. If the font is not
4208 scalable, assume it as BDF or PCF font and setup SIZE and RESY
4209 properties of the font from its properties.
4210 (add_font_list): If the font is not scalable, check if it is BDF
4211 or PCF font. If not, ignore it.
4212 (ft_select): If FAMILY is Mnil, return NULL only if the requested
4213 registry is not iso8859-1.
4214 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
4215 ft_iso8859_1_font_list.
4216 (ft_find_metric): If the font is not scalable, assume it as BDF
4217 or PCF, and get a metric from its properties.
4218 (mfont__ft_fini): Free ft_iso8859_1_font_list.
4220 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
4222 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
4223 (libm17n_la_LDFLAGS): Delete it.
4224 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
4225 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
4227 2004-05-06 Kenichi Handa <handa@m17n.org>
4229 * draw.c (compose_glyph_string): Fix previous change.
4231 2004-04-30 Kenichi Handa <handa@m17n.org>
4233 * font-ft.c (ft_list): Delete unused variable `result'.
4234 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
4236 2004-04-27 Kenichi Handa <handa@m17n.org>
4238 * m17n-X.c: Include config.h
4239 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
4240 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
4241 (MWDevice) [HAVE_XFT2]: New member xft_draw.
4242 (FRAME_CMAP, FRAME_VISUAL): New macros.
4243 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
4244 (xfont_driver): Make it static.
4245 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
4246 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
4247 info->xft_color_back.
4248 (MXftFontInfo) [HAVE_XFT2]: New type.
4249 (mwin__xft_close) [HAVE_XFT2]: New function.
4250 (mwin__xft_open) [HAVE_XFT2]: New function.
4251 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
4252 (mwin__xft_render) [HAVE_XFT2]: New function.
4254 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4255 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
4256 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
4259 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4261 * font-ft.c: Don't include FT_FREETYPE_H here.
4262 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
4263 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
4264 (MFTInfo): New member charmap_index.
4265 (MFTInfo) [HAVE_XFT2]: New member xft_info.
4266 (check_otf_filename): Renamed from check_filename. Return value
4268 (ft_set_property): This function deleted.
4269 (set_font_info): New function.
4270 (add_font_list): Argument changed. Add multiple fonts.
4271 (xft_list) [HAVE_XFT2]: New function.
4272 (ft_list) [not HAVE_XFT2]: New function.
4273 (ft_select): Add code for Xft.
4274 (close_ft): Likewise.
4275 (ft_open): Likewise.
4276 (ft_find_metric): Likewise.
4277 (ft_encode_char): Likewise.
4278 (ft_render): Likewise.
4280 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
4282 2004-04-26 Kenichi Handa <handa@m17n.org>
4284 * textprop.c (mtext_attach_property): Declare the return type as
4287 2004-04-21 Kenichi Handa <handa@m17n.org>
4289 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
4291 2004-04-09 Kenichi Handa <handa@m17n.org>
4293 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
4295 (load_command): Setup above members.
4297 2004-04-05 Kenichi Handa <handa@m17n.org>
4299 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
4301 2004-03-30 Kenichi Handa <handa@m17n.org>
4303 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
4306 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
4307 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
4309 2004-03-29 Kenichi Handa <handa@m17n.org>
4311 * Version 1.0 Patch Level 2 released.
4313 2004-03-29 Kenichi Handa <handa@m17n.org>
4315 * charset.c (make_charset): Set charset->fully_loaded and
4316 charset->simple correctly. Don't try to get charset->min_char and
4317 charset->max_char for a charset of method subset and superset.
4318 Don't load a mapping file here.
4319 (mcharset__init): Set unified_max.
4320 (mcharset__load_from_database): Free a working plist.
4322 * coding.c (mcoding__fini): Free all malloced data.
4324 * input-gui.c (win_create_ic): Set control.as_image for preediting
4327 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
4328 `count') to initialize the array.
4330 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
4333 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
4335 (mwin__create_window): Fix bug of setting a background pixel of a
4337 (mwin__adjust_window): Clear the window before drawing.
4339 * m17n-core.c (mdebug__report_object): Free array->objectes if
4341 (m17n_init_core): Don't set report_header_printed to 0 here.
4342 Fix debugging information.
4343 (m17n_fini_core): Set report_header_printed to 0 here.
4345 * m17n-core.h (mplist_deserialize): Extern it.
4347 * m17n-gui.c (m17n_fini_win): Fix debugging information.
4349 * m17n.c (m17n_fini): Fix debugging information.
4351 * mtext.c (mtext__adjust_foramt): New function.
4353 * mtext.h (mtext__adjust_foramt): Extern it.
4355 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
4357 * plist.h (mplist__deserialize): Don't extern it.
4359 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
4360 elements of symbol_table to NULL. Report about created and freed
4361 symbols if MDEBUG_FINI is set.
4363 2004-03-22 Kenichi Handa <handa@m17n.org>
4365 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
4367 * m17n.c (m17n_init): Fix the way of checking merror_code.
4369 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
4371 2004-03-22 Kenichi Handa <handa@m17n.org>
4373 * fontset.c (realize_font_group): Adjust the font size by
4374 mfont__resize before selecting a font.
4376 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
4378 2004-03-19 Kenichi Handa <handa@m17n.org>
4380 * Version 1.0 Patch Level 1 released.
4382 2004-03-19 Kenichi Handa <handa@m17n.org>
4384 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
4386 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
4388 2004-03-19 Kenichi Handa <handa@m17n.org>
4390 Re-apply the changes forgotten in the released version.
4392 * charset.c (mcharset__load_from_database): Call
4393 mchar_define_charset.
4395 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
4396 (mconv_encode_range): Put Mcoding text property.
4398 2004-03-18 Kenichi Handa <handa@m17n.org>
4400 * draw.c (Mdepth): New variable.
4401 (visual_order): Delete unused local var `pos'.
4402 (compose_glyph_string): Fix for the case that gstring->glyphs is
4403 realloced. Stop generating glyphs at TO. Fix handling of
4405 (layout_glyphs): Get metrics of all glyphs in advance. Set
4406 lbearing and rbearing of base of composition glyph correctly.
4407 Handle left-overhang glyphs correctly.
4408 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
4410 (dump_combining_code): Change the defualt off_x character to ".".
4411 (mdraw__init): Initialize Mdepth.
4413 * face.c (work_gstring): New variable
4414 (mface__init): Initialize work_gstring.
4415 (mface__fini): Free work_gstring.glyphs.
4416 (mface__realize): Don't handle videomode property here. Adjusted
4417 for the change of mfont__get_metric.
4418 (mface__for_chars): Adjusted for the change of mfont__get_metric.
4420 * face.h (enum face_gc): Moved to m17n-X.c.
4422 * font.h (struct MFontDriver): Arguments of find_metric changed.
4423 (mfont__select): Prototype adjusted.
4424 (mfont__get_metric): Likewise.
4425 (mfont__ft_drive_otf): Likewise.
4426 (mfont__flt_run): Likewise.
4428 * font.c (mfont__select): New argument layouter. If layouter is
4429 different in the registered font, make a new copy of realized
4431 (mfont__get_metric): Argument changed. Get metrics of multiple
4433 (mfont_find): Call mfont__select with layouter as Mnil.
4435 * font-flt.c (FontLayoutContext): New member rfont.
4436 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
4437 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
4439 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
4441 (NUM_POINTS): New macro.
4442 (MPointTable): New type.
4443 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
4444 (mfont__ft_drive_otf): New argument rfont.
4446 * fontset.c (realize_font_group): Adjusted for the changed of
4448 (check_fontset_element): This function deleted.
4450 * input-gui.c (adjust_window_and_draw): Locate a preedit window
4451 off the parent window if the preedit text is zero length.
4453 * internal-gui.h (struct MFrame): New members foreground,
4454 background, videomode, font.
4455 (struct MGlyphString): New member anti_alias.
4456 (MDrawPoint): New type.
4457 (mwin__draw_bitmap): Prototype deleted.
4458 (mwin__draw_points): Prototype added.
4460 * m17n-gui.h (MDrawControl): New member anti_alias.
4462 * m17n-gui.c (free_frame): Free frame->font.
4463 (mframe): Set the fontset of frame->face to the default fontset.
4465 * m17n-X.c (RGB_GC): New type.
4466 (enum gc_index): Renamed from enum face_gc. Member names changed.
4468 (struct MWDevice): Members foreground and background deleted. New
4469 member scratch_gc, gc_list.
4470 (DEFAULT_FONT, FALLBACK_FONT): New macros.
4471 (free_device): Free GCs in device->gc_list.
4472 (get_rgb_gc): New function.
4473 (get_gc): Renamed and argument changed from get_color.
4474 (get_gc_for_anti_alias): New function.
4475 (xfont_find_metric): Arguments changed. Get metrics of multiple
4477 (set_region): Argument changed. Caller changed.
4478 (xfont_render): Allways set a font in gc.
4479 (x_error_handler, x_io_error_handler): Define only if
4480 X_SET_ERROR_HANDLER is defined.
4481 (mwin__open_device): Create device->scratch_gc. Set members
4482 foreground, background, and videomode of frame. Call
4483 XSetErrorHandler and XSetIOErrorHandler only if
4484 X_SET_ERROR_HANDLER is defined.
4485 (struct gc_list): Deleted.
4486 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
4487 (mwin__realize_face): Adjusted for the change of the format of
4488 rface->info and the charge of set_region.
4489 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
4490 (mwin__draw_box): Likewise.
4491 (mwin__draw_bitmap): This function deleted.
4492 (mwin__draw_points): New function.
4493 (mwin__verify_region): Adjusted for the change of the format of
4494 rface->info and the charge of set_region.
4495 (mwin__create_window): Inherit backgound pixel from parent.
4496 (mwin__dump_gc): Adjusted for the change of the format of
4499 2004-03-16 Kenichi Handa <handa@m17n.org>
4501 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
4503 * input.c (M_key_alias): New variable.
4504 (handle_key): Try M_key_alias property of a key too.
4505 (minput__init): Initialize M_key_alias. Give that property to
4506 symbols in one_char_symbol. Fix bug of initializing
4509 * draw.c (compose_glyph_string): Don't handle
4510 ignore_formatting_char here. Include formatting characters in the
4511 range processed by a FTL.
4512 (layout_glyph_string): Handle ignore_formatting_char here.
4514 2004-03-12 Kenichi Handa <handa@m17n.org>
4516 * input-gui.c (win_create_ic): Enable bidi in status control.
4518 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
4520 2004-03-09 Kenichi Handa <handa@m17n.org>
4522 * input.c (load_input_method): If title is not specified, use the
4523 input method name as title.
4525 * m17n-X.c (get_color): Make it static.
4526 (xim_create_ic, xim_destroy_ic, x_error_handler)
4527 (x_io_error_handler): Likewise.
4529 2004-03-01 Kenichi Handa <handa@m17n.org>
4531 * Version 1.0 released.
4534 Copyright (C) 2003, 2004
4535 National Institute of Advanced Industrial Science and Technology (AIST)
4536 Registration Number H15PRO112
4538 This file is part of the m17n library.
4540 The m17n library is free software; you can redistribute it and/or
4541 modify it under the terms of the GNU Lesser General Public License
4542 as published by the Free Software Foundation; either version 2.1 of
4543 the License, or (at your option) any later version.
4545 The m17n library is distributed in the hope that it will be useful,
4546 but WITHOUT ANY WARRANTY; without even the implied warranty of
4547 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4548 Lesser General Public License for more details.
4550 You should have received a copy of the GNU Lesser General Public
4551 License along with the m17n library; if not, write to the Free
4552 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
4553 Boston, MA 02110-1301, USA.