1 2008-06-13 Kenichi Handa <handa@m17n.org>
3 * input.c (minput_config_file): Comment fixed for man-page.
5 2008-06-13 Harshula <harshula@gmail.com> (tiny change)
7 * Makefile.am (libm17n_gd_la_LIBADD): Add @FREETYPE_LD_FLAGS@.
9 2008-05-24 Kenichi Handa <handa@m17n.org>
11 * m17n-flt.c (mdebug_dump_flt): Change return value to (MFLT *).
13 2008-05-23 Kenichi Handa <handa@m17n.org>
15 * Makefile.am (libm17n_gui_la_LIBADD): Include libm17n-core.la.
16 (libm17n_X_la_LIBADD): Include libm17n-core.la, libm17n.la, and
18 (libm17n_gd_la_LIBADD): Likewise.
20 * input.c (take_action_list): Fix debug info.
22 2008-05-14 Kenichi Handa <handa@m17n.org>
24 * m17n-flt.c (run_rule): Check SRC_REGEX at first.
25 (run_stages): Fix index of g_indices.
27 2008-04-03 Kenichi Handa <handa@m17n.org>
29 * draw.c (compose_glyph_string): Don't run flt striding over the
31 (get_gstring): Don't use the cached gstring if cursor position is
34 2008-04-02 Kenichi Handa <handa@m17n.org>
36 * input.c (integer_value): Delete the 3rd arg VALUE.
37 (resolve_expression): Adjust the call of integer_value.
38 (take_action_list): Likewise.
40 2008-03-06 Kenichi Handa <handa@m17n.org>
42 * font-ft.c (ft_drive_otf): Don't ignore the otf-spec to apply all
45 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
47 * Version 1.5.1 released.
49 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
51 * draw.c (mdraw_glyph_list): Refer to mfont__ft_driver only when
52 HAVE_FREETYPE is defined.
54 * font.h (OTF_Tag): Be sure that it is defined in any cases.
56 2008-01-30 Kenichi Handa <handa@ni.aist.go.jp>
58 * font.h (enum MFontOpenTypeTable, MFontCapability): Define them
61 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
63 * input.c (parse_action_list): Handle the case "(insert INTEGER)".
65 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
67 * input.c (parse_action_list): Check M_candidates.
68 (get_im_info): If key is Mnil, be sure to set im_info->states to a
71 2008-01-23 Kenichi Handa <handa@ni.aist.go.jp>
73 * input.c (integer_value): Fix interpretation of "@-N".
75 2008-01-17 Kenichi Handa <handa@ni.aist.go.jp>
77 * input.c (get_following_char): Fix interpretation of POS.
78 (get_following_char): Fix interpretation of "@+N".
80 2008-01-15 Kenichi Handa <handa@ni.aist.go.jp>
82 * font-ft.c (ft_drive_otf): Don't refer to otf_gstring if HAVE_OTF
85 * Makefile.am (FLT_SOURCES): Include internal-flt.h.
87 2008-01-07 Kenichi Handa <handa@ni.aist.go.jp>
89 * m17n-flt.c (UPDATE_CLUSTER_RANGE): Don't check if clustering
91 (run_rule): Call UPDATE_CLUSTER_RANGE when necessary.
92 (run_command): Check if clustering now before calling
95 2008-01-06 Kenichi Handa <handa@m17n.org>
97 * font.c (mfont__get_glyph_id): Return -1 if some code is invalid.
99 * font-ft.c (ft_drive_otf): Fix checking of negative feature.
101 * m17n-X.c (xft_find_metric): Set g->g.measured.
103 * m17n-flt.c (Mequal): New variable.
104 (m17n_init_flt): Initialize it.
105 (FontLayoutCmdRule): Merge members supported_glyph and otf_spec
106 into a new member facility.
107 (load_command): Modify parsing of Mfont_facility.
108 (run_rule): Adjuted for the change of FontLayoutCmdRule.
109 (run_otf): Adjusted metrics if a->back is nonzero.
111 2007-12-28 Kenichi Handa <handa@ni.aist.go.jp>
113 * Version 1.5.0 released.
115 2007-12-13 Kenichi Handa <handa@ni.aist.go.jp>
117 * m17n-core.c (m17n_init_core): Handle the lang. env. MDEBUG_FLT.
119 * m17n-flt.c (mdebug_flag): Set to MDEBUG_FLT.
120 (run_rule): Check if a font has the specific glyph correctly.
122 * internal.h (enum MDebugFlag): Delete MDEBUG_FONT_OTF, change
123 MDEBUG_FONT_FLT to MDEBUG_FLT.
125 * font.c (mfont__get_glyph_id): Encode g->g.code (not g->g.c).
127 * font-flt.c: Delete it.
129 2007-12-08 Kenichi Handa <handa@ni.aist.go.jp>
131 * m17n-flt.c (run_rule): Fix printing of debug info. Don't update
132 TO for the rule of SRC_HAS_GLYPH.
134 * draw.c (run_flt): Argument changed.
135 (compose_glyph_string): Adjusted for the above change.
137 2007-12-07 Kenichi Handa <handa@ni.aist.go.jp>
139 * plist.c (read_mtext_element): Don't free the malloced buffer.
141 2007-12-04 Kenichi Handa <handa@ni.aist.go.jp>
143 * m17n-core.h (merror_code): Extern it.
145 * m17n-misc.h (merror_code): Don't extern it.
147 * m17n.h: Handle the case of _M17N_FLT_H_ being defined.
149 * m17n-flt.h: Handle the case of _M17N_H_ being defined.
151 2007-11-22 Kenichi Handa <handa@ni.aist.go.jp>
153 * draw.c (compose_glyph_string): Check g->rface->layouter, not
154 g->rface->rfont->layouter.
156 * font-ft.c (ft_drive_otf): Fix setting of g->g.from and g->g.to.
158 * m17n-flt.c (FontLayoutContext): New member encoded_offset.
159 (run_rule): Use ctx->encoded_offset.
160 (run_command): Likewise.
161 (run_stages): Set ctx->encoded_offset.
163 2007-11-21 Kenichi Handa <handa@ni.aist.go.jp>
165 * m17n-flt.c (enum GlyphInfoMask): Adjusted for the change of
166 bit-size of MFLTGlyph->internal.
168 2007-11-20 Kenichi Handa <handa@ni.aist.go.jp>
170 * draw.c (visual_order): Exclude the last anchor glyph from the
173 * m17n-flt.h (MFLTGlyph): New member <adjusted>.
175 * m17n-flt.c (run_otf): Set adjusted flag of glyphs if necessary.
176 (run_stages): Likewise.
177 (load_flt): Unref top after checking plist.
179 * m17n-X.c (xft_render): Check adjusted flag of glyphs.
181 2007-11-12 Kenichi Handa <handa@ni.aist.go.jp>
183 * font-ft.c (ft_check_otf): Fix arg to OTF_check_features.
185 * m17n-flt.c (Mcombining): New variable.
186 (Mfont_facility): Renamed from Mfont_has. Referrer changed.
187 (enum FontLayoutCmdRuleSrcType): Delete SRC_EXIST, add
188 SRC_HAS_GLYPH and SRC_OTF_SPEC.
189 (FontLayoutCmdRule): Delete src.exist, add src.supported_glyph and
191 (load_command): Adjusted for the above changes.
192 (run_rule): Likewise.
193 (combining_code_from_class): Delete it.
194 (mflt_get): Check flt->name against Mcombining, not Mt.
196 * internal-flt.h (Mcombining): Extern it.
198 * draw.c (compose_glyph_string): Call run_flt with Mcombining for
199 combining characters.
201 2007-11-09 Kenichi Handa <handa@ni.aist.go.jp>
203 * face.c (mface__realize): Reset measured flag before calling
206 * m17n-flt.c (run_stages): Fix handing of off_x and off_y.
207 (setup_combining_coverage): New function.
208 (setup_combining_flt): New function.
209 (mflt_get): If flt is not found, return NULL. If name if Mt,
210 call setup_combining_flt.
211 (mflt_run): For debugging, print font family name.
213 * font-ft.c (ft_render): Fix handling of baseline_offset.
214 (ft_encapsulate): Set metrics in 26.6 fixed pixel.
215 (ft_render): Check pixel_mode to determine anti_alias.
217 * m17n-X.c (xfont_find_metric): Delete invalid "continue" line.
218 (xfont_find_metric): Set metrics in 26.6 fixed pixel.
219 (xfont_render): Set baseline_offset in pixel.
220 (xft_render): Fix handling of baseline_offset.
222 * draw.c (run_flt): Set font.font.family.
223 (compose_glyph_string): Fix handling of combining characters.
225 * fontset.c (try_font_list): Check if the named flt is surely
228 2007-11-07 Kenichi Handa <handa@ni.aist.go.jp>
230 * draw.c (analyse_bidi_level): New function.
231 (visual_order): Do reordering using the already decided
233 (compose_glyph_string): Decide bidi-level before calling flt.
235 * m17n-flt.c (mflt_run): Fix typo.
237 * font-ft.c (ft_drive_otf): Fix indexing gstring->glyphs.
239 2007-11-06 Kenichi Handa <handa@ni.aist.go.jp>
241 * draw.c (visual_order): Don't rely on the width of glyphs.
242 (run_flt): Fix culculation of g->g.to.
244 * m17n-flt.c (run_rule): Don't set error code here.
245 (run_cond): Likewise.
246 (run_otf): Fix culculation of xoff and yoff.
247 (run_command): Don't set error code here.
251 * m17n-X.c (xfont_open): Keep rfont's metrics in 26.6 fixed pixels.
252 (xfont_find_metric): Set glyph's yadv to 0.
253 (xft_find_metric): Likewise.
255 * font-ft.c (ft_open): Keep rfont's metrics in 26.6 fixed pixels.
256 (ft_find_metric): Adjust glyph's metrics.
257 (ft_encapsulate): Keep rfont's metrics in 26.6 fixed pixels.
258 (ft_drive_otf): Set mark glyph's xadv to 0.
260 * face.c (mface__for_chars): Adjusts the unit of face's ascent and
263 2007-10-29 Kenichi Handa <handa@m17n.org>
265 * m17n-flt.h (struct _MFLTOtfSpec): Adjusted for the new FLT handling.
266 (mflt_get): Adjusted for the argument change.
267 (mflt_name): Adjusted for the return value change.
269 * m17n-flt.c (Mgenerator, Mend): New variables.
270 (flt_min_coverage, flt_max_coverage): New variables.
273 (Mfont_has): Renamed from Mexist. Referrers chagned.
274 (gen_otf_tag): Handle the trailing whitespaces.
275 (otf_count_features, otf_store_features): Fix for negative features.
276 (parse_otf_command): Adjusted for the change of MFLTOtfSpec.
277 (load_otf_command): Likewise.
278 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
279 (load_flt): Argument changed. Caller changed.
280 (free_flt_list): New function.
281 (run_rule): Adjusted for the change of FontLayoutContext.
282 (mflt_run): Adjusted for the change of FontLayoutContext.
284 * m17n-gui.c (m17n_init_win): Call m17n_init_flt.
285 (m17n_fini_win): Call m17n_fini_flt.
287 * m17n-gui.h: Include m17n-flt.h.
289 * m17n-gd.c: Adusted for the change of MGlyph.
291 * m17n-X.c: Adusted for the change of MGlyph.
292 (xft_check_otf, xft_drive_otf): New functions.
294 * internal-gui.h (MGlyph): Modified for new FLT handling.
296 * fontset.c (try_font_list): Adusted for the change of MGlyph.
298 * font-ft.c: Adjusted for the change of MGlyph.
299 (ft_check_cap_otf): Renamed from ft_check_otf. Callers changed.
300 (get_glyph_metric): Deleted.
301 (ft_check_otf): New function.
302 (ft_drive_otf): New fucntion.
304 * font.c: Adjusted for the change of MGlyph.
305 (mfont__init): Don't call mfont__flt_init.
306 (mfont__fini): Don't call mfont__flt_fini.
307 (mfont__get_glyph_id, mfont__get_metrics): New functions.
309 * font.h (struct MRealizedFont): New members x_ppem and y_ppem.
310 (MFLTFontForRealized): New struct.
311 (struct MFontDriver): New members check_otf and drive_otf.
312 (mfont__get_glyph_id, mfont__get_metrics): Extern them.
314 * face.c: Adjusted for the change of MGlyph.
316 * draw.c: Adjusted for the change of MGlyph.
318 * m17n.c (m17n_init): Don't call mchar_init.
320 * m17n-core.c (m17n_init_core): Call mchar_init.
322 * m17n-core.h (mchartable_min_char, mchartable_max_char): Extern them.
324 * input.c: Include "m17n.h" instead of "m17n-gui.h".
326 * chartab.c (mchartable): Initialize table->min_char to -1.
327 (mchartable_min_char): New function.
328 (mchartable_max_char): New function.
330 * Makefile.am (GUI_SOURCES): Delete font-flt.c.
331 (libm17n_gui_la_LIBADD): Add ${top_builddir}/src/libm17n-flt.la.
333 2007-10-12 Kenichi Handa <handa@m17n.org>
335 * m17n-core.h (Mcharset): Extern it.
336 Move detabase related declarations from m17n.h.
338 * m17n-flt.h: Include m17n-core.h instead of m17n.h.
339 (struct _MFLTOtfFeatures): New struct.
340 (struct _MFLTOtfSpec): Delete gsub, gpos, etc, add gsub_gpos.
341 (struct _MFLTFont): Delete otf, add check_otf.
342 (MCHAR_INVALID_CODE): Define it.
344 * plist.c (read_mtext_element): Simplify the code.
346 * m17n.h: Move database related declarations to m17n-core.h
347 (Mharset): Don't extern it.
349 * m17n.c (m17n_init): Don't call mdatabase__init.
351 * m17n-gd.c (read_rgb_txt): Check also /etc/X11/rgb.txt. Downcase
354 * m17n-flt.c: Include m17n-core.h instead of m17n.h.
355 (Mexist): New variable.
356 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
357 (FontLayoutCmdRule): New member src.exist.
358 (parse_otf_command): Handle gsub_count and gpos_count separately.
359 (load_otf_command): Adjusted for the change of MFLTOtfSpec.
360 (load_command): Handle the command "exist".
361 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
362 (run_rule): Handle the case SRC_EXIST.
363 (run_otf): Adjusted for the change of MFLTOtfSpec.
364 (run_command): Check the range of FROM.
365 (check_otf_spec): Delete it.
366 (m17n_init_flt): Call m17n_init_core instead of m17n_init.
368 (m17n_fini_flt): Call m17n_fini_core instead of m17n_fiini.
369 (mflt_find): Call font->check_otf instead of check_otf_spec.
370 (mflt_run): Keep the metrics in 26.6 fixed point.
372 * m17n-core.c (mdatabase__finder, mdatabase__loader): Delete them.
373 (m17n_init_core): Call mdatabase__init.
375 * m17n-X.c (device_open): Use mplist_add, not mplist_push.
377 * internal.h (mdatabase__finder, mdatabase__loader): Delete externs
380 * font-flt.c (Mexist): New variable.
381 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
382 (FontLayoutCmdRule): New member src.exist.
383 (load_category_table): Use isalnum, not isalpha.
384 (load_command): Check the command "exist".
385 (run_rule): Hande the case SRC_EXIST.
386 (run_command): Check the range of FROM.
387 (mfont__flt_init): Initialize Mexist.
389 * draw.c (layout_glyphs): Fix calculation of off_x and off_y.
391 * database.h (mdatabase__load_charset_func): Extern it.
393 * database.c: Include m17n-core.h instead of m17n.h.
394 (load_chartable): Use mtext__from_data.
395 (load_charset): Moved to charset.c
396 (load_database): Call mdatabase__load_charset_func instead of
398 (mdatabase__load_charset_func): New variable.
399 (mdatabase__init): Initialize mdatabase__load_charset_func and
400 Mcharset. Don't set mdatabase__finder and mdatabase__loader.
401 (mdatabase__save): Use fwrite, not mconv_encode_stream.
402 (Mcharset): Declare it here.
404 * charset.c: Include "database.h.".
405 (load_charset): Moved from database.c.
406 (mcharset__init): Initialize mdatabase__load_charset_func, don't
409 * character.c (mchar_define_property): Call mdatabase_find directly.
410 (mchar_get_prop): Call mdatabase_add directly.
411 (mchar_put_prop): Call mdatabase_load directly.
412 (mchar_get_prop_table): Likewise.
414 * Makefile.am (libm17n_core_la_SOURCES): Add database.[ch].
415 (libm17n_la_SOURCES): Remove database.[ch].
416 (libm17n_flt_la_LIBADD): Delete libm17n.la, add libm17n-core.la.
418 2007-09-18 Kenichi Handa <handa@m17n.org>
420 * face.c (mface__realize): Try Freetype based font at first.
422 * font.c: Include <ctype.h>
424 2007-09-16 Kenichi Handa <handa@m17n.org>
426 * m17n-flt.c (load_flt): New arg full. If full is zero, load only
428 (run_otf): Call font->get_metrics, not font->get_metric.
429 (run_stages): Likewise.
430 (CHECK_FLT_COVERAGE): New macro.
431 (CHECK_FLT_STAGES): Call load_flt with the second arg 1.
432 (check_otf_spec): New function.
433 (m17n_fini_flt): Unref flt->coverage.
434 (mflt_find): Argument changed.
435 (mflt_name): New function.
436 (mflt_coverage): Use CHECK_FLT_COVERAGE.
438 * m17n-flt.h (MFLTFont): Member get_metrics renamed from get_metric.
439 (mflt_find): Prototype adjusted.
440 (mflt_name): Extern it.
442 2007-09-14 Kenichi Handa <handa@m17n.org>
444 * m17n-flt.h (struct _MFLTGlyph): Change signedness of members.
446 * font-flt.c (run_otf): Make debug info printing comaptible with
448 (run_command): Likewise.
449 (mfont__flt_run): Likewise.
451 * m17n-flt.c (UPDATE_CLUSTER_RANGE): ctx->cluster_begin_idx is
452 invalid only when it's negative.
454 (run_command): Likewise.
455 (mflt_run): Initialize ctx.cluster_begin_idx to -1.
457 2007-09-10 Kenichi Handa <handa@m17n.org>
459 * m17n-flt.h (struct _MFLTGlyph): New member encoded and measured.
460 (struct _MFLTFont): Prototype of get_glyph_id changed.
462 * m17n-flt.c (enum GlyphInfoMask): Delete EncodedMask and
464 (GAPPEND): Delete this macro.
465 (GET_ENCODED, SET_ENCODED, GET_MEASURED, SET_MEASURED): Adjusted
466 for the change of MFLTGlyph. Caller changed.
467 (run_otf): Simply calls font->get_glyph_id.
468 (run_command): Reset g->encoded and g->measured for direct code.
469 (positioning): Delete this function.
470 (run_stages): Simply calls font->get_glyph_id and font->get_metric.
472 2007-09-07 Kenichi Handa <handa@m17n.org>
474 * draw.c (compose_glyph_string): Improve script detection.
476 2007-09-06 Kenichi Handa <handa@m17n.org>
478 * m17n-flt.h (mflt_get): Extern it.
480 * m17n-flt.c (run_stages): Call positioning only if
481 font->get_metric is non-NULL.
482 (CHECK_FLT_STAGES): Fix typo.
483 (mflt_get): New function.
485 * font-flt.c (mfont__flt_run): Improve debug info printing.
487 2007-09-04 Kenichi Handa <handa@m17n.org>
489 * m17n-flt.c (MFontLayoutTable): Delete this type.
490 (struct _MFLT): New member mdb and coverage.
491 (list_flt): Set flt->mdb.
492 (load_generator): Argument and return value changed. Caller
494 (get_font_layout_table): Delete this function.
495 (run_stages): Argument changed. Caller changed.
496 (CHECK_FLT_STAGES): New macro.
497 (mfont__flt_encode_char): Argument changed.
498 (mflt_find): Likewise.
499 (mflt_coverage): New function.
500 (mflt_run): Argument changed.
501 (mdebug_dump_flt): Likewise.
503 * m17n-flt.h (mflt_coverage): Extern it.
504 (mflt_find): Prototype adjusted.
506 2007-09-03 Kenichi Handa <handa@m17n.org>
508 * internal.h (MTABLE_CALLOC_SAFE, MSTRUCT_CALLOC_SAFE): New macros.
510 * database.c (mdatabase__props): New function.
512 * database.h (mdatabase__props): Extern it.
514 * m17n-flt.h (struct _MFLTGlyphString): Delete user_data, add
516 (struct _MFLTFont): Add suitable_p.
517 (mflt_find): Extern it.
519 * m17n-flt.c: Include "database.h".
520 (struct _MFLT): New struct.
521 (list_flt): New function.
522 (load_flt): Don't update flt_list.
523 (get_font_layout_table): Use flt_list.
524 (m17n_init_flt): Don't initialize flt_list.
525 (m17n_fini_flt): Adjusted for the change of flt_list.
526 (mflt_find): New function.
527 (mflt_run): Fix debug printing.
529 2007-08-23 Kenichi Handa <handa@m17n.org>
531 * m17n-flt.c (run_otf): Remove #ifdef HAVE_OTF and #endi.
532 (run_stages): Print separator in encoded string as "|".
534 2007-08-23 Kenichi Handa <handa@m17n.org>
536 * font-flt.c (mfont__flt_run): Don't calculate a glyph metric if
537 the glyph is already handled by OTF.
539 2007-08-21 Kenichi Handa <handa@m17n.org>
541 * font-ft.c (ft_check_capability): Check cap->script_tag at first.
543 2007-08-20 Kenichi Handa <handa@m17n.org>
545 * font-flt.c (mfont__flt_run): Get glyph metrics before printing
548 2007-08-17 Kenichi Handa <handa@m17n.org>
550 * m17n-flt.h (struct _MFLTGlyphString): Member pointer renamed to
552 (MFLTOtfSpec): Renamed from MFLT_OTF_Spec.
553 (MFLTFont): Prototype of the member drive_otf adjusted.
555 * m17n-flt.c (run_stages): Fix handling of padding.
557 * font-ft.c (get_glyph_metric): New function.
558 (DEVICE_DELTA): Return 26.6 fixed point value.
559 (adjust_anchor): Likewise.
560 (mfont__ft_drive_otf): Use get_glyph_metric.
562 * font-flt.c (mfont__flt_run): Pay attention to padding on
565 2007-08-16 Kenichi Handa <handa@m17n.org>
567 * m17n-flt.c (run_stages): Fix typo.
569 * font-ft.c (adjust_anchor): Argument changed. Calculte based on
571 (mfont__ft_drive_otf): Don't call OTF_check_features for GPOS.
572 Adjusted for the argument change of adjust_anchor. Calculte based
575 2007-08-15 Kenichi Handa <handa@m17n.org>
577 * charset.c (mcharset__load_from_database): Set mdebug_flag
578 instead of mdebug_mask.
580 * coding.c (mcoding__load_from_database): Set mdebug_flag instead
583 * database.c (load_database): Set mdebug_flag instead of
585 (mdatabase__load_for_keys): Likewise.
587 * draw.c: Include "internal-flt.h".
588 (dump_combining_code): Don't subtract 128 from combining code
591 * font-flt.c: Include "internal-flt.h". Set mdebug_flag instead
593 (run_rule): Print debug info only when MDEBUG_FLAG is greater than
595 (run_cond): Likewise.
597 (run_command): Likewise.
598 (mfont__flt_run): Change format of debug info.
600 * font-ft.c: Include "internal-flt.h".
601 Set mdebug_flag instead of mdebug_mask.
602 (mfont__ft_drive_otf): Fix arg to OTF_check_features.
604 * input.c: Set mdebug_flag instead of mdebug_mask.
605 (shift_state): New MDEBUG_FLAG macro.
606 (preedit_commit): Likewise.
609 * internal-flt.h: New file.
611 * internal-gui.h (MAKE_COMBINING_CODE, COMBINING_CODE_OFF_Y)
612 (COMBINING_CODE_OFF_X, COMBINING_CODE_BASE_X)
613 (COMBINING_CODE_BASE_Y, COMBINING_CODE_ADD_X)
614 (COMBINING_CODE_ADD_Y, MAKE_COMBINING_CODE_BY_CLASS)
615 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
616 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P): Move
617 these macros to internal-flt.h.
619 * internal.h (M17N_OBJECT_ADD_ARRAY): Adjusted for the change of
621 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Likewise.
622 (enum MDebugMaskBit): Delete this enum.
623 (enum MDebugFlag): New enum.
624 (mdebug__flag): Don't extern it.
625 (mdebug__flags): Extern it.
626 (MDEBUG_FLAG): New macro.
627 (MDEBUG_PRINT0): Use the macro MDEBUG_FLAG.
628 (MDEBUG_DUMP, MDEBUG_PUSH_TIME, MDEBUG_POP_TIME)
629 (MDEBUG_PRINT_TIME): Likewise.
631 * m17n-X.c (xfont_open): Set mdebug_flag instead of mdebug_mask.
632 (xfont_list): Likewise.
634 * m17n-core.c (mdebug__flag): Delete this variable.
635 (mdebug__flags): New variable.
636 (SET_DEBUG_FLAG): Make it a function.
637 (m17n_init_core): Set mdebug_flag instead of mdebug_mask.
638 (m17n_fini_core): Likewise.
640 * m17n-gui.c (m17n_init_win): Set mdebug_flag instead of mdebug_mask.
641 (m17n_fini_win): Likewise.
643 * m17n-misc.h (enum MErrorCode): Add MERROR_FLT.
645 * m17n.c (m17n_init): Set mdebug_flag instead of mdebug_mask.
646 (m17n_fini): Likewise.
648 * symbol.c (msymbol__free_table): Adjusted for the change of
651 * Makefile.am (BASICBUILDS): Add libm17n-flt.la.
652 (BASICHEADERS): Add m17n-flt.h.
653 (FLT_SOURCES): New variable.
654 (libm17n_flt_la_SOURCES, libm17n_flt_la_LIBADD)
655 (libm17n_flt_la_LDFLAGS): Likewise.
657 * m17n-flt.h: New file.
659 * m17n-flt.c: New file created by modifying font-flt.c.
661 2007-07-13 Kenichi Handa <handa@m17n.org>
663 * Version 1.4.0 released.
665 2007-07-12 Kenichi Handa <handa@m17n.org>
667 * input.c: Fix doxygen @ref commands.
669 2007-07-10 Kenichi Handa <handa@m17n.org>
671 * m17n-core.h (M17NFunc): Fix typo of Doxygen directive.
673 2007-07-09 Kenichi Handa <handa@m17n.org>
675 * m17n-core.h (M17N_BEGIN_HEADER, M17N_END_HEADER): New macros.
677 * m17n.h: Include m17n-core.h if not yet done. Use macros
678 M17N_BEGIN_HEADER and M17N_END_HEADER.
680 * m17n-gui.h: Likewise.
682 * m17n-misc.h: Likewise.
684 2007-06-13 Kenichi Handa <handa@m17n.org>
686 * font-flt.c (load_command): Prepend "^" in the regular expression.
688 2007-06-11 Kenichi Handa <handa@m17n.org>
690 * language.c (mlanguage_name_list): Fix previous change.
692 * coding.c (mcoding__load_from_database): Add aliases in
693 coding_definition_list.
695 2007-06-10 Kenichi Handa <handa@m17n.org>
697 * language.c (mlanguage_name_list): Fix previous change.
699 2007-06-08 Kenichi Handa <handa@m17n.org>
701 * input.c (update_candidate): Copy candidate_list earlier.
702 (re_init_ic): Provide pseudo initialize state if none.
704 2007-06-05 Kenichi Handa <handa@m17n.org>
706 * input.c (preedit_insert): Print debug information.
708 * database.c (expand_wildcard_database): New function.
709 (mdatabase_list): Fix handling of wildcard database.
711 * language.c (load_lang_name): New function.
712 (mlang__fini): Cancel the last two changes.
713 (mlanguage_name_list): New arg script and territories. Use
716 * m17n.h (mlangauge_name_list): Adjusted.
718 2007-06-04 Kenichi Handa <handa@m17n.org>
720 * input.c (open_im): Check if the input method has at least one
723 2007-06-01 Kenichi Handa <handa@m17n.org>
725 * input.c (shift_state): Change the format of debug print.
726 (preedit_commit): New arg need_prefix. Caller changed.
727 (update_candidate): Copy candidate_list.
728 (take_action_list): Likewise.
729 (handle_key): Change the format of debug print.
731 * font-flt.c (load_flt): Ignore unknown directives.
733 2007-05-25 Kenichi Handa <handa@m17n.org>
735 * m17n-core.c (mdebug__unregister_object): Small optimization.
737 * database.c (find_file): Merged into get_database_file.
738 (get_database_file): New arg result. Caller changed.
739 (mdatabase__check): Fix the logic.
741 2007-05-24 Kenichi Handa <handa@m17n.org>
743 * database.c (find_database): If unprocessed wildcard database is
744 found, register database filed and recursively call find_database.
745 (free_db_info): Unref db_info->properties.
746 (register_database): New arg properties. Delete code for
747 initializing mdatabase__list.
748 (register_databases_in_files): Argument changed. Caller changed.
749 (mdatabase__update): Don't list files by glob here.
750 (mdatabase_list): If unprocessed wildcard database is found,
751 register database filed and recursively call mdatabase_list.
753 * database.h (enum MDatabaseStatus): New enum
754 MDB_STATUS_AUTO_WILDCARD.
756 * input.c (load_branch): Fix previous change.
757 (update_global_info): If the global database is not found, return -1.
759 2007-05-23 Kenichi Handa <handa@m17n.org>
761 * database.c (Mversion): New variable.
762 (mdatabase__init): Initialize it.
763 (register_database): New arg properties. Caller changed.
764 (register_databases_in_files): Don't check version here.
765 (mdatabase__update): Likewise.
767 * database.h (MDatabaseInfo): New member properties.
769 2007-05-21 Kenichi Handa <handa@m17n.org>
771 * language.c: Include <ctype.h>
772 (mlanguage__info): Use strncasecmp (not memcmp).
773 (mlanguage_name): Downcase language name for backward
776 * input.c (filter): Don't check Mlanguage property of
779 2007-05-18 Kenichi Handa <handa@m17n.org>
781 * language.c (mlanguage_name): Fix it to handle M-text English
784 * input.c (config_command): Set NAME before using it.
785 (load_branch): Try to resolve a map name by variables.
787 2007-05-17 Kenichi Handa <handa@m17n.org>
789 * language.c (mlang__fini): Fix previous change.
791 2007-05-16 Kenichi Handa <handa@m17n.org>
793 * plist.c (free_plist): Cancel the last change.
794 (write_element): Check if PLIST is nested.
795 (mplist__from_plist): Label a plist as nested if appropriate.
796 (mplist__from_alist): Label a plist as nested.
797 (mplist__conc): Check the value of PL before referring it. Label
798 a plist as nested if appropriate.
799 (mplist_copy): Label a plist as nested if appropriate.
800 (mplist_put_func): Return Mnil if KEY is a managing key.
801 (mplist_push): Label a plist as nested if appropriate.
803 * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
806 * language.c (mlang__fini): Unref each element of langname_list.
808 2007-05-14 Kenichi Handa <handa@m17n.org>
810 * language.c: Include <string.h> and <locale.h>.
811 (langname_list): New variable.
812 (load_lang_script_list): Exclude invalid list elements.
813 (mlang__init): Initialize langname_list.
814 (mlang__fini): Unref langname_list.
815 (mlanguage__info): Adjusted for the change of English
816 name (symbol->M-text).
817 (mlanguage_name): Label it as obsolete.
818 (mlanguage_name_list): New function.
820 * m17n.h (mlanguage_name_list): Extern it.
822 * locale.c (make_locale): Fix setting of members of locale.
824 * plist.c (free_plist): Unref also nested plist.
826 2007-05-11 Kenichi Handa <handa@m17n.org>
828 * coding.c (mconv_reset_converter): Set internal->used to 0.
830 2007-05-08 Kenichi Handa <handa@m17n.org>
832 * input.c (check_description): Force copying the translated text.
834 2007-05-02 Kenichi Handa <handa@m17n.org>
836 * input.c (minput_save_config): Unref unnecessary plist. Use
837 free_im_list to free im_config_list.
839 2007-04-20 Kenichi Handa <handa@m17n.org>
841 * input.c (config_command): Fix previous change again.
842 (config_variable): Likewise.
843 (minput_config_command): Fix for the case of setting back to
845 (minput_config_variable): Likewise.
846 (minput_save_config): Include nil as documentation of customized
849 2007-04-05 Kenichi Handa <handa@m17n.org>
851 * input.c (config_command): Fix previous change.
852 (config_variable): Likewise.
854 * plist.c (mplist_get_func): Fix for backward compatiblity.
856 2007-04-04 Kenichi Handa <handa@m17n.org>
858 * input.c (minput_get_command, minput_config_command): Fix example
861 2007-03-29 Kenichi Handa <handa@m17n.org>
863 These changes are to avoid unsafe casting of a function pointer.
865 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
866 (struct MFace): New member hook.
868 * face.c (serialize_face): Adjusted for the change of MFace.
869 (deserialize_face): Likewise.
870 (mface__init): Likewise. Use msymbol_put_func.
871 (mface__realize): Adjusted for the change of MFace. Avoid
873 (mface_get_prop): Adjusted for the change of MFace.
874 (mface_put_prop): Likewise.
875 (mface_get_hook): New function.
876 (mface_put_hook): New function.
877 (mface_update): Adjusted for the change of MFace.
879 * input-gui.c (win_callback): Use mplsit_get_func.
880 (minput__win_init): Use mplsit_put_func.
882 * input.c (take_action_list): Use mplist_get_func.
883 (init_ic_info): Likewise.
884 (fini_ic_info): Likewise.
885 (minput_callback): Likewise.
886 (minput__init): Use mplist_put_func.
888 * language.c (mlang__init): Use msymbol_put_func.
890 * m17n-core.h (M17NFunc): New function type.
891 (M17N_FUNC): New macro.
892 (msymbol_put_func, msymbol_get_func): Extern them.
893 (mplist_put_func, mplist_get_func): Extern them.
895 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
897 * m17n-gui.c (mframe): Add a proper casting.
899 * plist.h (struct MPlist): Make the member val a union.
900 (MPLIST_VAL): Adjusted for the above change.
901 (MPLIST_FUNC): New macro.
902 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
904 * plist.c (mplist_put_func, mplist_get_func): New functions.
906 * symbol.c (msymbol__fini): Use MPLIST_VAL.
907 (msymbol_put_func, msymbol_get_func): New functions.
909 * textprop.c (mtext_serialize): Use msymbol_get_func.
910 (mtext_deserialize): Likewise.
912 2007-03-28 Kenichi Handa <handa@m17n.org>
914 * input.c (get_candidate_list): Avoid unnecessary unref.
916 2007-03-23 Kenichi Handa <handa@m17n.org>
918 * database.c (mdatabase__update): Unref plist at the tail.
920 2007-03-21 Kenichi Handa <handa@m17n.org>
922 * input.c (update_custom_info): Fix for the case "name == Mnil &&
924 (config_command): Fix for the case that configuration is
926 (config_variable): Likewise.
927 (minput_config_command): If keyseqlist is an empty list, cancel
929 (minput_config_variable) If value is an empty list, cancel the
931 (minput_save_config): Handle cancellation of config and customize
934 2007-03-15 Kenichi Handa <handa@m17n.org>
936 * input.c (minput_config_variable): Check custom->vars (not
939 2007-03-01 Kenichi Handa <handa@m17n.org>
941 * input.c (reload_im_info): Setup cmds, vars, and title of
943 (check_variable_value): Fix the return value.
945 * database.c (mdatabase__check): If necessary, update database and
948 2007-02-28 Kenichi Handa <handa@m17n.org>
950 * database.c (get_dir_info): Set dir_info->status to
952 (check_version): New function.
953 (register_database): Don't call find_database.
954 (register_databases_in_files): Don't register a database of
956 (mdatabase__update): Likewise. Avoid unnecessary scanning.
958 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
959 and MDB_STATUS_OUTDATED.
961 * font.h (struct MFont): Types of members type, source, and
962 spacing changed to unsigned.
964 * internal-gui.h (struct): Types of members category and type
967 * internal.h (struct MText): Types of members format and coverage
970 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
971 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
973 2007-02-23 Kenichi Handa <handa@m17n.org>
975 * input.c (Mpop): New variable.
976 (fully_initialize): Initialize Mpop.
977 (parse_action_list): Handle Mpop.
978 (take_action_list): Likewise.
979 (handle_key): When a key is unhandled, shift to the initial state
980 only if the current state has no branch action.
982 2007-02-12 Kenichi Handa <handa@m17n.org>
984 * input.c (get_preceding_char): Unref mt if necessary.
985 (get_following_char): Likewise.
986 (parse_action_list): Fix handling of `insert' action as
988 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
989 (take_action_list): Check invalid candidate list.
991 2007-02-06 Kenichi Handa <handa@m17n.org>
993 * input.c (integer_value): Check also ic->produced for @-N.
995 2007-01-26 Kenichi Handa <handa@m17n.org>
997 * database.c (mdatabase__update): Check mdatabase__dir_list from
1000 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
1002 2007-01-12 Kenichi Handa <handa@m17n.org>
1004 * input.c (handle_key): Handle a branch action of the initial
1007 2007-01-10 Kenichi Handa <handa@m17n.org>
1009 * m17n-gd.c (gd_render): Delete superfluous line.
1011 2006-12-26 Kenichi Handa <handa@m17n.org>
1013 * m17n.h (minput_callback): Extern it.
1015 * input.h (minput__callback): Delte extern.
1017 * input.c (get_surrounding_text): Adjusted for the change of
1018 minput__callback to minput_callback.
1019 (delete_surrounding_text): Likewise.
1020 (minput_create_ic): Likewise.
1021 (minput_destroy_ic): Likewise.
1022 (minput_filter): Likewise.
1023 (minput_set_spot): Likewise.
1024 (minput_toggle): Likewise.
1025 (minput_reset_ic): Likewise.
1027 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
1028 and ic->candidate_to to 0.
1029 (minput_callback): Renamed from minput__callback.
1031 * input-gui.c (win_callback): Adjusted for the change of
1032 minput__callback to minput_callback.
1034 2006-12-15 Kenichi Handa <handa@m17n.org>
1036 * font-ft.c (ft_add_font): Fix typo.
1038 2006-12-06 Kenichi Handa <handa@m17n.org>
1040 * Version 1.3.4 released.
1042 2006-11-16 Kenichi Handa <handa@m17n.org>
1044 * input.c (parse_action_list): Allow (undo 0).
1045 (adjust_markers): New function.
1046 (preedit_insert, preedit_delete): Call adjust_markers.
1047 (preedit_replace): New function.
1048 (update_candidate): Call preedit_replace instead of preedit_insert
1050 (filter): When ic_info->commit_key_head is nonzero, shift input
1051 event keys even if there's no committed text.
1053 2006-11-10 Kenichi Handa <handa@m17n.org>
1055 * input.h (MInputContextInfo): New member commit_key_head.
1057 * input.c (preedit_commit): Update ic_info->commit_key_head.
1058 (take_action_list): Reset ic_info->commit_key_head on Mundo.
1059 (filter): When committed, shift keys by ic_info->commit_key_head.
1061 2006-10-30 Kenichi Handa <handa@m17n.org>
1063 * input.c (preedit_delete): Fix typo.
1064 (take_action_list): Print more debugging information. Allow
1065 variable in arg of 'select' and `pushback'.
1067 * database.c (gen_database_name): Don't put extra space.
1068 (load_database): Print debugging information.
1069 (register_databases_in_files): New arg headlen. Callers changed.
1070 (mdatabase__load_for_keys): Shorten debugging information.
1071 (mdatabase_load): Don't print debugging information here.
1073 2006-10-27 Kenichi Handa <handa@m17n.org>
1075 * input.c (marker_code): New arg surrounding. Callers changed.
1076 (surrounding_pos): Check if name[0] == '@'.
1077 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
1078 (take_action_list): Likewise.
1079 (get_preceding_char): If POS is zero, always call
1080 get_surrounding_text.
1082 2006-10-19 Kenichi Handa <handa@m17n.org>
1084 * input.c (load_variables): Fix setting of `global'.
1086 2006-10-16 Kenichi Handa <handa@m17n.org>
1088 * draw.c (draw_background): Be sure to set *to_x.
1089 (render_glyph_string): If from == to, just return.
1091 2006-10-18 Kenichi Handa <handa@m17n.org>
1093 * database.c (get_dir_info): Return NULL if the directory name is
1095 (register_databases_in_files): Call register_database with
1097 (mdatabase__update): Fix logic. Call register_database with
1099 (mdatabase_define): Call register_database with
1100 MDB_STATUS_EXPLICIT.
1102 * input.c (delete_surrounding_text): Be sure to set members
1103 preceding_text and following_text to NULL.
1104 (shift_state): Save variable values in ic_info->vars_saved.
1105 (preedit_commit): Don't print debug information here. Don't
1106 change ic_info->keys here.
1107 (get_candidate_list): Don't ref plist.
1108 (take_action_list): Don't unref return value of
1109 get_candidate_list. For undo, reset ic->produced and recover
1110 ic_info->vars. Be sure to set ic->candidate_list to NULL after
1112 (init_ic_info): Set ic_info->vars_saved.
1113 (fini_ic_info): Unref ic_info->vars_saved.
1114 (re_init_ic): Be sure to set ic->candidate_list to NULL after
1116 (filter): Be sure to set members preceding_text and following_text
1117 to NULL. Print debug information about produced text. Delete
1118 processed keys from ic_info->keys.
1120 * input.h (MInputContextInfo): New member vars_saved.
1122 2006-10-16 Kenichi Handa <handa@m17n.org>
1124 * database.c (mdatabase__update): Fix the way to get db_info.
1126 2006-10-02 Kenichi Handa <handa@m17n.org>
1128 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
1129 `size' changed to 24.
1131 * font.c (xlfd_unparse_name): Adjusted for the change of
1133 (font_score): Likewise.
1134 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
1136 * m17n-X.c (MFontX, _MFontX): Deleted.
1137 (SET_SIZE, HAVE_SIZE): Deleted.
1138 (free_display_info): Adjusted for the change of
1139 disp_info->font_list format.
1140 (xfont_registry_list): Likewise.
1141 (xfont_open): Likewise.
1142 (xfont_list): Likewise.
1143 (xfont_encode_char): Ignore size to find a realized font.
1144 (MRealizedFontXft): Change the order of members to make it
1145 compatible with MRealizedFontFT.
1147 2006-09-27 Kenichi Handa <handa@m17n.org>
1149 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
1150 (mfont_close): Add comments.
1152 * mtext-lbrk.c (mtext_line_break): Add comment.
1154 2006-09-26 Kenichi Handa <handa@m17n.org>
1156 * input.c (minput_get_description): Handle description about
1157 inclusion-only input methods.
1159 2006-09-21 Kenichi Handa <handa@m17n.org>
1161 * input.c (M_gettext): New variable.
1162 (fully_initialize): Initialize M_gettext.
1163 (check_description): New function.
1164 (load_commands): Call check_description.
1165 (config_all_commands): Be sure to unref pl.
1166 (load_variables): Call check_description.
1167 (config_all_variables): Be sure to unref pl.
1168 (load_im_info): Call check_description.
1170 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
1172 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
1173 and bind_textdomain_codeset.
1175 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
1177 2006-09-15 Kenichi Handa <handa@m17n.org>
1179 * input.c (reload_im_info): Update custom and global info.
1180 (init_ic_info): Fix previous change.
1182 2006-09-14 Kenichi Handa <handa@m17n.org>
1184 * database.c: Include <libgen.h>.
1185 (mdatabase__lock): Make a directory if necessary.
1187 * input.c (resolve_command): Adjusted for the format change of
1188 configured_cmds member.
1189 (load_commands, load_variables): Fix for errornous data handling.
1190 (config_command, config_variable): New function.
1191 (config_all_commands, config_all_variables): Renamed from
1192 config_commands and config_variables. Utilize the above function.
1193 (check_variable_value): Argument changed. Callers changed.
1194 (load_im_info): Call config_all_commands and config_all_variables.
1195 (init_ic_info): Adjusted for the format change of configured_vars
1197 (minput__init): Initialize Mcustomized, Mconfigured, and
1199 (Mcustomized, Mconfigured, Minherited): New variables.
1200 (minput_get_command): Be sure to return NULL if an input method
1201 use no local command.
1202 (minput_get_variable): Be sure to return NULL if an input method
1203 use no local variable.
1204 (minput_config_command, minput_config_variable)
1205 (minput_save_config): Adjusted for the format change of
1206 configured_cmds and configured_vars members.
1208 * plist.c (write_element): Delete superfluous ':'.
1210 2006-09-13 Kenichi Handa <handa@m17n.org>
1212 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
1213 (minput_config_file): Extern it.
1215 * draw.c (Minherited): Declaration moved to input.c.
1216 (mdraw__init): Don't initialize Minherited here.
1218 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
1220 2006-09-07 Kenichi Handa <handa@m17n.org>
1222 * textprop.c (mtext_serialize): Call mplist__serialize with the
1225 * plist.h (mplist__serialize): Prototype adjusted.
1226 (mplist__assq): Extern it.
1228 * plist.c: Include <ctype.h>
1229 (PUTC, PUTS): New macros.
1230 (write_symbol): New function.
1231 (write_element): New arg indent.
1232 (dump_string, dump_plist_element): Delete them.
1233 (mplist__from_string): New arg pretty.
1234 (mplist__assq): New function.
1235 (mdebug_dump_plist): Use write_element.
1237 * mtext.c (mtext_cat_char): Allocate more memory.
1238 (mdebug_dump_mtext): Don't escal a newline character.
1240 * m17n.h (minput_get_command, minput_get_variable)
1241 (minput_config_command, minput_config_variable)
1242 (minput_save_config): Extern them.
1244 * m17n-core.c: Include <string.h>.
1245 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
1246 use the stream stdout instead of a file of that name.
1248 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
1251 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
1252 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1253 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
1254 (MDEBUG_DUMP): Flush the stream.
1256 * input.h (struct _MInputMethodInfo): Delete member im. New
1257 members mdb, language, name, extra, cmds, configured_cmds,
1258 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
1259 (MInputContextInfo): New member tick.
1261 * input.c: Big change to improve user-side input method
1262 customization. Here, list just public API changes.
1263 (minput_get_commands, minput_get_variables)
1264 (minput_assign_command_keys, minput_set_variable): Label them
1266 (minput_get_command, minput_get_variable)
1267 (minput_config_command, minput_config_variable)
1268 (minput_save_config): New functions.
1270 * database.h (PATH_MAX): Define it if not yet defined.
1271 (PATH_SEPARATOR): Likewise.
1272 (enum MDatabaseStatus): New enum.
1273 (struct MDatabaseInfo): Moved from database.c. New members status,
1274 time, lock_file, and uniq_file.
1275 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
1276 (mdatabase__unlock): Extern them.
1278 * database.c: Include <time.h>.
1279 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
1280 (GEN_PATH): Args changed. Callers changed.
1281 (struct MDatabaseInfo): Moved to database.h.
1282 (struct MDatabase, mdb_list): Deleted.
1283 (mdatabase__list): New var.
1284 (get_database_filename): Deleted. Callers changed to use
1286 (find_file, get_database_file): New files.
1287 (get_dir_info): Initialize new members of MDatabaseInfo.
1288 (find_database): Arg chagnded. Callers changed.
1289 (free_db_info, register_database, register_databases_in_files):
1291 (update_database_list): Deleted.
1292 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
1293 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
1294 (mdatabase__update): New function.
1295 (mdatabase__check): Return value changed.
1296 (mdatabase__file, mdatabase__lock, mdatabase__save)
1297 (mdatabase__unlock): New functions.
1299 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
1301 * input.c (get_surrounding_text): Return -2 when surrounding text
1303 (get_following_char): Likewise.
1304 (get_preceding_char): Likewise.
1305 (minput__callback): Return 0 if there is a callback function,
1308 2006-08-17 Kenichi Handa <handa@m17n.org>
1310 * input.c (reset_ic): Use shift_state to setup the current state.
1312 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
1314 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
1315 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
1316 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
1318 2006-08-02 Kenichi Handa <handa@m17n.org>
1320 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
1322 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
1324 * font-ft.c (ft_encapsulate): Add code for debugging.
1325 (mfont__ft_drive_otf): Be sure to encode character before getting
1328 2006-07-21 Kenichi Handa <handa@m17n.org>
1330 * draw.c (mdraw_text_extents): Fix previous typo.
1332 2006-07-19 Kenichi Handa <handa@m17n.org>
1334 * draw.c (gstring_width): New arg lbearing.
1335 (render_glyph_string): Adjusted for the change of gstring_width.
1336 (mdraw_text_extents): Fix lbearing of ink and line metrics.
1338 * m17n-core.h (Mlanguage): Extern it.
1340 * m17n.h (Mlanguage): Extern deleted.
1342 * mtext.c (mtext__init): Initialize Mlanguage.
1343 (Mlanguage): Declaration moved from locale.c
1345 * locale.c (mlocale__init): Don't initialize Mlanguage here.
1346 (Mlanguage): Declaration moved to mtext.c.
1348 * language.c (mlang__init): Don't initialize Mlanguage here.
1350 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
1352 2006-07-14 Kenichi Handa <handa@m17n.org>
1354 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
1355 (MRealizedFontFT): New member face_encapsulated.
1356 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
1357 (ft_gen_font): New function.
1358 (ft_add_font): Use ft_gen_font.
1359 (ft_list_script): Store lists in ft_script_list.
1360 (ft_check_otf): New arg ft_face. Caller changed.
1361 (ft_check_language): Likewise.
1362 (ft_check_script): Likewise.
1363 (ft_encapsulate, ft_close): New functions.
1364 (mfont__ft_driver): Initialize members encapsulate and close.
1365 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
1367 * font.h (struct MRealizedFont): New member encapsulating.
1368 (struct MFontDriver): New members encapsulate and close.
1370 * font.c (mfont__match_p): If FONT is realized, check capability
1371 by font drivers's check_capability method.
1372 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
1375 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
1376 declarations of foundry and fam local vars.
1377 (xft_driver): Make it static.
1379 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
1380 (mfont_close): Extern them.
1382 * m17n-gd.c (device_open): Don't specify foundry and family of the
1385 2006-07-11 Kenichi Handa <handa@m17n.org>
1387 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
1389 2006-07-13 Kenichi Handa <handa@m17n.org>
1391 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
1393 (ft_check_script): Delete unused var.
1394 (ft_list_capability): Likewise.
1396 * font.c (mfont__get_capability): Setup cap->otf.
1397 (Motf): Make it global.
1398 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
1400 * font.h (MFontCapability): New member otf.
1402 * language.c (mlang__fini): Delete unused vars.
1404 * m17n-gui.h (Motf): Extern it.
1406 * database.c (update_database_list): Delete unused vars.
1408 2006-07-07 Kenichi Handa <handa@m17n.org>
1410 * font-ft.c (DEVICE_DELTA): Fix typo.
1412 2006-07-06 Kenichi Handa <handa@m17n.org>
1414 * fontset.c (mfont__lookup_fontset): Don't ignore family and
1417 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1419 * database.c: Update comments.
1421 2006-07-05 Kenichi Handa <handa@m17n.org>
1423 * database.c (PATH_MAX): Define it if not yet defined.
1424 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
1426 (get_database_filename): Use GEN_PATH.
1427 (get_dir_info): Don't include the last '/' in directory name.
1428 (register_database): New function.
1429 (update_database_list): Use register_database. Search all
1430 directories in mdatabase__dir_list for wildcard databases.
1431 (mdatabase__init): Check "~/.m17n.d".
1433 2006-07-03 Kenichi Handa <handa@m17n.org>
1435 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
1436 push reverse property.
1438 * plist.c (dump_plist_element): Fix previous change.
1440 2006-06-28 Kenichi Handa <handa@m17n.org>
1442 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
1445 * draw.c (MbidiNSM): New variable.
1446 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
1447 attention to bidi type NSM.
1448 (mdraw__init): Initialize MbibiNSM.
1450 * language.c (mscript__char_list): Fix finding a char-list element.
1452 * plist.c (dump_string): Return number of printed characters.
1453 (dump_plist_element): Print elements more compactly.
1455 2006-06-23 Kenichi Handa <handa@m17n.org>
1457 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
1458 (include_HEADERS): Likewise.
1460 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
1462 * language.c: Update documentation.
1464 2006-06-23 Kenichi Handa <handa@m17n.org>
1466 * font-ft.c (struct MFontFT): Delete member lang.
1467 (free_ft_info): Don't unref member lang. Destroy members langset
1469 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
1470 changed. Set members langset and charset.
1471 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
1473 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
1475 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
1476 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
1477 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
1478 characters at first. If it fails, try listing by language names.
1479 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
1480 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
1481 change of MFontCapability.
1482 (ft_list_capability): Likewise. Try listing by languages, then by
1483 scripts. Check OTF at last.
1484 (ft_check_script): New function.
1485 (ft_select): Adjusted for the check of MFontCapability.
1486 (ft_list_family_names): New function.
1487 (ft_check_capability): If cap->script is not Mnil, call
1489 (mfont__ft_driver): Initialize with ft_list_family_names.
1491 * font.h (struct MFontDriver): New member list_fmaily_names.
1492 (struct): Change member "MSymbol *lang" to "MSymbol language".
1494 * font.c: Include "language.h".
1495 (Motf): New variable.
1496 (otf_script_list, load_otf_script_list): Delete it.
1497 (find_script_from_otf_tag): Delete it.
1498 (merge_capability): New function.
1499 (mfont__init): Init Motf.
1500 (mfont__fini): Don't unref otf_script_list.
1501 (free_font_capability): Check cap->script_tag to determine if
1502 OTF-related capability is set.
1503 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
1504 the change of type MFontCapability.
1505 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
1506 and Motf properties.
1507 (mfont_list): Call merge_capability for LANGUAGE arg.
1508 (mfont_list_family_names): New function.
1510 * input-gui.c: Typo in comments fixed.
1512 * input.c: Typo in comments fixed.
1514 * language.h (mlanguage__list): Delete it.
1515 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
1518 * language.c: Include "mtext.h".
1519 (M_script_lang_list): Delete it.
1520 (language_list, script_list): New variables.
1521 (load_lang_script_list, init_language_list, init_script_list): New
1523 (mlang__init): Don't load language database here.
1524 (mlang__fini): Unref language_list and script_list if not NULL.
1525 (mlanguage__list): Delete it.
1526 (mlanguage__info, mscript__info, mscript__char_list)
1527 (mscript__otf_tag, mscript__from_otf_tag): New functions.
1528 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
1529 (mscript_list, mscript_language_list): New functions.
1531 * m17n-gui.h (mfont_list_family_names): Extern it.
1533 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
1534 (mlanguage_text, mscript_list, mscript_language_list): Extern
1537 2006-06-21 Kenichi Handa <handa@m17n.org>
1539 * m17n-X.c (xfont_driver): Initialize with
1540 xfont_list_family_names.
1541 (xfont_list_family_names): New function.
1542 (xft_driver): Initialize with NULL for list_family_names member.
1543 (device_init): Set list_family_names member of xft_driver to that
1544 of mfont__ft_driver.
1546 2006-06-06 Kenichi Handa <handa@m17n.org>
1548 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
1550 2006-03-24 Kenichi Handa <handa@m17n.org>
1552 * font-ft.c (ft_open): Improve debug message.
1554 * fontset.c (mfontset__get_font): Fix for the case that no font in
1555 per_script list is available.
1557 2006-02-06 Kenichi Handa <handa@m17n.org>
1559 * Version 1.3.3 released.
1561 2006-02-22 Kenichi Handa <handa@m17n.org>
1563 * textprop.c: Fix some typos in documentation.
1565 * plist.c: Fix some typos in documentation.
1567 * m17n-core.h: Fix some typos in documentation.
1568 (M17NLIB_PATCH_LEVEL): Updated to 3.
1569 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
1571 * symbol.c: Fix some typos in documentation.
1573 * mtext.c: Fix some typos in documentation.
1575 * input.c: Fix several typos in documentation.
1577 2006-02-06 Kenichi Handa <handa@m17n.org>
1579 * Version 1.3.2 released.
1581 2006-02-03 Kenichi Handa <handa@m17n.org>
1583 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
1584 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
1586 * font.c (xlfd_parse_name): Fix handling of the name "nil".
1588 * draw.c (layout_glyphs): Fix handling left_padding of
1591 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
1593 2006-02-02 Kenichi Handa <handa@m17n.org>
1595 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
1596 if WITH_GUI is true.
1598 2006-01-25 Kenichi Handa <handa@m17n.org>
1600 * input.c (resolve_expression): If the value of PLIST is a plist,
1601 but the first element is not symbol, return 0.
1603 2006-01-17 Kenichi Handa <handa@m17n.org>
1605 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
1606 HAVE_GD is 2 or the greater.
1608 2006-01-16 Kenichi Handa <handa@m17n.org>
1610 * Version 1.3.1 released.
1612 2006-01-16 Kenichi Handa <handa@m17n.org>
1614 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
1615 simulating anti-aliasing.
1617 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
1618 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
1620 2006-01-12 Kenichi Handa <handa@m17n.org>
1622 * input.c (get_surrounding_text): Always pop ic->plist.
1623 (reset_ic): Don't reset ic->plist.
1625 2006-01-10 Kenichi Handa <handa@m17n.org>
1627 * input.c (preedit_commit): For debugging, print only commiting
1628 charactes. Don't set ic->candidate_show to 0.
1629 (handle_key): Don't run branch-actions just by shifting to the
1631 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
1632 Reset vars and plist.
1634 2006-01-07 Kenichi Handa <handa@m17n.org>
1636 * input.c (load_branch): Confirm that maps is not NULL.
1638 2006-01-05 Kenichi Handa <handa@m17n.org>
1640 * input-gui.c (win_filter): Try to convert arg to key only when
1643 * plist.c (read_integer_element): If '#' and '-' are followed by
1644 non-integer-constituent, read them as a part of a symbol.
1645 (read_symbol_element): New arg C.
1646 (read_element): Adjust args to read_symbol_element.
1648 * input.c (load_macros): On overwriting a macro, free the old
1650 (minput__init): Store Mmap in load_im_info_keys.
1651 (minput_get_title_icon): If the input method has no title, be sure
1653 (minput_get_description): If the input method has no description,
1654 be sure to return NULL.
1655 (minput_get_variables): Fix documentation.
1656 (handle_key): Pay attention to the case that key is Mnil.
1657 (filter): Likewise. Fix handling of such symbol as S-A.
1659 2005-12-22 Kenichi Handa <handa@m17n.org>
1661 * Version 1.3.0 released.
1663 2005-12-22 Kenichi Handa <handa@m17n.org>
1665 * font-ft.c (ft_list): If the specified font has no property,
1668 2005-12-20 Kenichi Handa <handa@m17n.org>
1670 * character.c (mchar_get_prop): Check char_prop_list.
1671 (mchar_put_prop, mchar_get_prop_table): Likewise.
1673 2005-12-18 Kenichi Handa <handa@m17n.org>
1675 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
1676 file name sans language.
1678 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
1680 * input.c: Fix typo in comments.
1682 2005-12-14 Kenichi Handa <handa@m17n.org>
1684 * input.c (minput_get_title_icon): Check the default icon for the
1687 2005-12-13 Kenichi Handa <handa@m17n.org>
1689 * input.c (Mless_equal, Mgreater_equal): New variables.
1690 (parse_expression, resolve_expression, parse_action_list)
1691 (take_action_list): Handle the aboves.
1692 (filter): Treat key S-X as X.
1693 (minput__init): Initialize Mless_equal and Mgreater_equal.
1694 (minput_get_title_icon): New function.
1696 * m17n.h (minput_get_title_icon): Extern it.
1698 * database.c (get_database_filename): Return a filename instead of
1700 (load_database): Adjusted for the above change.
1701 (mdatabase__load_for_keys): Likewise.
1702 (mdatabase__find_file): New function.
1704 * database.h (mdatabase__find_file): Extern it.
1706 * font.h (mfont__resize): Delete extern.
1708 * font.c (mfont__list): Check resize ratio.
1709 (mfont__resize): Delete it.
1710 (mfont_resize_ratio): Include the code of mfont__resize.
1712 * font-ft.c (ft_open): Check resize ratio.
1714 * m17n-X.c (xfont_open): Check resize ratio.
1715 (xft_open): Likewise.
1717 2005-12-07 Kenichi Handa <handa@m17n.org>
1719 * input.c (take_action_list): If take_action_list return -1,
1721 (handle_key): Likewise.
1723 * face.c (mface__for_chars): When font is specified and layouter
1724 is found for it, if the layouter doesn't support one of a
1725 character, use a face sans layouter for it.
1727 2005-12-06 Kenichi Handa <handa@m17n.org>
1729 * fontset.c (mfont__lookup_fontset): If only a fallback font is
1730 found, don't use it for more than one character.
1732 2005-12-05 Kenichi Handa <handa@m17n.org>
1734 * face.c (mface__realize): Set rfont->layouter to Mnil.
1735 (mface__for_chars): Fix handling of layouter.
1737 * character.h (mchar__define_prop): Extern it.
1739 * database.c (update_database_list): Call mchar__define_prop if
1742 * character.c (mchar__init): Don't call mchar_define_property.
1743 Instead just initialize property keys.
1744 (mchar__fini): Free char_prop_list only if it's not NULL.
1745 (mchar__define_prop): New function.
1746 (mchar_define_property): Call mchar__define_prop.
1748 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
1751 2005-12-02 Kenichi Handa <handa@m17n.org>
1753 * language.c (mlang__init): Handle extra chars.
1755 * m17n-gui.h (mfont_check): Adjust prototype.
1757 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
1758 (xfont_check_capability): New function.
1759 (xft_driver): Specify xft_check_capability.
1760 (xft_check_capability): New function.
1762 * font-ft.c (M0_3): Delete it.
1764 (ft_get_charmaps): Refer to M0.
1765 (fc_parse_pattern): Fix previous change.
1766 (ft_list_language): Check also extra chars.
1767 (ft_check_otf): Define it even if HAVE_OTF is undef.
1768 (ft_check_lang): Check the result of FcLangSetHasLang against
1769 FcLangDifferentLang. Check also extra chars.
1770 (ft_list_capability): Delete ifdef HAVE_OTF.
1771 (ft_select): Likewise.
1772 (ft_open): Improve debug information.
1773 (ft_check_capability): New function.
1774 (mfont__ft_driver): Specify ft_check_capability.
1775 (mfont__ft_init): Initialize M0.
1777 * fontset.c (get_font_from_group): New function.
1778 (mfontset__get_font): New function.
1780 * fontset.h (mfontset__get_font): Extern it.
1782 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
1783 (mfont__fini): Delete ifdef HAVE_OTF.
1784 (free_font_capability): Likewise.
1785 (mfont__get_capability): Likewise.
1786 (mfont__check_capability): New function.
1787 (mfont_check): Change the order of arguments. Use
1790 * font.h (struct MFontDriver): New member check_capability.
1791 (MFontCapability): Delete ifdef HAVE_OTF.
1792 (mfont__check_capability): Extern it.
1794 * face.c (mface__realize): Fix handling of FONT arg.
1795 (mface__for_chars): Fix handling of explicitly specified font.
1797 2005-11-25 Kenichi Handa <handa@m17n.org>
1799 * font-flt.c (run_command): Print debug info for
1802 * draw.c (layout_glyphs): Fix handling of left/right_padding.
1804 * face.c (mface__for_chars): Check rfont before accessing the
1807 2005-11-21 Kenichi Handa <handa@m17n.org>
1809 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
1812 * fontset.c (fontset_table): New variable.
1813 (free_fontset): Call M17N_OBJECT_UNREGISTER.
1814 (mfont__fontset_init): Add fontset_table as an object array.
1815 (mfont__realize_fontset): Ref FONTSET.
1816 (mfont__free_realized_fontset): Unref REALIZED->fontset.
1817 (mfontset): Call M17N_OBJECT_REGISTER.
1818 (mfontset_copy): Likewise.
1820 * input.c (handle_key): For debugging, print information about
1822 (filter): Add an alias for Meta and Alt modifiers.
1823 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
1825 (minput__init): Initialize them.
1826 (parse_expression): New function.
1827 (resolve_expression): New function.
1828 (parse_action_list): Handle expressions by parse_expression.
1829 (take_action_list): Handle expressions by resolve_expression.
1830 (parse_nested_list_value): Fix previous change.
1831 (resolve_command): Fix handling of the return value of
1834 2005-11-18 Kenichi Handa <handa@m17n.org>
1836 * font-ft.c (ft_check_otf, otf_script_list): Define only when
1837 HAVE_OTF is defined.
1838 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
1840 (ft_select): Likewise.
1842 * font.c (mfont_list): Fix for the case that FONT is NULL.
1843 (OTF_tag): Delete it.
1844 (load_otf_script_list): Define only when HAVE_OTF is defined.
1845 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
1848 * draw.c (truncate_gstring): Be sure to truncate at
1849 glapheme-cluster boundary.
1851 2005-11-11 Kenichi Handa <handa@m17n.org>
1853 * input.c (delete_surrounding_text): Clear cache if necessary.
1855 2005-11-09 Kenichi Handa <handa@m17n.org>
1857 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
1858 glyph prev is also supported by the current flt.
1860 2005-11-08 Kenichi Handa <handa@m17n.org>
1862 * m17n-X.c (xft_render): Cancel previous change.
1864 2005-11-07 Kenichi Handa <handa@m17n.org>
1866 * input.c: Include <stdlib.h>.
1867 (get_surrounding_text, delete_surrounding_text)
1868 (get_preceding_char, get_following_char): New functions.
1869 (integer_value): New arg surrounding. If it is nonzero, try to
1870 get a surrounding character. Callers changed.
1871 (take_action_list): Check `value' before setting an element.
1872 (destroy_ic): Unref ic_info->preceding_text and
1873 ic_info->following_text.
1874 (minput__init): Initialize Minput_get_surrounding_text and
1875 Minput_delete_surrounding_text.
1876 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
1878 (filter): Unref ic_info->preceding_text and
1879 ic_info->following_text.
1881 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
1884 * input.h (MInputContextInfo): New members preceding_text and
1887 2005-11-04 Kenichi Handa <handa@m17n.org>
1889 * input.c (parse_nested_list_value): Fix handling of the global
1891 (get_nested_list): Get global definitions by load_partial_im_info.
1892 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
1893 MInputCandidatesChanged.
1894 (take_action_list): Likewise.
1895 (reset_ic): Likewise.
1896 (create_ic): Don't pay special attention to
1897 Mcandidates_group_size.
1898 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
1899 (minput_set_variable): Get a definition of varible by
1900 mplist_find_by_value, not mplist_get.
1902 * m17n.h (enum MInputCandidatesChanged): New enum.
1904 2005-11-01 Kenichi Handa <handa@m17n.org>
1906 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
1908 (mwin__destroy_window): If xft_draw's drawable is win, change it
1909 to device->drawable before destroying win.
1911 2005-10-31 Kenichi Handa <handa@m17n.org>
1913 * input.c (load_im_info): Fix adding of state.
1915 * m17n-core.c (m17n_fini_core): Fix reporting of module
1918 * m17n.c (m17n_fini): Fix reporting of module finalization.
1920 * m17n-gui.c (m17n_init_win): Fix reporting of module
1923 2005-10-29 Kenichi Handa <handa@m17n.org>
1925 * input.c (get_candidate_list): Fix the timing of referring plist.
1927 2005-10-28 Kenichi Handa <handa@m17n.org>
1929 * input.c (load_branch): Ignore an undefined map name.
1930 (load_im_info): Set im_info->title from `name' only if it's not
1932 (shift_state): Always update ic->status.
1933 (adjust_candidates): Renamed from adjust_candidate_command.
1934 Argument changed. Caller changed.
1935 (get_candidate_list, regularize_action): New functions.
1936 (take_action_list): Use them. On handling Munhandle, don't set
1938 (handle_key): If KEY is not handled by MAP, and MAP has
1939 branch_actions, perform them.
1941 * database.c (mdatabase__fini): Free dir_info->filename;
1943 2005-10-20 Kenichi Handa <handa@m17n.org>
1945 * input.c (marker_code): Accept '@@'.
1946 (integer_value): Handle '@@'.
1947 (parse_action_list): Accept a symbol argument.
1948 (take_action_list): Resolve the symbol argument. Handle the
1951 2005-10-18 Kenichi Handa <handa@m17n.org>
1953 * input.c: Include "charset.h".
1954 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
1956 (MIMState): New member (M17NObject control).
1957 (lookup_nested_list, set_nested_list, parse_nested_list_value)
1958 (get_nested_list, resolve_variable): New functions.
1959 (integer_value): New arg (MPlist **value). Set it to the plist
1960 element containing the value.
1961 (resolve_command): New function.
1962 (load_translation): New arg (MPlist *map_actions).
1963 (load_branch): New args language and name. If `keylist' is a
1964 symbol, resolved that as a command name.
1965 (free_map): New arg top. Free map->map_actions only if top is
1967 (free_state): New function.
1968 (load_state): New arg name.
1969 (im_info_list): New variable.
1970 (free_im_info, get_im_info_by_tags): New functions.
1971 (load_im_info): Arg key changed to plist. Handle `include'.
1972 Return (MInputMethodInfo *).
1973 (preedit_commit): Ref ic->candidate_list.
1974 (get_select_charset, adjust_candidate_command): New functions.
1975 (take_action_list): Handle `include'. Adjust candidate action
1976 properly. Handle control variables `candidates-charset' and
1977 `candidates-group-size'.
1978 (open_im): Use get_im_info.
1979 (create_ic): Get global variables.
1980 (load_partial_im_info): New function.
1981 (get_im_info): New function.
1982 (check_command_keyseq, check_command_list, check_variable_list):
1984 (minput__init): Don't handle M_database_hook and Mdetail_text.
1985 Initialize M_candidates, Mcandidates_group_size,
1986 Mcandidates_charset.
1987 (parse_variable_list, get_variable_list, parse_command_list)
1988 (get_command_list): Delete them.
1989 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
1990 (minput__fini): Simply unref command_list and variable_list.
1991 (minput_get_description): Adjusted for the new form of description.
1992 (minput_get_commands): Use get_nested_list.
1993 (minput_assign_command_keys): Likewise.
1994 (minput_get_variables, minput_set_variable): Likewise.
1996 * input.h (MInputMethodInfo): New members im and maps.
1998 * database.h (M_database_hook): Delete extern.
1999 (MDatabaseHookFunc): Delete extern.
2000 (mdatabase__check): Extern it.
2002 * database.c: Include <glob.h>.
2003 (MAX_TIME): New macro.
2004 (Masterisk): New variable.
2005 (get_database_stream): Argument changed to (MDatabaseInfo *).
2007 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
2008 (find_database): New function.
2009 (update_database_list): New function.
2010 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
2011 calling update_database_list.
2012 (mdatabase__check): New function.
2013 (mdatabase_find): Use update_database and find_database. Don't
2014 handle MDatabaseHookFunc.
2015 (mdatabase_list): Call update_database at first.
2016 (mdatabase_define): Adjusted for the change of mdb->extra_info.
2017 (MDatabaseList): New type.
2019 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
2021 * m17n.h (Mdetail_text): Delete extern.
2023 * m17n-core.h (mplist_conc): Delete extern.
2025 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
2027 (mplist_conc): Renamed to mplist__conc.
2028 (mplist__pop_unref): New function.
2030 2005-10-14 Kenichi Handa <handa@m17n.org>
2032 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
2034 (read_element): If keys is an empty plist, return any element
2036 (dump_plist_element): Check if plist is nested.
2037 (mplist_conc): Always ref tail.
2038 (mplist_set): If key is a managing key, ref val in advance.
2040 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
2041 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
2042 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
2045 * fontset.c (free_fontset): Unref fontset_list if necessary.
2046 (mfont__fontset_fini): Don't free fontset_list. Unref
2048 (mfont__realize_fontset): Initialize request.
2049 (mfontset): Ref default_fontset or fontset only if necessary.
2050 (mfontset_copy): Don't ref copy.
2052 * draw.c (render_glyphs): Check gend->type before checking
2055 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
2056 unrefed plists to NULL.
2058 2005-10-04 Kenichi Handa <handa@m17n.org>
2060 * textprop.c (mtext_serialize): Be sure to make mt
2061 MTEXT_FORMAT_UTF_8 and NULL terminated.
2063 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
2065 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
2067 2005-10-03 Kenichi Handa <handa@m17n.org>
2069 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
2070 is not at the beginning of line.
2072 2005-09-22 Kenichi Handa <handa@m17n.org>
2074 * input.c: Include <sys/stat.h> and <unistd.h>.
2075 (Minclude, Mcommit, Munhandle): New variables.
2076 (minput__init): Initialize them. Push only Mstate to
2077 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
2078 (parse_action_list): Allow integer arg for undo. Handle Mcommit
2080 (load_input_method): Handle "include" directive. If no states are
2082 (shift_state): If state_name is Mt, shift back to the previous
2083 state. Call preedit_commit to commit preedit text.
2084 (preedit_commit): New function.
2085 (take_action_list): Improve debug printing. Handle commit and
2087 (handle_key): Check the return value of take_action_list. Don't
2088 take branch_actions just after changing to the root map.
2089 (reset_ic): Reset all ic_info members.
2090 (filter): When a key is not handled, just move ic_info->keys
2091 instead fo calling reset_ic.
2092 (load_im_info): If key is not Mstate, push Mmap to
2094 (MDatabaseStatList): New type.
2095 (imdir_stat_list): New variable.
2096 (input_method_hook): Don't cancel the hook. Check the
2097 modification time of directories.
2098 (minput__fini): Free imdir_stat_list;
2100 * input.h (MInputContextInfo): New member prev_state.
2102 * m17n-core.h (mplist_conc): Extern it.
2104 * plist.c (mplist_conc): New function.
2106 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
2108 * font.h (MRealizedFont): New member average_width.
2110 * font-ft.c (ft_open): Set rface->average_width.
2112 * font.c (xlfd_unparse_name): Print '*' before registry name.
2114 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
2115 (xfont_open): Set rfont->average_width.
2116 (xft_open): Likewise.
2117 (device_open): Initialize disp_info->AVERAGE_WIDTH.
2119 * internal-gui.h (struct MFrame): New member average_width.
2121 * m17n-gui.c (mframe): Fix setting of frame->rfont.
2122 (mframe_get_prop): Return the average_width of a font.
2124 * face.c (mface__realize): Set rface->average_width.
2125 (mface__update_frame_face): Set frame->average_width.
2127 * face.h (MRealizedFace): New member average_width.
2129 2005-09-19 Kenichi Handa <handa@m17n.org>
2131 * font.c (xlfd_unparse_name): New arg full_xlfd.
2132 (mfont__encode_char): Use shortcut only for X core fonts.
2133 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
2134 (mfont_put_prop): Handle `language' property.
2135 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
2136 Print file can capability info too.
2138 * m17n-core.c (mdebug__output): New variable.
2139 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
2140 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
2141 (m17n_fini_core): Close mdebug__output if it's not stderr.
2143 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
2144 (xfont_open): Handle baseline_offset.
2145 (xfont_find_metric): Likewise.
2146 (xfont_render): Likewise.
2147 (xft_open): Likewise.
2148 (xft_render): Likewise.
2150 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
2151 (mdebug__output): Extern it.
2152 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
2153 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
2154 (MDEBUG_DUMP): New macro.
2155 (MDEBUG_PRINT_TIME): Print to medebug__output.
2157 * font.h (MRealizedFont): New member baseline_offset.
2159 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
2161 (fc_weight_table): Add FC_WEIGHT_REGULAR.
2162 (ft_list_family): Check alias.
2163 (ft_list_language): If language is "en", don't try to the second
2165 (ft_default_list): New variable.
2166 (ft_list_default): New function.
2167 (ft_select): If family is not specified, try only the default
2168 fonts. Treat the weights normal and medium same.
2169 (ft_open): Fix debug message. If registry is not specified, try
2170 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
2171 (ft_find_metric): Likewise.
2172 (ft_render): Likewise.
2173 (ft_list): Fix debug message. Accept the registring iso8859-1.
2174 If family is not specified, try only the default fonts.
2176 * face.c (mface__realize): Fix logic of opening a font.
2178 2005-09-16 Kenichi Handa <handa@m17n.org>
2180 * face.c (mface__realize):
2182 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
2185 * input.c (shift_state): Fix the condition of taking init actions.
2186 (take_action_list): Fix handling of pushback action.
2187 (handle_key): Don't change key while checking its alias.
2188 (minput__init): Initialize new variables.
2189 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
2192 2005-09-12 Kenichi Handa <handa@m17n.org>
2194 * mtext.c (mtext__uppercase): Add proper open/close parens.
2195 (mtext_titlecase): Add proper casting.
2197 * input.c (parse_action_list): Handle the case that the arg is a
2198 key sequence (MText or MPlist).
2199 (take_action_list): Likewise.
2200 (shift_state): Shorter debug message.
2201 (handle_key): Terminate a debug message by "\n".
2202 (reset_ic): Don't take initial actions here.
2203 (minput_open_im): Print a debug message.
2204 (minput_close_im): Likewise.
2205 (minput_create_ic): Likewise.
2206 (minput_destroy_ic): Likewise.
2208 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
2210 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
2213 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
2214 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
2217 * character.c: Add Japanese documentation for
2218 mchar_get_prop_table ().
2220 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
2222 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
2223 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
2224 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
2226 (init_case_conversion): New function.
2227 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
2228 (uppercase_precheck, lowercase_precheck, final_sigma)
2229 (after_soft_dotted, more_above, before_dot, after_i)
2230 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
2232 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
2234 * plist.c (read_mtext_element): Fix previous change.
2236 2005-09-05 Kenichi Handa <handa@m17n.org>
2238 * plist.c (read_mtext_element): Handle \uXXXX notation.
2240 * internal.h (MTABLE_MALLOC): Don't use a local variable.
2241 (MTABLE_ALLOCA): Change the name of local variable.
2243 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
2244 HAVE_FREETYPE are defined.
2246 * m17n-X.c: Check HAVE_X11.
2248 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
2249 directory listing libraries.
2250 (noinst_PROGRAMS): Define it only in maintainer mode.
2252 2005-09-02 Kenichi Handa <handa@m17n.org>
2254 * m17n-gui.h (mdraw_line_break_option): Extern it.
2256 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
2257 end of the first glyph.
2258 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
2260 (mdraw_line_break_option): New variable.
2261 (mdraw_default_line_break): Use mtext_line_break.
2263 * mtext.h (wordseg_func_table): Don't extern it.
2264 (mtext__wseg_fini): Extern it.
2266 * mtext.c: Don't include word-thai.h.
2267 (wordseg_func_table): Delete this variable.
2268 (mtext__init): Don't initialize above. Don't call
2269 mtext__word_thai_init.
2270 (mtext__fini): Don't free wordseg_func_table. Call
2271 mtext__wseg_fini instead fo mtext__word_thai_fini.
2272 (MTextWordsegFunc): Don't typedef it.
2273 (mtext__word_segment): Moved to mtext-wseg.c.
2275 * m17n-core.h (enum MTextLineBreakOption): New enum.
2276 (mtext_line_break): Extern it.
2278 * mtext-wseg.c: New file.
2280 * mtext-lbrk.c: New file.
2282 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
2283 add mtext-lbrk.c and mtext-wseg.c.
2285 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
2286 the case that head is NULL.
2288 2005-09-01 Kenichi Handa <handa@m17n.org>
2290 * word-thai.c (wordseg_propertize): If the property value is nil,
2291 don't make the property no-merge.
2292 (thai_wordseg): Don't require *from and *to are set a priori. Pay
2293 attention to the case that they are NULL.
2294 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
2297 * character.c (mchar_get_prop_table): New function.
2299 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
2301 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
2302 (mchar_get_prop_table): Extern it.
2304 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
2305 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
2307 * internal.h (enum MTextCoverage): New enum.
2308 (MText): New member coverage.
2310 * mtext.c (FORMAT_COVERAGE): New macro.
2311 (insert): Copy mt2->coverage.
2312 (mtext__from_data): Initialize mt->coverage.
2313 (mtext__adjust_format): Update mt->coverage.
2314 (mtext): Initialize mt->coverage.
2315 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
2316 Update mt->coverage if necessary.
2317 (mtext_duplicate): Copy mt->coverage.
2318 (mtext_insert, mtext_replace): New functions.
2319 (mtext_dup): Use mtext_duplicate.
2320 (mtext__word_segment): Don't set *from and *to if a word
2321 segmentation funcion is not found.
2322 (mtext_ins_char): Fix typo.
2324 2005-08-25 Kenichi Handa <handa@m17n.org>
2326 * font.h (MFont): New member for_full_width.
2328 * font.c (compare_font_score): Prefer a font of not
2331 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
2332 registry charset of a font is one of CJK charsets.
2334 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
2335 supports some of CJK.
2337 2005-08-24 Kenichi Handa <handa@m17n.org>
2339 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
2341 * m17n-gui.c (null_device_open): Check Mresolution param and set
2344 * m17n-gd.c (device_open): Check Mresolution param and set
2347 * m17n-X.c (MWDevice): New member resy.
2348 (xfont_open): Set ascent, descent, and max_advance members of
2350 (xft_open): Likewise.
2351 (device_open): Compare also screen_num to find a device. Set
2352 device->resy and frame->dpi.
2354 * internal-gui.h (MFrame): New member dpi.
2356 * font.h (MRealizedFont): New member max_advance.
2358 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
2359 (mfont__init): Don't initialize Mascent, Mdescent.
2360 (Mascent, Mdescent): Delete these variables.
2361 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
2362 Mfont_descent instead of Mascent and Mdescent.
2363 (mfont_put_prop): Allow negative size.
2364 (mfont_find): Handle the case of spec->size < 0. Fix previous
2366 (mfont_list): Handle the case of spec->size < 0.
2367 (mfont_check): Likewise.
2369 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
2370 (fc_get_pattern): Handle the case of font->size < 0.
2371 (ft_open): Set ascent, descent, and max_advance members of rfont.
2372 (ft_find_metric): Improve rounding.
2373 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
2376 * face.c (mface__realize): Handle the case of font->size < 0.
2378 2005-08-22 Kenichi Handa <handa@m17n.org>
2380 * coding.c (MConverterStatus): Change the member buf to union.
2381 (mconv_buffer_converter): Add const to the arg buf.
2382 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2383 (mconv_decode): Adjusted for the change of MConverterStatus.
2384 (mconv_encode_range): Likewise.
2386 * m17n.h (mconv_buffer_converter): Prototype adjusted.
2387 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2389 2005-08-20 Kenichi Handa <handa@m17n.org>
2391 * m17n-gui.h (mfont_from_name): Prototype adjusted.
2392 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
2394 * m17n-X.c (xfont_open): Set members ascent, descent, and
2395 max_advance of rfont.
2396 (xft_open): Likewise.
2398 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
2400 (mfont__ft_parse_name): Add const to the arg name.
2402 * font.c (xlfd_parse_name): Add const to the arg name. Call
2403 mfont__set_property instead of mfont_set_spec. Set font->spacing.
2404 (xlfd_unparse_name): Handle spacing.
2405 (mfont__init): Initialize new variables.
2406 (mfont__id): Handle spacing.
2407 (mfont__merge): Likewise.
2408 (mfont__set_spec): This function deleted.
2409 (mfont__parse_name_into_font): Add const to the arg name. Fix the
2410 condition of calling mfont__ft_parse_name.
2411 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
2412 (mfont_get_prop): Handle properties spacing, ascent, descent,
2414 (mfont_find): Return a realized font.
2415 (mfont_from_name): Add const to the arg name.
2417 * font.h (enum MFontProperty): New member MFONT_SPACING.
2418 (enum MFontSpacing): New enum.
2419 (MFont): New members spacing and max_advance.
2420 (mfont__ft_parse_name): Prototype adjusted.
2421 (mfont__set_spec): Extern deleted.
2422 (mfont__parse_name_into_font): Prototype adjusted.
2424 2005-08-19 Kenichi Handa <handa@m17n.org>
2426 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
2428 * font.c (mfont_list): If FONT is null, use a temporary font.
2429 (mfont_parse_name): Add const to the arg name.
2431 2005-08-18 Kenichi Handa <handa@m17n.org>
2433 * word-thai.c: Surround code by #ifdef and #endif to escape from
2436 * font-ft.c: Mostly re-written.
2438 * font-flt.c (FontLayoutCmdOTF): This type deleted.
2439 (FontLayoutCmd): Type of the member otf changed..
2440 (load_otf_command): Adjusted for the format change of otf command.
2441 (load_command): Likewise.
2442 (free_flt_command): Unref cmd->body.otf.
2443 (run_otf): Ajusted for the type change of otf_cmd.
2444 (run_command): Ajusted for the type change of otf_cmd. On
2445 debugging, print ctx->combining_code.
2446 (mfont__flt_run): Initialize ctx's members code_offset,
2447 combining_code, and left_padding to 0.
2449 * face.h (struct MRealizedFace): New member font.
2450 (mface__realize): Prototype adjusted.
2452 * face.c (find_realized_face): New arg font.
2453 (find_realized_face): Adjusted for the change of MFont.
2454 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
2455 (mface__fini): Don't call mdebug__report_object.
2456 (mface__realize): New arg font.
2457 (mface__for_chars): Adjusted for the change of mfont__encode_char.
2458 Optimize the latin case.
2459 (mface__free_realized): Free rface->font.
2460 (mface__update_frame_face): Adjusted for the change of mface__realize.
2461 (mface_equal): New function.
2463 * draw.c (Mcommon): New variable.
2464 (visual_order): Args to mfont__encode_char changed.
2465 (compose_glyph_string): Handle Mfont text property.
2466 (layout_glyphs): Adjusted for the change of MFont.
2467 (mdraw__init): Initialize Mcommon.
2468 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
2470 * font.h (enum MFontType): Members completely changed.
2471 (enum MFontProperty): Move MFONT_SIZE to the tail.
2472 (enum MFontSource): New enum.
2473 (struct MFont): New members type, source, sizes, file, capability,
2475 (struct MRealizedFont): Type of member font changed. Members
2476 score, status, and encoding deleted.
2477 (MFontScore): New type.
2478 (MFontList): Member changed.
2479 (struct MFontDriver): New member has_char. Types of members
2481 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2482 (Mapple_roman): Extern them.
2483 (OTF_Tag): Typedefed if not HAVE_OTF.
2484 (enum MFontOpenTypeTable): New enum.
2485 (MFontCapability): New type.
2486 (mfont__ft_drive_otf): Prototype adjusted.
2487 (mfont__score): Extern deleted.
2488 (mfont__merge): Extern it.
2489 (mfont__has_char): Extern it.
2490 (mfont__encode_char): Prototype adjusted.
2491 (mfont__open): Extern it.
2492 (mfont__set_spec): Prototype adjusted.
2493 (mfont__get_capability): Extern it.
2495 * font.c: Include "fontset.h".
2496 (M_font_capability, M_font_list, M_font_list_len): New variables.
2497 (font_score_priority): Change order of initial elements.
2498 (font_score_shift_bits): Fix array size.
2499 (common_weight): Add "thin", "semibold", and "heavy".
2500 (common_stretch): Add "ultracondensed", "extracondensed",
2501 "extraexpanded", and "utltraexpand".
2502 (font_weight_regular, font_weight_normal, font_weight_medium): New
2504 (gen_font_name): This function deleted.
2505 (find_encoding): Set font->encoding.
2506 (OTF_tag): New function.
2507 (otf_script_list): New variable.
2508 (load_otf_script_list): New function.
2509 (find_script_from_otf_tag): New function.
2510 (xlfd_parse_name): Set font->type and font->source.
2511 (mfont__free_realized): Free chains rfonts.
2512 (font_score): Renamed from mfont__score.
2513 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2514 (Mapple_roman): New variables.
2515 (mfont__init): Initilize new variables. Initalize
2516 default_encoding.encoding_name and
2517 default_encoding.encoding_charset to Municode_full and
2518 mcharset__unicode. Use SAFE* macros for allocating filepath
2520 (mfont__fini): Free otf_script_list.
2521 (mfont__id): New function.
2522 (mfont__match_p): Check also capability member of MFont.
2523 (mfont__merge): New funciton.
2524 (mfont__set_spec_from_face): Set type and source members.
2525 (mfont__set_spec_from_plist): Set capability and type members.
2526 (mfont__select): Argument changed.
2527 (mfont__available): New function.
2528 (compare_font_score): New function.
2529 (mfont__list): New function.
2530 (mfont__open): Return a realized font.
2531 (mfont__resize): Adjusted for the change of MFont.
2532 (mfont__has_char): New function.
2533 (mfont__encode_char): Argument changed.
2534 (mfont__set_spec): Argument changed.
2535 (free_font_capability): New function.
2536 (mfont__get_capability): New function.
2537 (MFontfile): New variable.
2538 (mfont_get_prop): Adjusted for the change of MFont.
2539 (mfont_put_prop): Likewise.
2540 (mfont_set_selection_priority): Fix the way of setting
2541 font_score_priority[].
2542 (mfont_find): Use mfont__list instead of mfont__select.
2543 (mfont_resize_ratio): Adjusted for the change of MFont.
2544 (mfont_list): Use mfont__list.
2545 (mfont_check): New function.
2546 (font_score): Make it static.
2548 * fontset.h (mfont__realize_fontset): Prototype adjusted.
2549 (mfont__lookup_fontset): Likewise.
2551 * fontset.c (struct MFontset): Delete member font_spec_list.
2552 (struct MRealizedFontset): Type of member spec changed. New
2554 (load_font_group): Arg spec_list deleted.
2555 (load_fontset_contents): Adjusted for the change of fontset_def.
2556 (free_fontset): Fix the way of freeing fontset elements.
2557 (realize_fontset_elements): Argument changed.
2558 (get_per_script): New function.
2559 (free_realized_fontset_elements): Fix the way of feeing rfontset
2561 (update_fontset_elements): Fix args to realize_fontset_elements.
2562 (mfont__realize_fontset): New arg spec.
2563 (try_font_list): New function.
2564 (try_font_group): New arg request. Use try_font_list.
2565 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
2567 (mfontset): Adjusted for the change of MFontset.
2568 (mfontset_copy): Likewise. Don't share plists.
2569 (mfontset_modify_entry): Adjusted for the change of MFontset.
2570 (mfontset_lookup): Call get_per_script.
2571 (mdebug_dump_fontset): Print also the address of fonts.
2573 * input.c (shift_state): Don't reset ic_info->vars.
2574 (take_action_list): Call MDEBUG_PRINT fore calling
2577 * internal-gui.h (MFontDriver): Don't typedef it here.
2579 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
2580 (MXFont): This type deleted.
2582 (struct _MFontX): New struct.
2583 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
2584 (MDisplayInfo): Member base_font_list deleted.
2585 (DEFAULT_FONT): Definition changed.
2586 (FALLBACK_FONT): This maclr deleted.
2587 (free_display_info): Adjusted for the change of MDisplayInfo.
2588 (free_device): Argument to mfont__free_realized changed.
2589 (xfont_driver): Adjusted for the change of MFontDriver.
2590 (xfont_registry_list): Use MFontX instead of MXFont.
2591 (MRealizedFontX): Renamed from MXFontInfo.
2592 (xfont_select): Return the font found first.
2593 (close_xfont): Change MXFontInfo to MRealizedFontX.
2594 (xfont_open): Return the realized font.
2595 (xfont_find_metric): Get xfont from rfont->fontp.
2596 (xfont_has_char): New function.
2597 (xfont_encode_char): Adjusted for the argument change.
2598 (xfont_render): Get xfont from rfont->fontp.
2599 (xfont_list): Adjusted for the argument change.
2600 (MRealizedFontXft): Renamed from MXftFontInfo.
2601 (xft_driver): Ajusted for the change of MFontDriver.
2602 (close_xft): Change MXtfFontInfo to MRealizedFontXft
2603 (xft_open_font): Argument changed.
2604 (xft_open): Argument changed. Return the realized font.
2605 (xft_find_metric): Get xft_font from rfont->fontp.
2606 (xft_has_char, xft_encode_char): New functions.
2607 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
2608 font if not yet opened.
2609 (device_open): Don't set frame->font.
2611 * m17n-gd.c (gd_font_driver): Adjusted for the change of
2613 (gd_font_open): New function.
2614 (gd_render): Don't use the local variable ft_info.
2615 (device_init): Adjusted for the change of gd_font_driver.
2617 * textprop.c (mtext__prop_init): Initialize text_property_table.
2618 Call M17N_OBJECT_ADD_ARRAY.
2619 (mtext__prop_fini): Don't call mdebug__report_object.
2621 * plist.c (mplist__init): Initialize plist_table.
2622 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
2623 (mplist__fini): Don't call mdebug__report_object.
2625 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
2626 (mtext__fini): Don't call mdebug__report_object.
2627 (MTEXT_FORMAT_UTF_16): Correct type.
2628 (mtext_data): New function.
2629 (mtext_text): Fix calculation of limit and args to
2632 * language.c: Include "plist.h".
2633 (M_script_lang_list): New variable.
2634 (mlang__init): Read languages and their information from m17n
2636 (mlanguage__list): New function.
2637 (Miso639_1, Miso639_2): New variables.
2639 * language.h (mlanguage__list): Extern it.
2641 * database.c (get_database_stream): Use SAFE_* macros for
2642 allocating and freeing path.
2643 (mdatabase__init): Likewise.
2645 * symbol.c (msymbol__fini): Don't free symbols here.
2646 (msymbol__free_table): New function.
2647 (msymbol_is_managing_key): New function.
2649 * symbol.h (msymbol__free_table): Extern it.
2650 (msymbol__list): Extern it.
2652 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
2654 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
2655 (struct _M17NObjectArray): New member name and next.
2656 (mdebug__add_object_array): Extern it.
2657 (M17N_OBJECT_ADD_ARRAY): New macro.
2658 (mdebug__report_object): Don't extern it.
2660 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
2662 * m17n-gui.c (free_frame): Don't free frame->font.
2663 (null_device_fini): Fix code for freeing
2664 null_device.realized_font_list.
2665 (m17n_fini_win): Free interface.
2666 (mframe): Cast the return value of dlsym. Set frame->font here.
2667 (mframe_get_prop): Check frame->rface->rfont before accessing the
2670 * m17n-gui.h (Mfontfile): Extern it.
2671 (mfont_check): Extern it.
2672 (mface_equal): Extern it.
2674 * m17n-core.c: Include "symbol.h".
2675 (report_header_printed): This variable deleted.
2676 (object_array_root): New variable.
2677 (report_object_array): New function.
2678 (mdebug__report_object): This function deleted.
2679 (mdebug__add_object_array): New function.
2680 (m17n_init_core): Call mchartable_init () before mtext_init ().
2681 (m17n_fini_core): Call report_object_array (if necessary) and
2682 msymbol__free_atable at the end.
2684 * m17n-core.h (msymbol_is_managing_key): Extern it.
2685 (mtext_data): Extern it.
2686 (MTEXT_FORMAT_UTF_16): Correct type.
2687 (M17NLIB_MINOR_VERSION): Changed to 3.
2688 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
2690 * chartab.c (mchartable__init): Initalize chartable_table.count.
2691 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
2692 mdebug__report_object.
2694 2005-05-26 Kenichi Handa <handa@m17n.org>
2696 * m17n.h (Miso639_1, Miso639_2): Extern them.
2698 * symbol.h (msymbol__list): Extern it.
2700 * symbol.c (msymbol__list): New function.
2702 2005-05-19 Kenichi Handa <handa@m17n.org>
2704 * input-gui.c (minput__win_init): Don't change the value of
2707 2005-05-16 Kenichi Handa <handa@m17n.org>
2709 * m17n-core.c (m17n_object): Be sure to initialize all members.
2711 * font-ft.c (fc_decode_prop): Fix args to msymbol.
2713 2005-05-09 Kenichi Handa <handa@m17n.org>
2715 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
2717 2005-04-27 Kenichi Handa <handa@m17n.org>
2719 * language.c (mlang__init): Add "an" (Aragonese).
2721 * word-thai.c: Add support for libthai.
2722 (mtext__word_thai_init): Initialize wordseg library conditionaly.
2723 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
2725 * mtext.c: Include "word-thai.h" conditionaly.
2726 (mtext__init): Call mtext__word_thai_init conditionaly.
2727 (mtext__fini): Call mtext__word_thai_fini conditionaly.
2729 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
2730 not WORDCUT_LD_FLAGS.
2732 2005-04-19 Kenichi Handa <handa@m17n.org>
2734 * word-thai.c (wordseg_propertize): Always unref the attached
2736 (thai_wordseg): Don't unref the property.
2738 2005-04-18 Kenichi Handa <handa@m17n.org>
2740 * word-thai.c: Include stdlib.h.
2741 (wordseg_propertize): Add dummy function for the case that wordcut
2742 library doesn't exist.
2743 (wordseg_propertize): Fix for old wordcut library.
2745 2005-04-16 Kenichi Handa <handa@m17n.org>
2747 * word-thai.c: Include <stdio.h>.
2749 2005-04-15 Kenichi Handa <handa@m17n.org>
2751 * draw.c: Include mtext.h.
2752 (linebreak_table, M_break_at_space, M_break_at_word)
2753 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
2754 (compose_glyph_string): Check POS before getting Mface text
2756 (truncate_gstring): Give correct TO arg to line_break function.
2757 (GET_LB_TYPE): New macro.
2758 (find_break_backward, find_break_forward): New functions.
2759 (mdraw__init): Initialize the above new variables.
2760 (mdraw__fini): Free linebreak_table.
2761 (mdraw_default_line_break): Use find_break_backward and
2764 * word-thai.c: New file.
2766 * word-thai.h: New file.
2768 * mtext.c: Include word-thai.h.
2769 (wordseg_func_table): New variable.
2770 (mtext__init): Initialize wordseg_func_table and call
2771 mtext__word_thai_init.
2772 (mtext__fini): Call mtext__word_thai_fini, free
2774 (MTextWordsegFunc): New type.
2775 (mtext__word_segment): New function.
2777 * mtext.h (wordseg_func_table): Extern it.
2778 (mtext__word_segment): Extern it.
2780 * m17n.c (m17n_init): Fix typo (== -> =).
2782 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
2783 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
2785 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
2786 (MTEXTPROP_VAL): New macros.
2788 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
2790 2005-04-07 Kenichi Handa <handa@m17n.org>
2792 * database.c (load_chartable): Fix pursing of symbol name.
2794 2005-03-24 Kenichi Handa <handa@m17n.org>
2796 * m17n.c (m17n_init): Fix typo (== -> =).
2798 2005-03-11 Kenichi Handa <handa@m17n.org>
2800 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
2802 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
2804 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
2807 2005-03-09 handa <handa@m17n.org>
2809 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
2810 calling m17n_init ().
2812 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
2813 calling m17n_init_core ().
2815 2005-02-28 Kenichi Handa <handa@m17n.org>
2817 * font-flt.c (mfont__flt_run): Add resulting code sequence in
2820 2005-02-17 Kenichi Handa <handa@m17n.org>
2822 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
2823 (M_description, M_command, M_variable): New variables.
2824 (load_im_info_keys): New variables.
2825 (load_im_info, check_command_keyseq, get_description_advance)
2826 (parse_command_list, get_command_list, parse_variable_list)
2827 (get_variable_list, input_method_hook): New functions.
2828 (command_list, variable_list): New variables.
2829 (minput__init): Put input_method_hook to Minput_method.
2830 Initialize M_description, M_command, M_variable, Mdetail_text,
2831 load_im_info_keys, command_list, variable_list.
2832 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
2833 (Mdetail_text): New variable.
2834 (minput_get_description, minput_get_commands)
2835 (minput_assign_command_keys, minput_get_variables)
2836 (minput_set_variable): New functions.
2838 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
2839 (minput_assign_command_keys, minput_get_variables)
2840 (minput_set_variable): Extern them.
2842 * plist.c (UNGETC): Just decrement st->p.
2843 (read_mtext_element): New arg skip.
2844 (read_integer_element): Likewise.
2845 (read_symbol_element): Likewise.
2846 (read_element): New arg KEYS.
2847 (mplist__from_plist): Don't increment ref-count of NULL object.
2848 (mplist__from_file): New arg KEYS.
2849 (mplist_put): Don't increment ref-count of NULL object.
2850 (mplist_add): Likewise.
2851 (mplist_push): Likewise.
2852 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
2854 * plist.h (mplist__from_file): Prototype adjusted.
2856 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
2857 (get_database_stream): New function.
2858 (load_database): Use get_database_stream.
2859 (M_database_hook): New variable
2860 (mdatabase__init): Initialize M_database_hook.
2861 (mdatabase__load_for_keys): New function.
2862 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
2864 (mdatabase_define): Free mdb->extra_info if necessary.
2866 * database.h (mdatabase__dir_list, M_database_hook)
2867 (mdatabase__load_for_keys): Extern them.
2868 (MDatabaseHookFunc): New type.
2870 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
2872 2004-12-27 Kenichi Handa <handa@m17n.org>
2874 * Version 1.2.0 released.
2876 2004-12-27 Kenichi Handa <handa@m17n.org>
2878 * input.c (minput_filter): Don't reset ic->xxx_changed.
2880 * mtext.c (mtext_from_data): Fix documentation.
2882 2004-12-25 Kenichi Handa <handa@m17n.org>
2884 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
2885 (M17NLIB_VERSION_NAME): Update to "1.2.".
2887 2004-12-24 Kenichi Handa <handa@m17n.org>
2889 * input.c (reset_ic): Set key_unhandled to 0.
2891 2004-12-21 Kenichi Handa <handa@m17n.org>
2893 * m17n-gui.h (mfont_from_spec): Delete extern.
2895 * input-gui.c (win_callback): Handle Minput_reset.
2896 (minput__win_init): Register reset_ic as a callback for
2899 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
2900 changed. At first, shift to the initial state.
2901 (minput__init): Initialize Minput_reset. Register reset_ic as a
2902 callback for Minput_reset.
2903 (Minput_reset): New variable.
2904 (minput_filter): Always set ic->xxx_changed to 0.
2905 (minput_reset_ic): New function.
2906 (integer_value): Fix typo ('>' -> '<') and calculation of length
2909 * m17n-core.c (merror_code): Change type to `int'.
2911 * m17n-misc.h (merror_code): Adjust type.
2913 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
2915 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
2916 (mtext_change_prop): Delete extern.
2918 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
2919 to `int'. Move the documents to m17n-core.h.
2921 2004-12-13 Kenichi Handa <handa@m17n.org>
2923 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
2924 (MTextProperty): Document it.
2926 2004-12-09 Kenichi Handa <handa@m17n.org>
2928 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
2930 2004-12-03 Kenichi Handa <handa@m17n.org>
2932 * internal.h (m17n__core_initialized, m17n__shell_initialized,
2933 m17n__gui_initialized): New externs.
2935 * m17n-core.h (enum M17NStatus): New enum.
2936 (m17n_status): Extern it.
2938 * m17n-core.c (core_initialized): Delete this variable.
2939 (m17n__core_initialized, m17n__shell_initialized,
2940 m17n__gui_initialized): New variables.
2941 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
2942 instead of core_initialized.
2943 (m17n_status): New function.
2945 * m17n.c (shell_initialized): Delete this variable.
2946 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
2949 * m17n-gui.h (m17n_init_win): Adjust the prototype.
2951 * m17n-gui.c (win_initialized): Delete this variable.
2952 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
2953 instead of gui_initialized.
2955 2004-11-19 Kenichi Handa <handa@m17n.org>
2957 * input.c (reset_ic): Check if ic_info->state is NULL.
2958 (filter): If ic_info->state is NULL, return 0.
2959 (load_input_method): Don't unref `maps' it it's not created.
2961 2004-11-15 Kenichi Handa <handa@m17n.org>
2963 * input.c (find_candidates_group): If INDEX is -1, find the last
2965 (take_action_list): If the previous of the first candidate is
2966 requested, select the last candidate.
2968 2004-11-08 Kenichi Handa <handa@m17n.org>
2970 * m17n-X.c (device_open): Try at most 32 fonts to find a
2971 non-autoscaled font.
2973 * font.c (xlfd_parse_name): Fix previous change.
2975 2004-11-05 Kenichi Handa <handa@m17n.org>
2977 * font.c: (commont_style): Include dummy elements "slanted" and
2978 "rslanted" to prefer "o" to "r" if "i" is requested.
2980 * font-ft.c (ft_to_prop): Fix "oblique" entry.
2982 2004-10-29 Kenichi Handa <handa@m17n.org>
2984 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
2986 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
2987 New members smallest and larger.
2988 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
2989 (xfont_registry_list): Likewise.
2990 (xfont_select): Likewise.
2993 2004-10-28 Kenichi Handa <handa@m17n.org>
2995 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
2996 font name comparison.
2997 (xfont_select): Fix logic for selecting a larger size font.
2999 2004-10-25 Kenichi Handa <handa@m17n.org>
3001 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
3004 2004-10-22 Kenichi Handa <handa@m17n.org>
3006 * input.c (update_candidate): Renamed from udpate_candidate.
3007 (take_action_list): Show more debugging info on arithmetic commands.
3009 * m17n-X.c (device_open): Fix previous change.
3011 * draw.c (compose_glyph_string): Don't get face property at the
3014 2004-10-21 Kenichi Handa <handa@m17n.org>
3016 * draw.c (compose_glyph_string): Fix for the case of category
3019 2004-10-19 Kenichi Handa <handa@m17n.org>
3021 * input.c (mdebug_mask): New variable.
3022 (shift_state): Print debug information.
3023 (take_action_list): Likewise.
3024 (handle_key): Likewise.
3026 2004-10-14 Kenichi Handa <handa@m17n.org>
3028 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
3030 2004-10-13 Kenichi Handa <handa@m17n.org>
3032 * m17n-X.c (device_open): Be sure to register at least one font
3035 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
3036 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
3038 2004-10-12 Kenichi Handa <handa@m17n.org>
3040 * draw.c (alloc_gstring): Fix previous change.
3042 * font-ft.c (ft_list_generic): Fix for the case of not
3045 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
3047 * font.c (mfont_list): If no font is found, return NULL.
3048 (load_font_encoding_table): Put entries of nil registry first.
3049 (find_encoding): Adjust for the above change.
3051 2004-10-11 Kenichi Handa <handa@m17n.org>
3053 * m17n-gui.h (mfont_list): Adjust prototype.
3055 * m17n-X.c (xfont_list): New arg maxnum.
3057 * font.h (struct MFontDriver): Change prototype of <list>.
3059 * font-ft.c (fc_generic_family_list): Delete it.
3060 (Mserif, Msans_serif, Mmonospace): Delete them.
3061 (M_generic_family_info): New variable.
3062 (enum GenericFamilyType): New enum.
3063 (struct GenericFamilyInfo): New struct.
3064 (generic_family_table): New variable.
3065 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
3067 (add_font_info): Get style here.
3068 (ft_list_family): Don't initialize fc_config here. Don't list
3070 (ft_list_generic): New function.
3071 (ft_select): Pay attention to generic familes here.
3072 (ft_open): Fix calculation of ascent and descent.
3073 (ft_list): Pay attention to generic families.
3074 (mfont__ft_init): Initialize M_generic_family_info,
3075 generic_family_table, and fc_config..
3076 (mfont__ft_fini): Finalize generic_family_table.
3078 * draw.c (compose_glyph_string): Use more constant font for
3079 glyphs. Adjust for the member change in MGlyph.
3080 (layout_glyph_string): Adjust for the member change in MGlyph.
3081 (alloc_gstring): Intilize scracth_glyph to avoid
3082 compose_glyph_string on it.
3083 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
3084 (mdraw_coordinates_position): Fix previous change.
3086 * internal-gui.h (glyph_category): New enum.
3087 (MGlyph): Change type of <category> to enum glyph_category.
3089 * face.c (mface__realize): Delete args langauge and charset.
3090 (mface__for_chars): Fix for the case that glyphs have different
3092 (mface__update_frame_face): Adjust for mface__realize change.
3094 * face.h (mface__realize): Adjust prototype.
3096 2004-10-05 Kenichi Handa <handa@m17n.org>
3098 * language.c (mlang__init): Add Akan.
3100 2004-10-04 Kenichi Handa <handa@m17n.org>
3102 * font-ft.c (add_font_info): Add instead of push the element.
3103 (ft_list_family): For generic fonts, try all
3104 substituted. families.
3106 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
3107 (run_rule): Don't update cluster range here.
3108 (run_command): Update cluster range on appending a glyph.
3109 (run_otf): Update cluster range for glyphs generated by OTF.
3111 2004-10-02 Kenichi Handa <handa@m17n.org>
3113 * m17n-X.c (device_open): Handle Mfont key in PLIST.
3115 2004-09-30 Kenichi Handa <handa@m17n.org>
3117 * font-ft.c (ft_select): Ignore family on calling mfont__score.
3119 2004-09-30 Kenichi Handa <handa@m17n.org>
3121 * font.h: Include <fontconfig/fontconfig.h>.
3122 (MFTInfo): New member langset.
3123 (mfont__encoding_list): Extern it.
3125 * font.c (mfont__encoding_list): New function.
3126 (mdebug_dump_font_list): New function.
3128 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
3129 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
3131 (ft_family_list): New variable.
3132 (set_font_info): New arg basep. Callers changed.
3133 (fc_list): Check the return value of FcPatternGetString.
3134 (add_font_info): New arg plist. Callers changed. Update
3136 (ft_list_family): New function (merged fc_list and ft_list_all).
3137 (ft_select): Use ft_list_family.
3138 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
3140 (mfont__ft_init): Initialize above new variables.
3141 (mfont__ft_fini): Free ft_family_list.
3142 (STRDUP_LOWER): New macro.
3143 (set_font_info): Use STRDUP_LOWER.
3144 (ft_list_family): Avoid duplicate addition of font path. Use
3146 (fc_decode_prop): Fix typo.
3148 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
3149 (xfont_registry_list): Change argument disp_info to frame.
3151 (xfont_list_all): New function.
3152 (xfont_list): If FONT is not NULL, check all fonts.
3154 2004-09-28 Kenichi Handa <handa@m17n.org>
3156 * m17n-X.c (MXFont, MXFontList): New types.
3157 (MDisplayInfo): Delete members font_registry_list,
3158 iso8859_1_family_list, iso10646_1_family_list, new members
3159 font_list, base_font_list.
3160 (free_display_info): Adusted for the change of MDisplayInfo.
3161 (xfont_driver): Initialize with xfont_list.
3162 (font_compare): New function.
3163 (build_font_list): Deleted.
3164 (xfont_registry_list): New function.
3165 (xfont_select): Use xfont_registry_list.
3166 (xfont_list): New function.
3167 (device_open): Adusted for the change of MDisplayInfo.
3169 * font-ft.c (add_font_info): New arg languages. Callers changed.
3170 (fc_list): Get languages from fonts..
3171 (ft_list_all): Renamed from ft_list. Callers changed.
3172 (ft_list): New function.
3173 (mfont__ft_driver): Initalize with ft_list.
3175 * font.c (mfont_list): New function.
3177 * font.h (struct MFontDriver): New member `list'.
3178 (MFTInfo): New member languages.
3180 * m17n-gui.h (mfont_list): Extern it.
3182 2004-09-27 Kenichi Handa <handa@m17n.org>
3184 * internal-gui.h (struct MGlyphString): Delete members mt,
3185 sub_width, sub_lbrearing, sub_rbearing, and region.
3187 * draw.c (MSubTextExtents): New type.
3188 (layout_glyphs): New arg extents. Set its members.
3189 (layout_glyph_string): Adjusted for the above change.
3190 (alloc_gstring): Don't set gstring->mt.
3191 (truncate_gstring): Call line_break function with mt instead of
3194 2004-09-22 Kenichi Handa <handa@m17n.org>
3196 * mtext.c (count_utf_16_chars): Count each code of invalid
3199 2004-09-19 Kenichi Handa <handa@m17n.org>
3201 * mtext.c (default_utf_16, default_utf_32): Rename them to
3202 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
3205 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
3208 2004-09-13 Kenichi Handa <handa@m17n.org>
3210 * draw.c (Mlatin): Don't declare it here.
3211 (visual_order): Fix reordering of combining characters.
3212 (compose_glyph_string): Fix detection of script.
3213 (layout_glyphs): Don't fix reordering of combining characters
3215 (layout_glyph_string): Pay attention to
3216 control->disable_overlapping_adjustment.
3217 (truncate_gstring): Include at least on character in a line.
3218 (get_gstring): Always scan one full line.
3219 (mdraw__init): Don't initialize Mlatin here.
3220 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
3221 have a font, use ascent/descent of an ASCII font. Allow
3222 ink_array_return and logical_array_return to be NULL.
3223 (mdraw_coordinates_position): Fix iteration.
3225 * font-ft.c (MFTtoProp): Member completely changed.
3226 (ft_to_prop): Adjusted for the above change.
3227 (ft_to_prop_size): Likewise.
3228 (set_font_info): Adjusted for the change of MFTtoProp.
3229 (fc_generic_family_list): New variable.
3230 (fc_list): Add special handling of generic font names.
3231 (mfont__ft_init): Adjusted for the change of MFTtoProp.
3232 Initialize fc_generic_family_list.
3233 (mfont__ft_fini): Don't free ft_to_prop. Free
3234 fc_generic_family_list.
3235 (FC_vs_M17N_font_prop): New type.
3236 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
3237 (fc_decode_prop, fc_encode_prop): New functions.
3238 (mfont__ft_parse_name): Use fc_decode_prop.
3239 (mfont__ft_unparse_name): Use fc_encode_prop.
3241 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
3242 (MWDevice): Add member realized_font_list.
3243 (free_display_info): Don't free disp_info->realized_font_list.
3244 (free_device): Free device->realized_fontset_list.
3245 (xft_find_metric): Use gstring->frame instead of rfont->frame.
3246 (device_open): Don't initialize disp_info->realized_font_list.
3247 (device_open): Initialize device->realized_font_list and set it to
3248 frame->realized_font_list.
3250 * fontset.c (try_font_group): New function.
3251 (mfont__lookup_fontset): Use try_font_group.
3253 * font.c (common_weight): Change the order of "regular".
3255 * face.c (Mlatin): Don't make it static.
3256 (mface__realize): Be sure to set work_gstring.frame.
3257 (mface__for_chars): Likewise.
3259 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
3262 * internal-gui.h (Mlatin): Extern it.
3264 * m17n-gui.h (MDrawControl): New member
3265 disable_overlapping_adjustment.
3267 2004-09-06 Kenichi Handa <handa@m17n.org>
3269 * font-flt.c (run_otf): Fix typo ('}'->']').
3271 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
3272 (COMBINING_PRECOMPUTED_P): New macros.
3274 * draw.c (layout_glyphs): Handle precomputed combining code.
3276 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
3277 precomupted combining code.
3279 2004-09-03 Kenichi Handa <handa@m17n.org>
3281 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
3284 2004-08-27 Kenichi Handa <handa@m17n.org>
3286 * face.c (mface_put_prop): If the new value is the same as the
3287 current one, don't increment frame->tick.
3289 2004-08-25 Kenichi Handa <handa@m17n.org>
3291 * fontset.c (mfontset): Initialize font_spec_list member.
3292 (mfontset_copy): Load fontset if necessary.
3294 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
3295 'metrics' to for C++.
3297 * draw.c (mdraw_glyph_info): Adjusted for the member name change
3300 2004-08-16 Kenichi Handa <handa@m17n.org>
3302 * Version 1.1.0 released.
3304 2004-08-13 Kenichi Handa <handa@m17n.org>
3306 * language.c (mlang__init): Add Dhivehi.
3308 * m17n-gui.c (Mx, Mfreetype): Delete it.
3309 (m17n_init_win): Don't initialize Mx and Mfreetype here.
3311 * m17n-gui.h (Mfreetype, Mxft): Extern them.
3312 (mfont_resize_ratio): Extern it.
3313 (MDrawGlyphInfo): New member logical_width;
3314 (MDrawGlyph): New type.
3315 (mdraw_glyph_list): Prototype adjusted.
3317 * m17n-X.c (xfont_open): Set type and fontp members.
3318 (xft_open): Likewise.
3320 * internal-gui.h (Mx, Mfreetype): Delete extern.
3322 * font.h (struct MRealizedFont): New member type and fontp.
3324 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
3325 (Mx, Mfreetype): Declare here.
3326 (Mxft): New variable.
3327 (mfont_resize_ratio): New function.
3329 * font-ft.c (ft_open): Set type and fontp members.
3331 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
3334 2004-08-11 Kenichi Handa <handa@m17n.org>
3336 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
3339 2004-08-06 Kenichi Handa <handa@m17n.org>
3341 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
3344 * font-flt.c (run_otf): Print debugging information if necessary.
3346 2004-08-05 Kenichi Handa <handa@m17n.org>
3348 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
3349 positioning_type 5 and 6. Switch simplified.
3351 2004-08-04 Kenichi Handa <handa@m17n.org>
3353 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
3355 2004-08-02 Kenichi Handa <handa@m17n.org>
3357 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
3358 set val to 1 even if it is greater than 1.
3360 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
3362 2004-07-29 Kenichi Handa <handa@m17n.org>
3364 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
3365 debugging information.
3367 * internal.h (MDEBUG_PRINT5): New macro.
3369 * draw.c (layout_glyphs): Don't combine a zero width glyph with
3370 the previous one if the zero width glyph has left or right
3373 2004-07-26 Kenichi Handa <handa@m17n.org>
3375 * m17n-X.c (xft_render): Pay attention to members left_padding and
3376 right_padding of MGlyph.
3378 * draw.c (visual_order): Allocate one more elements for arrays as
3379 a workaround of fribidi bug.
3380 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
3381 instead of MGlyph->bidi_sensitive.
3382 (layout_glyph_string): Pay attentinon to
3383 control->orientation_reversed when padding at the head or tail.
3384 Fix adjustment of space glyph width.
3385 (get_gstring): If cursor_width or cursor_bidi is changed, don't
3388 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
3389 instead of MGlyph->bidi_sensitive.
3391 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
3393 2004-07-26 Kenichi Handa <handa@m17n.org>
3395 * draw.c (visual_order): Don't treat combined glyphs specially.
3396 (layout_glyphs): Don't get metrics glyphs that are already ready.
3397 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
3398 width with the previous one.
3399 (draw_background): Fix bar cursor position on a r2l glyph.
3401 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
3402 (run_rule): Fix place of updating cluster_begin_pos and
3403 cluster_end_pos here.
3404 (run_otf): Don't set left_padding.
3406 * font-ft.c (adjust_anchor): Type of argument `code' changed.
3408 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
3409 Fix handling of GPOS.
3410 (mfont__ft_drive_gpos): Delete this function.
3412 * font.h (mfont__ft_drive_otf): Renamed back from
3413 mfont__ft_drive_gsub.
3414 (mfont__ft_drive_gpos): Delete extern.
3416 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
3417 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
3419 2004-07-23 Kenichi Handa <handa@m17n.org>
3421 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
3422 the same bidi level.
3424 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
3426 2004-07-22 Kenichi Handa <handa@m17n.org>
3428 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
3430 2004-07-20 Kenichi Handa <handa@m17n.org>
3432 * draw.c (render_glyphs): Fix checking of g->code validity.
3434 * face.c (mface__realize): Set g.type.
3436 2004-07-18 Kenichi Handa <handa@m17n.org>
3438 * Makefile.am: Prepend ${top_srcdir} to all *.la in
3441 * m17n-gui.c (mframe): Print error message give by dlopen to
3444 2004-07-16 Kenichi Handa <handa@m17n.org>
3446 * draw.c (compose_glyph_string): Improve the way of deciding a
3447 script. For a character that doesn't have script property, use
3448 the last non-latin script.
3450 * font-ft.c (fc_list): Cancel previous change.
3451 (mfont__ft_init): Add more entries in ft_to_prop_name.
3453 2004-07-15 Kenichi Handa <handa@m17n.org>
3455 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
3456 previous or next character glyphs.
3458 2004-07-14 Kenichi Handa <handa@m17n.org>
3460 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
3461 of type GLYPH_SPACE.
3463 * fontset.c (mfont__lookup_fontset): If glyph type is
3464 GLYPH_SPACE, get codes for SPACE.
3466 * internal-gui.h (Mfont): Delete extern.
3468 * m17n-gui.h (Mfont): Delete duplicated extern.
3470 2004-07-13 Kenichi Handa <handa@m17n.org>
3472 * font-ft.c (DEVICE_DELTA): New macro.
3473 (adjust_anchor): New function.
3474 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
3476 (mfont__ft_drive_gpos): New function.
3478 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
3479 (FontLayoutContext): Delete member `rfont'.
3480 (run_otf): Set g->otf_cmd. Call
3481 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
3482 only whne HAVE_OTF is defined.
3484 * fontset.c: Include "config.h".
3486 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
3487 (MGlyph): New member otf_cmd.
3489 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
3490 (mfont__ft_drive_gpos): Extern it.
3492 * face.c: Include "config.h".
3494 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
3496 * input-gui.c: Include "config.h".
3498 * plist.c: Include "config.h".
3500 2004-07-06 Kenichi Handa <handa@m17n.org>
3502 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
3503 internal-gui.h: Cancel previous changes.
3505 * m17n-gd.h: Delete it.
3507 * Makefile.am (libm17n_core_la_LIBADD): New variable.
3508 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
3509 @XML2_LD_FLAGS@ to above.
3510 (libm17n_la_LIBADD): Add -ldl.
3511 (libm17n_la_LDFLAGS): Add -export-dynamic.
3512 (X_LD_FLAGS): Fix the order of linking.
3513 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
3514 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
3515 (libm17n_X_la_LDFLAGS): Add -module.
3516 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
3517 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3518 (libm17n_gd_la_LDFLAGS): Add -module.
3519 (include_HEADERS): Delete m17n-gd.h.
3521 2004-06-30 Kenichi Handa <handa@m17n.org>
3523 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
3524 (MDeviceLibraryInterface): Delete it.
3525 (register_device_library): Delete it.
3526 (m17n__device_library_list): Renamed from device_library_list.
3528 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
3529 (m17n_init_win): Adjust prototype.
3531 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
3532 (m17n_init_gd): New function.
3534 * m17n-gd.h: New file.
3536 * m17n-X.h: Include <m17n-gui.h>.
3537 (m17n_init_X): Extern it.
3538 (M17N_INIT): Redefine it.
3540 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
3541 (m17n_init_X): New function.
3543 * internal-gui.h (m17n__device_library_list): Extern it.
3544 (struct MDeviceDriver): New members initialized, init, and fini.
3546 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
3548 (libm17n_X_la_LIBADD): Delete aboves.
3549 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
3550 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3551 (libm17n_gd_la_LDFLAGS): Delete it.
3552 (include_HEADERS): Add m17n-gd.h.
3554 2004-06-25 Kenichi Handa <handa@m17n.org>
3556 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
3557 (libm17n_gd_la_LDFLAGS): Cancel previous change.
3559 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
3561 * font-ft.c (fc_list): If FcFontList finds no font, try
3564 * draw.c (compose_glyph_string): Terminate the last loop after
3565 doing default combining if necessary.
3567 2004-06-24 Kenichi Handa <handa@m17n.org>
3569 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
3571 * character.c (mchar_define_property): Add const to an arg.
3573 * charset.c (mchar_define_charset): Add const to an arg.
3575 * coding.c (MCodingSystem): Add const to an arg or decoder.
3576 (finish_decoding): Add const to an arg.
3577 (decode_coding_charset, decode_coding_utf_8)
3578 (decode_coding_utf_16, decode_coding_utf_32)
3579 (decode_coding_iso_2022, decode_coding_sjis)
3580 (mconv_define_coding): Likewise.
3582 * m17n-X.c (xft_find_metric): Delete unused variable.
3584 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
3587 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
3590 * mtext.c (count_utf_8_chars, count_utf_16_chars)
3591 (mtext__from_data, mtext_from_data): Add `const' to an arg.
3593 * mtext.h (mtext__from_data): Ajust prototype.
3595 2004-06-23 Kenichi Handa <handa@m17n.org>
3597 * draw.c (compose_glyph_string): Always get glyph codes by
3599 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
3600 (mdraw_glyph_list): New function.
3602 * font-flt.c (mfont__flt_run): Be sure to call
3603 rfont->driver->encode_char.
3605 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
3606 (ft_encode_char): Delete arg C.
3607 (ft_render): Don't call FT_Get_Char_Index.
3609 * font.c (mfont__encodable_p): Delete it.
3610 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
3612 * font.h (struct MFontDriver): Delete arg C of encode_char.
3613 (mfont__encodable_p): Delete extern.
3615 * m17n-X.c (xfont_encode_char): Delete arg C.
3616 (xft_find_metric): Don't cal FT_Get_Char_Index.
3617 (xft_render): Likewise.
3619 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
3621 (mdraw_glyph_list): Extern it.
3623 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
3625 2004-06-22 Kenichi Handa <handa@m17n.org>
3627 * m17n-gui.h (mfontset_lookup): Extern it.
3629 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
3631 * fontset.c (realize_fontset_elements)
3632 (free_realized_fontset_elements, update_fontset_elements): New
3634 (mfont__realize_fontset): Call realize_fontset_elements.
3635 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
3636 (mfont__lookup_fontset): If a fontset was modified, update
3637 the realized fontset.
3638 (mfontset_modify_entry): Increment fontset->tick.
3639 (mfontset_lookup): New function.
3641 2004-06-21 Kenichi Handa <handa@m17n.org>
3643 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
3645 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
3646 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
3647 length of source text 0.
3649 2004-06-21 Kenichi Handa <handa@m17n.org>
3651 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
3652 (compare): Pay attention to format other than utf-8.
3653 (copy): Delete this function.
3654 (count_by_utf_8, count_by_utf_16, insert): New functions.
3655 (count_utf_16_chars): Fix handling of a surrogate pair.
3656 (find_char_forward, find_char_backward): Likewise.
3657 (mtext__from_data): Delete unnecessary check. Fix number of
3659 (mtext_from_data): Don't count items.
3660 (mtext_ref_char): Optimize the code.
3661 (mtext_set_char): Pay attention to format other than utf-8.
3662 (mtext_cat_char): Likewise.
3663 (mtext_dup): Don't call copy, instead do allocation here.
3664 (mtext_cat): Call insert instead of copy.
3665 (mtext_ncat): Likewise.
3666 (mtext_cpy): Delete character at first and call insert instead of
3668 (mtext_ncpy): Likewise.
3669 (mtext_copy): Likewise.
3670 (mtext_duplicate): Call insert instead of copy.
3671 (mtext_del): Pay attention to format other than utf-8.
3672 (mtext_ins): Simply call insert.
3673 (mtext_ins_char): Pay attention to format other than utf-8.
3674 (mtext_tok): Call insert instead of copy.
3675 (mtext_text): Call UNIT_BYTES.
3677 * textprop.c (mtext__adjust_plist_for_change): New function.
3679 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
3680 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
3681 (CHAR_UNITS_AT): Fix typo.
3682 (CHAR_UNITS_BY_HEAD): Fix typo.
3683 (STRING_CHAR_AND_UNITS): Fix typo.
3685 * internal.h (MTEXT_READ_ONLY_P): New macro.
3687 * mtext.h (mtext__replace): Delete the extern.
3688 (mtext__adjust_foramt): Adjust prototype.
3690 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
3691 if possible. Otherwise make a copy of mmt.
3693 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
3696 2004-06-18 Kenichi Handa <handa@m17n.org>
3698 * character.h (CHAR_STRING_UTF16): Fix syntax.
3700 2004-06-16 Kenichi Handa <handa@m17n.org>
3702 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
3703 (libm17n_X_la_LIBADD): Delete it.
3704 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
3706 * m17n-X.c (device_open): Add parens in `if' condition.
3708 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
3709 (DEC_POSITION): Likewise.
3710 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
3712 2004-06-15 Kenichi Handa <handa@m17n.org>
3714 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
3717 * draw.c (compose_glyph_string): If langauge is specified, call
3718 mface__for_chars even if a text is all latin. Fix condition for
3719 setting non_ascii_found.
3721 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
3723 * m17n.h (minput_char_to_key): Delete extern.
3725 * m17n-gui.h (minput_event_to_key): Cancel previous change.
3727 * m17n-gui.c (null_device_open): Set several members of frame.
3729 2004-06-14 Kenichi Handa <handa@m17n.org>
3731 * m17n-gui.h (minput_event_to_key): Delete extern.
3733 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
3735 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
3737 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
3739 2004-06-08 Kenichi Handa <handa@m17n.org>
3741 * character.c (mchar_put_prop): Don't increment the ref-count of
3744 2004-06-04 Kenichi Handa <handa@m17n.org>
3746 * m17n-core.c (mdebug__register_object): New function.
3747 (mdebug__unregister_object): Likewise.
3749 * internal.h (mdebug__register_object, mdebug__unregister_object):
3751 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
3754 * charset.c (mcharset__load_from_database): Don't call
3755 mconv__register_charset_coding here.
3757 * coding.c (find_coding): Get a real name from an element of
3758 coding_definition_list.
3759 (mconv__register_charset_coding): Set the real name at the top of
3761 (mcoding__load_from_database): Likewise.
3762 (mconv_list_codings): Adjusted for the above change.
3764 2004-06-03 Kenichi Handa <handa@m17n.org>
3766 * coding.c (find_coding): Find by canonicalized name. Don't have
3767 to modify the element of coding_definition_list by
3769 (mconv__define_coding_from_charset): Delete it.
3770 (mconv__register_charset_coding): Canonicalize sym.
3771 (mcoding__load_from_database): Register plist modified by
3774 * coding.h (mconv__define_coding_from_charset): Don't extern it.
3776 * font-ft.c (ft_open): Fix setting of rfont->descent.
3778 2004-06-02 Kenichi Handa <handa@m17n.org>
3780 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
3781 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
3782 (xlfd_unparse_name): Renamed from xfont_build_name.
3783 (mfont__init): Initialized Mfontconfig.
3784 (mfont__free_realized): Unconditionally unref rfont->info.
3785 (mfont__select): Free `this' if it's not best.
3786 (mfont__open): Don't check frame->realized_font_list.
3787 (mfont__parse_name_into_font): New function.
3788 (Mfontconfig): New variable.
3789 (mfont_from_name): Call mfont_parse_name.
3790 (mfont_name): Call mfont_unparse_name.
3791 (mdebug_dump_font): Likewise.
3793 * font.h (struct MFontDriver): Delete members parse_name and
3795 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
3796 (mfont__parse_name_into_font): Extern it.
3798 * font-ft.c: Include "symbol.h".
3799 (close_ft): Unconditionally free filename and charmap_list of
3801 (ft_open): Duplicate base->filename. Increment ref-count of
3802 ft_info->charmap_list. Free ft_info->charmap_list and
3803 ft_info->filename on error.
3804 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
3806 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
3808 (enum xlfd_field_idx): Moved to font.c.
3809 (split_font_name, build_font_name): Likewise.
3810 (build_font_list): Call mfont__parse_name_info_font.
3811 (xfont_open): Call mfont__unparse_name. Free name.
3812 (xfont_parse_name, xfont_build_name): Moved to font.c
3813 (xft_select): Prototype deleted.
3814 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
3815 Call mfont_pase_name.
3817 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
3818 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
3821 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
3824 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
3826 2004-06-01 Kenichi Handa <handa@m17n.org>
3828 * fontset.c (mfontset_modify_entry): Pay attention to the case
3829 that fontset->font_spec_list is NULL.
3831 2004-05-31 Kenichi Handa <handa@m17n.org>
3833 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3835 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3837 * font.c (mfont__select): Print score the a font for debugging.
3839 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
3841 * coding.c (reset_coding_sjis): Check kanji and kana instead of
3842 kanji_sym and kana_sym.
3844 2004-05-28 Kenichi Handa <handa@m17n.org>
3846 * Makefile.am (VINFO): New variable.
3847 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
3848 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
3850 2004-05-27 Kenichi Handa <handa@m17n.org>
3852 The following chanages are to make device dependent functions
3853 accessible only from MDeviceDriver structure, and to add GD and
3854 null device drivers. Font drivers get also device dependent.
3856 * m17n.c (m17n_init): Increament shell_initialized.
3857 (m17n_fini): Decremented shell_initialized.
3859 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
3861 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
3862 (Mwidget, Mcolormap, Mx): Extern them.
3864 * m17n-gui.c: Include <dlfcn.h> and "config.h".
3865 (free_frame): Call frame->driver->close instead of
3867 (DLOPEN_SHLIB_EXT): New macro.
3868 (MDeviceLibraryInterface): New type.
3869 (device_library_list): New variable.
3870 (register_device_library): New function.
3871 (null_device): New variable.
3872 (null_device_close, null_device_get_prop)
3873 (null_device_realize_face, null_device_free_realized_face): New
3875 (null_driver): New variable.
3876 (null_device_init, null_device_fini, null_device_open): New
3878 (null_interface): New variable.
3879 (Mfreetype, Mdevice): Declare them.
3880 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
3881 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
3882 Mwin__Close_Device. Register drivers for Mx and Mgd.
3883 (m17n_fini_win): Decremented win_initialized. Call "fini"
3884 function of all opened devices. Don't call mwin__fini.
3885 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
3887 (mframe): Handle Mdevice key of PLIST.
3888 (mframe_get_prop): Call frame->device->get_prop instead of
3889 mwin__device_get_prop.
3891 * m17n-gd.c: New file.
3893 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
3894 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
3896 * m17n-core.c (m17n_init_core): Increate core_initialized.
3897 (m17n_fini_core): Decremented core_initialized.
3899 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
3900 (Mcolormap): Don't extern them here.
3902 * m17n-X.c (FRAME_DEVICE): New macro.
3903 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
3904 (free_display_info): Use MPLIST_DO.
3905 (free_device): Free rface->info.
3906 (xft_close): Delete it.
3907 (device_init): Renamed from mwin__init.
3908 (device_fini): Renamed from mwin__fini.
3909 (device_open): Renamed from mwin__open_device.
3910 (x_driver): New variable.
3911 (MXFontInfo): Delete member frame, add member display.
3912 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
3913 Don't declare them here.
3915 * internal-gui.h (MDeviceType): New enum.
3916 (MWDefice): Delete it.
3917 (struct MFrame): Change type of device to void *. New members
3918 device_type, driver, font_driver_list.
3919 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
3920 (MDeviceDriver): New type.
3921 (Mx, Mgd, Mfreetype): Extern them.
3922 (mwin__XXX): Delete all of them.
3924 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
3926 (win_destroy_ic): Likewise.
3927 (adjust_window_and_draw): Likewise.
3928 (win_callback): Likewise.
3929 (Mxim): Declare it here.
3930 (minput_event_to_key): Call M_CHECK_READABLE.
3932 * fontset.c (mfont__lookup_fontset): Delete local variable
3935 * font.h (struct MFontDriver): Delete member close, add members
3936 parse_name and build_name.
3937 (mfont__driver_list): Delete extern.
3938 (mfont__close): Delete extern.
3940 * font.c (mfont__init): Don't set mfont__driver_list.
3941 (mfont__fini): Don't unref mfont__driver_list.
3942 (mfont__select): Try font drivers in frame->font_driver_list. Set
3943 driver member of a realized font.
3944 (mfont__close): Delete it.
3945 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
3946 functions of the default frame.
3948 * font-ft.c (close_ft): Check ft_info->ft_face and work
3950 (add_font_info): Allocate ft_info by M17N_OBJECT.
3951 (ft_close): Delete it.
3952 (mfont__ft_driver): Don't set ft_close.
3953 (ft_select): Increment ref-count of best_font.
3954 (ft_open): Decremented ref-count of base. On error, call
3955 FT_Done_Face and free ft_info.
3956 (ft_find_metric): Always use XXX_MONO in load_flags.
3957 (ft_render): Fix setting of width. Call
3958 frame->driver->draw_points instead of mwin__draw_points.
3959 (ft_to_prop): Don't set mfont__driver_list.
3960 (mfont__ft_fini): Just unref ft_info.
3962 * face.c (mface__init): Exchange foreground and background of
3963 mface__default. Call mface_put_prop to set hline of
3965 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
3966 (mface__free_realized): Don't call mwin__free_realized_face.
3968 * draw.c (Mdepth): Don't declare it here.
3969 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
3970 (render_glyphs, render_glyph_string): Likewise.
3971 (mdraw__init): Don't set Mdepth.
3972 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
3974 (mdraw_text_per_char_extents): Return 0 on success and -1 on
3976 (mdraw_text_items): Check FRAME is writable.
3977 (mdraw_per_char_extents): Implement body.
3979 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
3981 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
3982 (GUI_SOURCES): Delete it.
3983 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
3984 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
3985 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
3986 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
3987 (linkgui_LDADD): Set to libm17n-gui.la
3988 (linkgui_LDFLAGS): New target.
3989 (SRC): Include ${libm17n_gui_la_SOURCES} and
3990 ${libm17n_gd_la_SOURCES}.
3992 2004-05-24 Kenichi Handa <handa@m17n.org>
3994 * draw.c (draw_background): Don't draw background even if
3995 rface->face.property[MFACE_BACKGROUND] is not Mnil.
3997 2004-05-22 Kenichi Handa <handa@m17n.org>
3999 * m17n-X.c (xft_open_font): Fix anti_alias setting.
4001 2004-05-20 Kenichi Handa <handa@m17n.org>
4003 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
4005 * m17n-gui.c: Include "plist.h".
4006 (mframe): If PLIST is NULL, initialize it to emply plist.
4008 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
4009 (xft_driver): New variable.
4010 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
4011 (xft_find_metric, xft_render): New function.
4012 (mwin__init): Adjusted for the new mfont__driver_list.
4013 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
4014 generated face to PARAM.
4015 (mwin__realize_face): Fix setting of box colors. Don't call hook
4017 (mwin__draw_hline): New function.
4018 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
4019 (mwin__xft_render): Delete these function.
4021 * internal-gui.h (struct MFrame): New member tick.
4022 (struct MGlyphString): New member tick.
4023 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
4024 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
4025 (mwin__xft_render): Delete extern.
4027 * fontset.c (mfont__lookup_fontset): Make the code simpler.
4028 (mfontset): Always increment the reference count of returned
4031 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
4032 (MFTInfo): Moved to font.h.
4033 (ft_iso8859_1_font_list): Delete this variable.
4034 (set_font_info): Don't set font->property[MFONT_TYPE].
4035 (set_font_info): Don't udpate ft_iso8859_1_font_list.
4036 (add_font_info): Change type to void.
4037 (fc_list): Change anme from xft_list. Caller changed. Include
4038 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
4039 (mfont__ft_driver): Change name from ft_driver. Caller changed.
4040 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
4041 (close_ft): Don't call mwin__xft_close. Unref
4042 ft_info->extra_info.
4043 (ft_open): Don't setup ft_info->fontname. Don't call
4045 (ft_find_metric): Don't call mwin__xft_get_metric.
4046 (ft_encode_char): Call rfont->driver->open instead of ft_open.
4047 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
4048 (mfont__ft_init): Adjusted for new mfont__driver_list.
4049 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
4051 * font.c (mfont__driver_list): Make it MPlist.
4052 (mfont__init): Adjust initialization of mfont__driver_list.
4053 (mfont__fini): Free mfont__driver_list.
4054 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
4055 (mfont__select): Adjusted for the new mfont__driver_list.
4057 * font.h (enum MFontProperty): Delete MFONT_TYPE.
4058 (mfont__drirver_list): Adjust prototype.
4059 (MFTInfo): Move to here from fron.c. Deleve member fontname.
4061 * face.h (struct MFace): Delete member realized_face_list, add
4063 (struct MRealizedFace): Delete member need_update
4064 andnofont_rface, add member non_ascii_list.
4065 (mface__update_frame_face): Extern it.
4067 * face.c (hline_prop_list, box_prop_list, noop_hook): New
4069 (get_hline_create, get_box_create): New functions.
4070 (find_realized_face): Cancel previous change. Arg RFONT deleted.
4072 (free_face): Cancep previous change. Free face->frame_list.
4073 (serialize_hline): Do nothing if hline->width is zero.
4074 (serialize_box): Do nothing if box->width is zero.
4075 (mface__init): Setup all properties of mface__default.
4076 (mface__fini): Free hline_prop_list and box_prop_list.
4077 (mface__realize): Cancel previous change. Update
4078 face->frame_list. Setup rface->non_ascii_list.
4079 (mface__for_chars): Update rface->non_ascii_list.
4080 (mface__free_realized): Free rface->non_ascii_list.
4081 (mface__update_frame_face): New function.
4082 (mface): Initialize face->frame_list.
4083 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
4085 (mface_merge): Likewise.
4086 (mface_put_prop): If key is Mhline or Mbox, get value by
4087 get_hline_create or get_box_create respectively.
4088 (mface_put_prop): Update frame->tick and call
4089 mface__update_frame_face if necessary.
4090 (mface_update): Do nothing if func is noop_hook.
4092 * draw.c (render_glyphs): If a font is not found, use
4093 mwin__draw_empty_boxes.
4094 (alloc_gstring): Initialize gstring->tick.
4095 (get_gstring): Check gstring->tick.
4097 2004-05-17 Kenichi Handa <handa@m17n.org>
4099 * face.c (find_realized_face): Return value changed. If RFONT is
4100 NULL, avoid unnecessary checking.
4101 (free_face): Free face->realized_face_list.
4102 (mface__realize): Adjusted for the change of find_realized_face.
4103 If it returns a realized face that needs update, free it and
4104 realize a new one. Push a new realized face to
4105 frame->realized_face_list instead of appending.
4106 (mface__for_chars): Adjusted for the change of find_realized_face.
4107 Short cut if the required font is in rface->ascii_rface.
4108 (mface_put_prop): Free old value if necessary. Set need_update
4109 member of realized faces to 1.
4111 * face.h (struct MFace): Delete member tick, add member
4113 (struct MRealizedFace): Delete member tick, add member
4116 2004-05-13 Kenichi Handa <handa@m17n.org>
4118 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
4120 2004-05-12 Kenichi Handa <handa@m17n.org>
4122 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
4124 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
4125 parse it XftNameParse.
4127 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
4128 (all_fonts_scaned): New variable.
4129 (set_font_info): FAMILY may be Mnil.
4130 (add_font_info): Argument changed.
4131 (xft_list): Call add_font_info in it.
4132 (ft_list): Likewise.
4133 (ft_select): Make it work in the case family is Mnil.
4134 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
4135 (mfont__ft_fini): Set all_fonts_scaned to 0.
4137 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
4138 that is failed to open.
4140 2004-05-10 Kenichi Handa <handa@m17n.org>
4142 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
4143 device's depth is 1 (i.e. monochrome).
4145 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
4146 to work around the problem of libtool.
4148 * font-ft.c: Include <freetype/ftbdf.h>.
4149 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
4151 (mfont__ft_init): Initialize them.
4152 (ft_iso8859_1_font_list): New variable.
4153 (set_font_info): Detect a font containing iso8859-1 glyphs and
4154 register it in ft_iso8859_1_font_list. If the font is not
4155 scalable, assume it as BDF or PCF font and setup SIZE and RESY
4156 properties of the font from its properties.
4157 (add_font_list): If the font is not scalable, check if it is BDF
4158 or PCF font. If not, ignore it.
4159 (ft_select): If FAMILY is Mnil, return NULL only if the requested
4160 registry is not iso8859-1.
4161 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
4162 ft_iso8859_1_font_list.
4163 (ft_find_metric): If the font is not scalable, assume it as BDF
4164 or PCF, and get a metric from its properties.
4165 (mfont__ft_fini): Free ft_iso8859_1_font_list.
4167 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
4169 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
4170 (libm17n_la_LDFLAGS): Delete it.
4171 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
4172 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
4174 2004-05-06 Kenichi Handa <handa@m17n.org>
4176 * draw.c (compose_glyph_string): Fix previous change.
4178 2004-04-30 Kenichi Handa <handa@m17n.org>
4180 * font-ft.c (ft_list): Delete unused variable `result'.
4181 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
4183 2004-04-27 Kenichi Handa <handa@m17n.org>
4185 * m17n-X.c: Include config.h
4186 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
4187 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
4188 (MWDevice) [HAVE_XFT2]: New member xft_draw.
4189 (FRAME_CMAP, FRAME_VISUAL): New macros.
4190 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
4191 (xfont_driver): Make it static.
4192 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
4193 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
4194 info->xft_color_back.
4195 (MXftFontInfo) [HAVE_XFT2]: New type.
4196 (mwin__xft_close) [HAVE_XFT2]: New function.
4197 (mwin__xft_open) [HAVE_XFT2]: New function.
4198 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
4199 (mwin__xft_render) [HAVE_XFT2]: New function.
4201 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4202 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
4203 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
4206 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4208 * font-ft.c: Don't include FT_FREETYPE_H here.
4209 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
4210 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
4211 (MFTInfo): New member charmap_index.
4212 (MFTInfo) [HAVE_XFT2]: New member xft_info.
4213 (check_otf_filename): Renamed from check_filename. Return value
4215 (ft_set_property): This function deleted.
4216 (set_font_info): New function.
4217 (add_font_list): Argument changed. Add multiple fonts.
4218 (xft_list) [HAVE_XFT2]: New function.
4219 (ft_list) [not HAVE_XFT2]: New function.
4220 (ft_select): Add code for Xft.
4221 (close_ft): Likewise.
4222 (ft_open): Likewise.
4223 (ft_find_metric): Likewise.
4224 (ft_encode_char): Likewise.
4225 (ft_render): Likewise.
4227 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
4229 2004-04-26 Kenichi Handa <handa@m17n.org>
4231 * textprop.c (mtext_attach_property): Declare the return type as
4234 2004-04-21 Kenichi Handa <handa@m17n.org>
4236 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
4238 2004-04-09 Kenichi Handa <handa@m17n.org>
4240 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
4242 (load_command): Setup above members.
4244 2004-04-05 Kenichi Handa <handa@m17n.org>
4246 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
4248 2004-03-30 Kenichi Handa <handa@m17n.org>
4250 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
4253 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
4254 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
4256 2004-03-29 Kenichi Handa <handa@m17n.org>
4258 * Version 1.0 Patch Level 2 released.
4260 2004-03-29 Kenichi Handa <handa@m17n.org>
4262 * charset.c (make_charset): Set charset->fully_loaded and
4263 charset->simple correctly. Don't try to get charset->min_char and
4264 charset->max_char for a charset of method subset and superset.
4265 Don't load a mapping file here.
4266 (mcharset__init): Set unified_max.
4267 (mcharset__load_from_database): Free a working plist.
4269 * coding.c (mcoding__fini): Free all malloced data.
4271 * input-gui.c (win_create_ic): Set control.as_image for preediting
4274 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
4275 `count') to initialize the array.
4277 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
4280 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
4282 (mwin__create_window): Fix bug of setting a background pixel of a
4284 (mwin__adjust_window): Clear the window before drawing.
4286 * m17n-core.c (mdebug__report_object): Free array->objectes if
4288 (m17n_init_core): Don't set report_header_printed to 0 here.
4289 Fix debugging information.
4290 (m17n_fini_core): Set report_header_printed to 0 here.
4292 * m17n-core.h (mplist_deserialize): Extern it.
4294 * m17n-gui.c (m17n_fini_win): Fix debugging information.
4296 * m17n.c (m17n_fini): Fix debugging information.
4298 * mtext.c (mtext__adjust_foramt): New function.
4300 * mtext.h (mtext__adjust_foramt): Extern it.
4302 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
4304 * plist.h (mplist__deserialize): Don't extern it.
4306 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
4307 elements of symbol_table to NULL. Report about created and freed
4308 symbols if MDEBUG_FINI is set.
4310 2004-03-22 Kenichi Handa <handa@m17n.org>
4312 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
4314 * m17n.c (m17n_init): Fix the way of checking merror_code.
4316 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
4318 2004-03-22 Kenichi Handa <handa@m17n.org>
4320 * fontset.c (realize_font_group): Adjust the font size by
4321 mfont__resize before selecting a font.
4323 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
4325 2004-03-19 Kenichi Handa <handa@m17n.org>
4327 * Version 1.0 Patch Level 1 released.
4329 2004-03-19 Kenichi Handa <handa@m17n.org>
4331 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
4333 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
4335 2004-03-19 Kenichi Handa <handa@m17n.org>
4337 Re-apply the changes forgotten in the released version.
4339 * charset.c (mcharset__load_from_database): Call
4340 mchar_define_charset.
4342 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
4343 (mconv_encode_range): Put Mcoding text property.
4345 2004-03-18 Kenichi Handa <handa@m17n.org>
4347 * draw.c (Mdepth): New variable.
4348 (visual_order): Delete unused local var `pos'.
4349 (compose_glyph_string): Fix for the case that gstring->glyphs is
4350 realloced. Stop generating glyphs at TO. Fix handling of
4352 (layout_glyphs): Get metrics of all glyphs in advance. Set
4353 lbearing and rbearing of base of composition glyph correctly.
4354 Handle left-overhang glyphs correctly.
4355 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
4357 (dump_combining_code): Change the defualt off_x character to ".".
4358 (mdraw__init): Initialize Mdepth.
4360 * face.c (work_gstring): New variable
4361 (mface__init): Initialize work_gstring.
4362 (mface__fini): Free work_gstring.glyphs.
4363 (mface__realize): Don't handle videomode property here. Adjusted
4364 for the change of mfont__get_metric.
4365 (mface__for_chars): Adjusted for the change of mfont__get_metric.
4367 * face.h (enum face_gc): Moved to m17n-X.c.
4369 * font.h (struct MFontDriver): Arguments of find_metric changed.
4370 (mfont__select): Prototype adjusted.
4371 (mfont__get_metric): Likewise.
4372 (mfont__ft_drive_otf): Likewise.
4373 (mfont__flt_run): Likewise.
4375 * font.c (mfont__select): New argument layouter. If layouter is
4376 different in the registered font, make a new copy of realized
4378 (mfont__get_metric): Argument changed. Get metrics of multiple
4380 (mfont_find): Call mfont__select with layouter as Mnil.
4382 * font-flt.c (FontLayoutContext): New member rfont.
4383 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
4384 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
4386 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
4388 (NUM_POINTS): New macro.
4389 (MPointTable): New type.
4390 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
4391 (mfont__ft_drive_otf): New argument rfont.
4393 * fontset.c (realize_font_group): Adjusted for the changed of
4395 (check_fontset_element): This function deleted.
4397 * input-gui.c (adjust_window_and_draw): Locate a preedit window
4398 off the parent window if the preedit text is zero length.
4400 * internal-gui.h (struct MFrame): New members foreground,
4401 background, videomode, font.
4402 (struct MGlyphString): New member anti_alias.
4403 (MDrawPoint): New type.
4404 (mwin__draw_bitmap): Prototype deleted.
4405 (mwin__draw_points): Prototype added.
4407 * m17n-gui.h (MDrawControl): New member anti_alias.
4409 * m17n-gui.c (free_frame): Free frame->font.
4410 (mframe): Set the fontset of frame->face to the default fontset.
4412 * m17n-X.c (RGB_GC): New type.
4413 (enum gc_index): Renamed from enum face_gc. Member names changed.
4415 (struct MWDevice): Members foreground and background deleted. New
4416 member scratch_gc, gc_list.
4417 (DEFAULT_FONT, FALLBACK_FONT): New macros.
4418 (free_device): Free GCs in device->gc_list.
4419 (get_rgb_gc): New function.
4420 (get_gc): Renamed and argument changed from get_color.
4421 (get_gc_for_anti_alias): New function.
4422 (xfont_find_metric): Arguments changed. Get metrics of multiple
4424 (set_region): Argument changed. Caller changed.
4425 (xfont_render): Allways set a font in gc.
4426 (x_error_handler, x_io_error_handler): Define only if
4427 X_SET_ERROR_HANDLER is defined.
4428 (mwin__open_device): Create device->scratch_gc. Set members
4429 foreground, background, and videomode of frame. Call
4430 XSetErrorHandler and XSetIOErrorHandler only if
4431 X_SET_ERROR_HANDLER is defined.
4432 (struct gc_list): Deleted.
4433 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
4434 (mwin__realize_face): Adjusted for the change of the format of
4435 rface->info and the charge of set_region.
4436 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
4437 (mwin__draw_box): Likewise.
4438 (mwin__draw_bitmap): This function deleted.
4439 (mwin__draw_points): New function.
4440 (mwin__verify_region): Adjusted for the change of the format of
4441 rface->info and the charge of set_region.
4442 (mwin__create_window): Inherit backgound pixel from parent.
4443 (mwin__dump_gc): Adjusted for the change of the format of
4446 2004-03-16 Kenichi Handa <handa@m17n.org>
4448 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
4450 * input.c (M_key_alias): New variable.
4451 (handle_key): Try M_key_alias property of a key too.
4452 (minput__init): Initialize M_key_alias. Give that property to
4453 symbols in one_char_symbol. Fix bug of initializing
4456 * draw.c (compose_glyph_string): Don't handle
4457 ignore_formatting_char here. Include formatting characters in the
4458 range processed by a FTL.
4459 (layout_glyph_string): Handle ignore_formatting_char here.
4461 2004-03-12 Kenichi Handa <handa@m17n.org>
4463 * input-gui.c (win_create_ic): Enable bidi in status control.
4465 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
4467 2004-03-09 Kenichi Handa <handa@m17n.org>
4469 * input.c (load_input_method): If title is not specified, use the
4470 input method name as title.
4472 * m17n-X.c (get_color): Make it static.
4473 (xim_create_ic, xim_destroy_ic, x_error_handler)
4474 (x_io_error_handler): Likewise.
4476 2004-03-01 Kenichi Handa <handa@m17n.org>
4478 * Version 1.0 released.
4481 Copyright (C) 2003, 2004
4482 National Institute of Advanced Industrial Science and Technology (AIST)
4483 Registration Number H15PRO112
4485 This file is part of the m17n library.
4487 The m17n library is free software; you can redistribute it and/or
4488 modify it under the terms of the GNU Lesser General Public License
4489 as published by the Free Software Foundation; either version 2.1 of
4490 the License, or (at your option) any later version.
4492 The m17n library is distributed in the hope that it will be useful,
4493 but WITHOUT ANY WARRANTY; without even the implied warranty of
4494 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4495 Lesser General Public License for more details.
4497 You should have received a copy of the GNU Lesser General Public
4498 License along with the m17n library; if not, write to the Free
4499 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
4500 Boston, MA 02110-1301, USA.