1 2008-04-03 Kenichi Handa <handa@m17n.org>
3 * draw.c (compose_glyph_string): Don't run flt striding over the
5 (get_gstring): Don't use the cached gstring if cursor position is
8 2008-04-02 Kenichi Handa <handa@m17n.org>
10 * input.c (integer_value): Delete the 3rd arg VALUE.
11 (resolve_expression): Adjust the call of integer_value.
12 (take_action_list): Likewise.
14 2008-03-06 Kenichi Handa <handa@m17n.org>
16 * font-ft.c (ft_drive_otf): Don't ignore the otf-spec to apply all
19 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
21 * Version 1.5.1 released.
23 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
25 * draw.c (mdraw_glyph_list): Refer to mfont__ft_driver only when
26 HAVE_FREETYPE is defined.
28 * font.h (OTF_Tag): Be sure that it is defined in any cases.
30 2008-01-30 Kenichi Handa <handa@ni.aist.go.jp>
32 * font.h (enum MFontOpenTypeTable, MFontCapability): Define them
35 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
37 * input.c (parse_action_list): Handle the case "(insert INTEGER)".
39 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
41 * input.c (parse_action_list): Check M_candidates.
42 (get_im_info): If key is Mnil, be sure to set im_info->states to a
45 2008-01-23 Kenichi Handa <handa@ni.aist.go.jp>
47 * input.c (integer_value): Fix interpretation of "@-N".
49 2008-01-17 Kenichi Handa <handa@ni.aist.go.jp>
51 * input.c (get_following_char): Fix interpretation of POS.
52 (get_following_char): Fix interpretation of "@+N".
54 2008-01-15 Kenichi Handa <handa@ni.aist.go.jp>
56 * font-ft.c (ft_drive_otf): Don't refer to otf_gstring if HAVE_OTF
59 * Makefile.am (FLT_SOURCES): Include internal-flt.h.
61 2008-01-07 Kenichi Handa <handa@ni.aist.go.jp>
63 * m17n-flt.c (UPDATE_CLUSTER_RANGE): Don't check if clustering
65 (run_rule): Call UPDATE_CLUSTER_RANGE when necessary.
66 (run_command): Check if clustering now before calling
69 2008-01-06 Kenichi Handa <handa@m17n.org>
71 * font.c (mfont__get_glyph_id): Return -1 if some code is invalid.
73 * font-ft.c (ft_drive_otf): Fix checking of negative feature.
75 * m17n-X.c (xft_find_metric): Set g->g.measured.
77 * m17n-flt.c (Mequal): New variable.
78 (m17n_init_flt): Initialize it.
79 (FontLayoutCmdRule): Merge members supported_glyph and otf_spec
80 into a new member facility.
81 (load_command): Modify parsing of Mfont_facility.
82 (run_rule): Adjuted for the change of FontLayoutCmdRule.
83 (run_otf): Adjusted metrics if a->back is nonzero.
85 2007-12-28 Kenichi Handa <handa@ni.aist.go.jp>
87 * Version 1.5.0 released.
89 2007-12-13 Kenichi Handa <handa@ni.aist.go.jp>
91 * m17n-core.c (m17n_init_core): Handle the lang. env. MDEBUG_FLT.
93 * m17n-flt.c (mdebug_flag): Set to MDEBUG_FLT.
94 (run_rule): Check if a font has the specific glyph correctly.
96 * internal.h (enum MDebugFlag): Delete MDEBUG_FONT_OTF, change
97 MDEBUG_FONT_FLT to MDEBUG_FLT.
99 * font.c (mfont__get_glyph_id): Encode g->g.code (not g->g.c).
101 * font-flt.c: Delete it.
103 2007-12-08 Kenichi Handa <handa@ni.aist.go.jp>
105 * m17n-flt.c (run_rule): Fix printing of debug info. Don't update
106 TO for the rule of SRC_HAS_GLYPH.
108 * draw.c (run_flt): Argument changed.
109 (compose_glyph_string): Adjusted for the above change.
111 2007-12-07 Kenichi Handa <handa@ni.aist.go.jp>
113 * plist.c (read_mtext_element): Don't free the malloced buffer.
115 2007-12-04 Kenichi Handa <handa@ni.aist.go.jp>
117 * m17n-core.h (merror_code): Extern it.
119 * m17n-misc.h (merror_code): Don't extern it.
121 * m17n.h: Handle the case of _M17N_FLT_H_ being defined.
123 * m17n-flt.h: Handle the case of _M17N_H_ being defined.
125 2007-11-22 Kenichi Handa <handa@ni.aist.go.jp>
127 * draw.c (compose_glyph_string): Check g->rface->layouter, not
128 g->rface->rfont->layouter.
130 * font-ft.c (ft_drive_otf): Fix setting of g->g.from and g->g.to.
132 * m17n-flt.c (FontLayoutContext): New member encoded_offset.
133 (run_rule): Use ctx->encoded_offset.
134 (run_command): Likewise.
135 (run_stages): Set ctx->encoded_offset.
137 2007-11-21 Kenichi Handa <handa@ni.aist.go.jp>
139 * m17n-flt.c (enum GlyphInfoMask): Adjusted for the change of
140 bit-size of MFLTGlyph->internal.
142 2007-11-20 Kenichi Handa <handa@ni.aist.go.jp>
144 * draw.c (visual_order): Exclude the last anchor glyph from the
147 * m17n-flt.h (MFLTGlyph): New member <adjusted>.
149 * m17n-flt.c (run_otf): Set adjusted flag of glyphs if necessary.
150 (run_stages): Likewise.
151 (load_flt): Unref top after checking plist.
153 * m17n-X.c (xft_render): Check adjusted flag of glyphs.
155 2007-11-12 Kenichi Handa <handa@ni.aist.go.jp>
157 * font-ft.c (ft_check_otf): Fix arg to OTF_check_features.
159 * m17n-flt.c (Mcombining): New variable.
160 (Mfont_facility): Renamed from Mfont_has. Referrer changed.
161 (enum FontLayoutCmdRuleSrcType): Delete SRC_EXIST, add
162 SRC_HAS_GLYPH and SRC_OTF_SPEC.
163 (FontLayoutCmdRule): Delete src.exist, add src.supported_glyph and
165 (load_command): Adjusted for the above changes.
166 (run_rule): Likewise.
167 (combining_code_from_class): Delete it.
168 (mflt_get): Check flt->name against Mcombining, not Mt.
170 * internal-flt.h (Mcombining): Extern it.
172 * draw.c (compose_glyph_string): Call run_flt with Mcombining for
173 combining characters.
175 2007-11-09 Kenichi Handa <handa@ni.aist.go.jp>
177 * face.c (mface__realize): Reset measured flag before calling
180 * m17n-flt.c (run_stages): Fix handing of off_x and off_y.
181 (setup_combining_coverage): New function.
182 (setup_combining_flt): New function.
183 (mflt_get): If flt is not found, return NULL. If name if Mt,
184 call setup_combining_flt.
185 (mflt_run): For debugging, print font family name.
187 * font-ft.c (ft_render): Fix handling of baseline_offset.
188 (ft_encapsulate): Set metrics in 26.6 fixed pixel.
189 (ft_render): Check pixel_mode to determine anti_alias.
191 * m17n-X.c (xfont_find_metric): Delete invalid "continue" line.
192 (xfont_find_metric): Set metrics in 26.6 fixed pixel.
193 (xfont_render): Set baseline_offset in pixel.
194 (xft_render): Fix handling of baseline_offset.
196 * draw.c (run_flt): Set font.font.family.
197 (compose_glyph_string): Fix handling of combining characters.
199 * fontset.c (try_font_list): Check if the named flt is surely
202 2007-11-07 Kenichi Handa <handa@ni.aist.go.jp>
204 * draw.c (analyse_bidi_level): New function.
205 (visual_order): Do reordering using the already decided
207 (compose_glyph_string): Decide bidi-level before calling flt.
209 * m17n-flt.c (mflt_run): Fix typo.
211 * font-ft.c (ft_drive_otf): Fix indexing gstring->glyphs.
213 2007-11-06 Kenichi Handa <handa@ni.aist.go.jp>
215 * draw.c (visual_order): Don't rely on the width of glyphs.
216 (run_flt): Fix culculation of g->g.to.
218 * m17n-flt.c (run_rule): Don't set error code here.
219 (run_cond): Likewise.
220 (run_otf): Fix culculation of xoff and yoff.
221 (run_command): Don't set error code here.
225 * m17n-X.c (xfont_open): Keep rfont's metrics in 26.6 fixed pixels.
226 (xfont_find_metric): Set glyph's yadv to 0.
227 (xft_find_metric): Likewise.
229 * font-ft.c (ft_open): Keep rfont's metrics in 26.6 fixed pixels.
230 (ft_find_metric): Adjust glyph's metrics.
231 (ft_encapsulate): Keep rfont's metrics in 26.6 fixed pixels.
232 (ft_drive_otf): Set mark glyph's xadv to 0.
234 * face.c (mface__for_chars): Adjusts the unit of face's ascent and
237 2007-10-29 Kenichi Handa <handa@m17n.org>
239 * m17n-flt.h (struct _MFLTOtfSpec): Adjusted for the new FLT handling.
240 (mflt_get): Adjusted for the argument change.
241 (mflt_name): Adjusted for the return value change.
243 * m17n-flt.c (Mgenerator, Mend): New variables.
244 (flt_min_coverage, flt_max_coverage): New variables.
247 (Mfont_has): Renamed from Mexist. Referrers chagned.
248 (gen_otf_tag): Handle the trailing whitespaces.
249 (otf_count_features, otf_store_features): Fix for negative features.
250 (parse_otf_command): Adjusted for the change of MFLTOtfSpec.
251 (load_otf_command): Likewise.
252 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
253 (load_flt): Argument changed. Caller changed.
254 (free_flt_list): New function.
255 (run_rule): Adjusted for the change of FontLayoutContext.
256 (mflt_run): Adjusted for the change of FontLayoutContext.
258 * m17n-gui.c (m17n_init_win): Call m17n_init_flt.
259 (m17n_fini_win): Call m17n_fini_flt.
261 * m17n-gui.h: Include m17n-flt.h.
263 * m17n-gd.c: Adusted for the change of MGlyph.
265 * m17n-X.c: Adusted for the change of MGlyph.
266 (xft_check_otf, xft_drive_otf): New functions.
268 * internal-gui.h (MGlyph): Modified for new FLT handling.
270 * fontset.c (try_font_list): Adusted for the change of MGlyph.
272 * font-ft.c: Adjusted for the change of MGlyph.
273 (ft_check_cap_otf): Renamed from ft_check_otf. Callers changed.
274 (get_glyph_metric): Deleted.
275 (ft_check_otf): New function.
276 (ft_drive_otf): New fucntion.
278 * font.c: Adjusted for the change of MGlyph.
279 (mfont__init): Don't call mfont__flt_init.
280 (mfont__fini): Don't call mfont__flt_fini.
281 (mfont__get_glyph_id, mfont__get_metrics): New functions.
283 * font.h (struct MRealizedFont): New members x_ppem and y_ppem.
284 (MFLTFontForRealized): New struct.
285 (struct MFontDriver): New members check_otf and drive_otf.
286 (mfont__get_glyph_id, mfont__get_metrics): Extern them.
288 * face.c: Adjusted for the change of MGlyph.
290 * draw.c: Adjusted for the change of MGlyph.
292 * m17n.c (m17n_init): Don't call mchar_init.
294 * m17n-core.c (m17n_init_core): Call mchar_init.
296 * m17n-core.h (mchartable_min_char, mchartable_max_char): Extern them.
298 * input.c: Include "m17n.h" instead of "m17n-gui.h".
300 * chartab.c (mchartable): Initialize table->min_char to -1.
301 (mchartable_min_char): New function.
302 (mchartable_max_char): New function.
304 * Makefile.am (GUI_SOURCES): Delete font-flt.c.
305 (libm17n_gui_la_LIBADD): Add ${top_builddir}/src/libm17n-flt.la.
307 2007-10-12 Kenichi Handa <handa@m17n.org>
309 * m17n-core.h (Mcharset): Extern it.
310 Move detabase related declarations from m17n.h.
312 * m17n-flt.h: Include m17n-core.h instead of m17n.h.
313 (struct _MFLTOtfFeatures): New struct.
314 (struct _MFLTOtfSpec): Delete gsub, gpos, etc, add gsub_gpos.
315 (struct _MFLTFont): Delete otf, add check_otf.
316 (MCHAR_INVALID_CODE): Define it.
318 * plist.c (read_mtext_element): Simplify the code.
320 * m17n.h: Move database related declarations to m17n-core.h
321 (Mharset): Don't extern it.
323 * m17n.c (m17n_init): Don't call mdatabase__init.
325 * m17n-gd.c (read_rgb_txt): Check also /etc/X11/rgb.txt. Downcase
328 * m17n-flt.c: Include m17n-core.h instead of m17n.h.
329 (Mexist): New variable.
330 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
331 (FontLayoutCmdRule): New member src.exist.
332 (parse_otf_command): Handle gsub_count and gpos_count separately.
333 (load_otf_command): Adjusted for the change of MFLTOtfSpec.
334 (load_command): Handle the command "exist".
335 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
336 (run_rule): Handle the case SRC_EXIST.
337 (run_otf): Adjusted for the change of MFLTOtfSpec.
338 (run_command): Check the range of FROM.
339 (check_otf_spec): Delete it.
340 (m17n_init_flt): Call m17n_init_core instead of m17n_init.
342 (m17n_fini_flt): Call m17n_fini_core instead of m17n_fiini.
343 (mflt_find): Call font->check_otf instead of check_otf_spec.
344 (mflt_run): Keep the metrics in 26.6 fixed point.
346 * m17n-core.c (mdatabase__finder, mdatabase__loader): Delete them.
347 (m17n_init_core): Call mdatabase__init.
349 * m17n-X.c (device_open): Use mplist_add, not mplist_push.
351 * internal.h (mdatabase__finder, mdatabase__loader): Delete externs
354 * font-flt.c (Mexist): New variable.
355 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
356 (FontLayoutCmdRule): New member src.exist.
357 (load_category_table): Use isalnum, not isalpha.
358 (load_command): Check the command "exist".
359 (run_rule): Hande the case SRC_EXIST.
360 (run_command): Check the range of FROM.
361 (mfont__flt_init): Initialize Mexist.
363 * draw.c (layout_glyphs): Fix calculation of off_x and off_y.
365 * database.h (mdatabase__load_charset_func): Extern it.
367 * database.c: Include m17n-core.h instead of m17n.h.
368 (load_chartable): Use mtext__from_data.
369 (load_charset): Moved to charset.c
370 (load_database): Call mdatabase__load_charset_func instead of
372 (mdatabase__load_charset_func): New variable.
373 (mdatabase__init): Initialize mdatabase__load_charset_func and
374 Mcharset. Don't set mdatabase__finder and mdatabase__loader.
375 (mdatabase__save): Use fwrite, not mconv_encode_stream.
376 (Mcharset): Declare it here.
378 * charset.c: Include "database.h.".
379 (load_charset): Moved from database.c.
380 (mcharset__init): Initialize mdatabase__load_charset_func, don't
383 * character.c (mchar_define_property): Call mdatabase_find directly.
384 (mchar_get_prop): Call mdatabase_add directly.
385 (mchar_put_prop): Call mdatabase_load directly.
386 (mchar_get_prop_table): Likewise.
388 * Makefile.am (libm17n_core_la_SOURCES): Add database.[ch].
389 (libm17n_la_SOURCES): Remove database.[ch].
390 (libm17n_flt_la_LIBADD): Delete libm17n.la, add libm17n-core.la.
392 2007-09-18 Kenichi Handa <handa@m17n.org>
394 * face.c (mface__realize): Try Freetype based font at first.
396 * font.c: Include <ctype.h>
398 2007-09-16 Kenichi Handa <handa@m17n.org>
400 * m17n-flt.c (load_flt): New arg full. If full is zero, load only
402 (run_otf): Call font->get_metrics, not font->get_metric.
403 (run_stages): Likewise.
404 (CHECK_FLT_COVERAGE): New macro.
405 (CHECK_FLT_STAGES): Call load_flt with the second arg 1.
406 (check_otf_spec): New function.
407 (m17n_fini_flt): Unref flt->coverage.
408 (mflt_find): Argument changed.
409 (mflt_name): New function.
410 (mflt_coverage): Use CHECK_FLT_COVERAGE.
412 * m17n-flt.h (MFLTFont): Member get_metrics renamed from get_metric.
413 (mflt_find): Prototype adjusted.
414 (mflt_name): Extern it.
416 2007-09-14 Kenichi Handa <handa@m17n.org>
418 * m17n-flt.h (struct _MFLTGlyph): Change signedness of members.
420 * font-flt.c (run_otf): Make debug info printing comaptible with
422 (run_command): Likewise.
423 (mfont__flt_run): Likewise.
425 * m17n-flt.c (UPDATE_CLUSTER_RANGE): ctx->cluster_begin_idx is
426 invalid only when it's negative.
428 (run_command): Likewise.
429 (mflt_run): Initialize ctx.cluster_begin_idx to -1.
431 2007-09-10 Kenichi Handa <handa@m17n.org>
433 * m17n-flt.h (struct _MFLTGlyph): New member encoded and measured.
434 (struct _MFLTFont): Prototype of get_glyph_id changed.
436 * m17n-flt.c (enum GlyphInfoMask): Delete EncodedMask and
438 (GAPPEND): Delete this macro.
439 (GET_ENCODED, SET_ENCODED, GET_MEASURED, SET_MEASURED): Adjusted
440 for the change of MFLTGlyph. Caller changed.
441 (run_otf): Simply calls font->get_glyph_id.
442 (run_command): Reset g->encoded and g->measured for direct code.
443 (positioning): Delete this function.
444 (run_stages): Simply calls font->get_glyph_id and font->get_metric.
446 2007-09-07 Kenichi Handa <handa@m17n.org>
448 * draw.c (compose_glyph_string): Improve script detection.
450 2007-09-06 Kenichi Handa <handa@m17n.org>
452 * m17n-flt.h (mflt_get): Extern it.
454 * m17n-flt.c (run_stages): Call positioning only if
455 font->get_metric is non-NULL.
456 (CHECK_FLT_STAGES): Fix typo.
457 (mflt_get): New function.
459 * font-flt.c (mfont__flt_run): Improve debug info printing.
461 2007-09-04 Kenichi Handa <handa@m17n.org>
463 * m17n-flt.c (MFontLayoutTable): Delete this type.
464 (struct _MFLT): New member mdb and coverage.
465 (list_flt): Set flt->mdb.
466 (load_generator): Argument and return value changed. Caller
468 (get_font_layout_table): Delete this function.
469 (run_stages): Argument changed. Caller changed.
470 (CHECK_FLT_STAGES): New macro.
471 (mfont__flt_encode_char): Argument changed.
472 (mflt_find): Likewise.
473 (mflt_coverage): New function.
474 (mflt_run): Argument changed.
475 (mdebug_dump_flt): Likewise.
477 * m17n-flt.h (mflt_coverage): Extern it.
478 (mflt_find): Prototype adjusted.
480 2007-09-03 Kenichi Handa <handa@m17n.org>
482 * internal.h (MTABLE_CALLOC_SAFE, MSTRUCT_CALLOC_SAFE): New macros.
484 * database.c (mdatabase__props): New function.
486 * database.h (mdatabase__props): Extern it.
488 * m17n-flt.h (struct _MFLTGlyphString): Delete user_data, add
490 (struct _MFLTFont): Add suitable_p.
491 (mflt_find): Extern it.
493 * m17n-flt.c: Include "database.h".
494 (struct _MFLT): New struct.
495 (list_flt): New function.
496 (load_flt): Don't update flt_list.
497 (get_font_layout_table): Use flt_list.
498 (m17n_init_flt): Don't initialize flt_list.
499 (m17n_fini_flt): Adjusted for the change of flt_list.
500 (mflt_find): New function.
501 (mflt_run): Fix debug printing.
503 2007-08-23 Kenichi Handa <handa@m17n.org>
505 * m17n-flt.c (run_otf): Remove #ifdef HAVE_OTF and #endi.
506 (run_stages): Print separator in encoded string as "|".
508 2007-08-23 Kenichi Handa <handa@m17n.org>
510 * font-flt.c (mfont__flt_run): Don't calculate a glyph metric if
511 the glyph is already handled by OTF.
513 2007-08-21 Kenichi Handa <handa@m17n.org>
515 * font-ft.c (ft_check_capability): Check cap->script_tag at first.
517 2007-08-20 Kenichi Handa <handa@m17n.org>
519 * font-flt.c (mfont__flt_run): Get glyph metrics before printing
522 2007-08-17 Kenichi Handa <handa@m17n.org>
524 * m17n-flt.h (struct _MFLTGlyphString): Member pointer renamed to
526 (MFLTOtfSpec): Renamed from MFLT_OTF_Spec.
527 (MFLTFont): Prototype of the member drive_otf adjusted.
529 * m17n-flt.c (run_stages): Fix handling of padding.
531 * font-ft.c (get_glyph_metric): New function.
532 (DEVICE_DELTA): Return 26.6 fixed point value.
533 (adjust_anchor): Likewise.
534 (mfont__ft_drive_otf): Use get_glyph_metric.
536 * font-flt.c (mfont__flt_run): Pay attention to padding on
539 2007-08-16 Kenichi Handa <handa@m17n.org>
541 * m17n-flt.c (run_stages): Fix typo.
543 * font-ft.c (adjust_anchor): Argument changed. Calculte based on
545 (mfont__ft_drive_otf): Don't call OTF_check_features for GPOS.
546 Adjusted for the argument change of adjust_anchor. Calculte based
549 2007-08-15 Kenichi Handa <handa@m17n.org>
551 * charset.c (mcharset__load_from_database): Set mdebug_flag
552 instead of mdebug_mask.
554 * coding.c (mcoding__load_from_database): Set mdebug_flag instead
557 * database.c (load_database): Set mdebug_flag instead of
559 (mdatabase__load_for_keys): Likewise.
561 * draw.c: Include "internal-flt.h".
562 (dump_combining_code): Don't subtract 128 from combining code
565 * font-flt.c: Include "internal-flt.h". Set mdebug_flag instead
567 (run_rule): Print debug info only when MDEBUG_FLAG is greater than
569 (run_cond): Likewise.
571 (run_command): Likewise.
572 (mfont__flt_run): Change format of debug info.
574 * font-ft.c: Include "internal-flt.h".
575 Set mdebug_flag instead of mdebug_mask.
576 (mfont__ft_drive_otf): Fix arg to OTF_check_features.
578 * input.c: Set mdebug_flag instead of mdebug_mask.
579 (shift_state): New MDEBUG_FLAG macro.
580 (preedit_commit): Likewise.
583 * internal-flt.h: New file.
585 * internal-gui.h (MAKE_COMBINING_CODE, COMBINING_CODE_OFF_Y)
586 (COMBINING_CODE_OFF_X, COMBINING_CODE_BASE_X)
587 (COMBINING_CODE_BASE_Y, COMBINING_CODE_ADD_X)
588 (COMBINING_CODE_ADD_Y, MAKE_COMBINING_CODE_BY_CLASS)
589 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
590 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P): Move
591 these macros to internal-flt.h.
593 * internal.h (M17N_OBJECT_ADD_ARRAY): Adjusted for the change of
595 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Likewise.
596 (enum MDebugMaskBit): Delete this enum.
597 (enum MDebugFlag): New enum.
598 (mdebug__flag): Don't extern it.
599 (mdebug__flags): Extern it.
600 (MDEBUG_FLAG): New macro.
601 (MDEBUG_PRINT0): Use the macro MDEBUG_FLAG.
602 (MDEBUG_DUMP, MDEBUG_PUSH_TIME, MDEBUG_POP_TIME)
603 (MDEBUG_PRINT_TIME): Likewise.
605 * m17n-X.c (xfont_open): Set mdebug_flag instead of mdebug_mask.
606 (xfont_list): Likewise.
608 * m17n-core.c (mdebug__flag): Delete this variable.
609 (mdebug__flags): New variable.
610 (SET_DEBUG_FLAG): Make it a function.
611 (m17n_init_core): Set mdebug_flag instead of mdebug_mask.
612 (m17n_fini_core): Likewise.
614 * m17n-gui.c (m17n_init_win): Set mdebug_flag instead of mdebug_mask.
615 (m17n_fini_win): Likewise.
617 * m17n-misc.h (enum MErrorCode): Add MERROR_FLT.
619 * m17n.c (m17n_init): Set mdebug_flag instead of mdebug_mask.
620 (m17n_fini): Likewise.
622 * symbol.c (msymbol__free_table): Adjusted for the change of
625 * Makefile.am (BASICBUILDS): Add libm17n-flt.la.
626 (BASICHEADERS): Add m17n-flt.h.
627 (FLT_SOURCES): New variable.
628 (libm17n_flt_la_SOURCES, libm17n_flt_la_LIBADD)
629 (libm17n_flt_la_LDFLAGS): Likewise.
631 * m17n-flt.h: New file.
633 * m17n-flt.c: New file created by modifying font-flt.c.
635 2007-07-13 Kenichi Handa <handa@m17n.org>
637 * Version 1.4.0 released.
639 2007-07-12 Kenichi Handa <handa@m17n.org>
641 * input.c: Fix doxygen @ref commands.
643 2007-07-10 Kenichi Handa <handa@m17n.org>
645 * m17n-core.h (M17NFunc): Fix typo of Doxygen directive.
647 2007-07-09 Kenichi Handa <handa@m17n.org>
649 * m17n-core.h (M17N_BEGIN_HEADER, M17N_END_HEADER): New macros.
651 * m17n.h: Include m17n-core.h if not yet done. Use macros
652 M17N_BEGIN_HEADER and M17N_END_HEADER.
654 * m17n-gui.h: Likewise.
656 * m17n-misc.h: Likewise.
658 2007-06-13 Kenichi Handa <handa@m17n.org>
660 * font-flt.c (load_command): Prepend "^" in the regular expression.
662 2007-06-11 Kenichi Handa <handa@m17n.org>
664 * language.c (mlanguage_name_list): Fix previous change.
666 * coding.c (mcoding__load_from_database): Add aliases in
667 coding_definition_list.
669 2007-06-10 Kenichi Handa <handa@m17n.org>
671 * language.c (mlanguage_name_list): Fix previous change.
673 2007-06-08 Kenichi Handa <handa@m17n.org>
675 * input.c (update_candidate): Copy candidate_list earlier.
676 (re_init_ic): Provide pseudo initialize state if none.
678 2007-06-05 Kenichi Handa <handa@m17n.org>
680 * input.c (preedit_insert): Print debug information.
682 * database.c (expand_wildcard_database): New function.
683 (mdatabase_list): Fix handling of wildcard database.
685 * language.c (load_lang_name): New function.
686 (mlang__fini): Cancel the last two changes.
687 (mlanguage_name_list): New arg script and territories. Use
690 * m17n.h (mlangauge_name_list): Adjusted.
692 2007-06-04 Kenichi Handa <handa@m17n.org>
694 * input.c (open_im): Check if the input method has at least one
697 2007-06-01 Kenichi Handa <handa@m17n.org>
699 * input.c (shift_state): Change the format of debug print.
700 (preedit_commit): New arg need_prefix. Caller changed.
701 (update_candidate): Copy candidate_list.
702 (take_action_list): Likewise.
703 (handle_key): Change the format of debug print.
705 * font-flt.c (load_flt): Ignore unknown directives.
707 2007-05-25 Kenichi Handa <handa@m17n.org>
709 * m17n-core.c (mdebug__unregister_object): Small optimization.
711 * database.c (find_file): Merged into get_database_file.
712 (get_database_file): New arg result. Caller changed.
713 (mdatabase__check): Fix the logic.
715 2007-05-24 Kenichi Handa <handa@m17n.org>
717 * database.c (find_database): If unprocessed wildcard database is
718 found, register database filed and recursively call find_database.
719 (free_db_info): Unref db_info->properties.
720 (register_database): New arg properties. Delete code for
721 initializing mdatabase__list.
722 (register_databases_in_files): Argument changed. Caller changed.
723 (mdatabase__update): Don't list files by glob here.
724 (mdatabase_list): If unprocessed wildcard database is found,
725 register database filed and recursively call mdatabase_list.
727 * database.h (enum MDatabaseStatus): New enum
728 MDB_STATUS_AUTO_WILDCARD.
730 * input.c (load_branch): Fix previous change.
731 (update_global_info): If the global database is not found, return -1.
733 2007-05-23 Kenichi Handa <handa@m17n.org>
735 * database.c (Mversion): New variable.
736 (mdatabase__init): Initialize it.
737 (register_database): New arg properties. Caller changed.
738 (register_databases_in_files): Don't check version here.
739 (mdatabase__update): Likewise.
741 * database.h (MDatabaseInfo): New member properties.
743 2007-05-21 Kenichi Handa <handa@m17n.org>
745 * language.c: Include <ctype.h>
746 (mlanguage__info): Use strncasecmp (not memcmp).
747 (mlanguage_name): Downcase language name for backward
750 * input.c (filter): Don't check Mlanguage property of
753 2007-05-18 Kenichi Handa <handa@m17n.org>
755 * language.c (mlanguage_name): Fix it to handle M-text English
758 * input.c (config_command): Set NAME before using it.
759 (load_branch): Try to resolve a map name by variables.
761 2007-05-17 Kenichi Handa <handa@m17n.org>
763 * language.c (mlang__fini): Fix previous change.
765 2007-05-16 Kenichi Handa <handa@m17n.org>
767 * plist.c (free_plist): Cancel the last change.
768 (write_element): Check if PLIST is nested.
769 (mplist__from_plist): Label a plist as nested if appropriate.
770 (mplist__from_alist): Label a plist as nested.
771 (mplist__conc): Check the value of PL before referring it. Label
772 a plist as nested if appropriate.
773 (mplist_copy): Label a plist as nested if appropriate.
774 (mplist_put_func): Return Mnil if KEY is a managing key.
775 (mplist_push): Label a plist as nested if appropriate.
777 * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
780 * language.c (mlang__fini): Unref each element of langname_list.
782 2007-05-14 Kenichi Handa <handa@m17n.org>
784 * language.c: Include <string.h> and <locale.h>.
785 (langname_list): New variable.
786 (load_lang_script_list): Exclude invalid list elements.
787 (mlang__init): Initialize langname_list.
788 (mlang__fini): Unref langname_list.
789 (mlanguage__info): Adjusted for the change of English
790 name (symbol->M-text).
791 (mlanguage_name): Label it as obsolete.
792 (mlanguage_name_list): New function.
794 * m17n.h (mlanguage_name_list): Extern it.
796 * locale.c (make_locale): Fix setting of members of locale.
798 * plist.c (free_plist): Unref also nested plist.
800 2007-05-11 Kenichi Handa <handa@m17n.org>
802 * coding.c (mconv_reset_converter): Set internal->used to 0.
804 2007-05-08 Kenichi Handa <handa@m17n.org>
806 * input.c (check_description): Force copying the translated text.
808 2007-05-02 Kenichi Handa <handa@m17n.org>
810 * input.c (minput_save_config): Unref unnecessary plist. Use
811 free_im_list to free im_config_list.
813 2007-04-20 Kenichi Handa <handa@m17n.org>
815 * input.c (config_command): Fix previous change again.
816 (config_variable): Likewise.
817 (minput_config_command): Fix for the case of setting back to
819 (minput_config_variable): Likewise.
820 (minput_save_config): Include nil as documentation of customized
823 2007-04-05 Kenichi Handa <handa@m17n.org>
825 * input.c (config_command): Fix previous change.
826 (config_variable): Likewise.
828 * plist.c (mplist_get_func): Fix for backward compatiblity.
830 2007-04-04 Kenichi Handa <handa@m17n.org>
832 * input.c (minput_get_command, minput_config_command): Fix example
835 2007-03-29 Kenichi Handa <handa@m17n.org>
837 These changes are to avoid unsafe casting of a function pointer.
839 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
840 (struct MFace): New member hook.
842 * face.c (serialize_face): Adjusted for the change of MFace.
843 (deserialize_face): Likewise.
844 (mface__init): Likewise. Use msymbol_put_func.
845 (mface__realize): Adjusted for the change of MFace. Avoid
847 (mface_get_prop): Adjusted for the change of MFace.
848 (mface_put_prop): Likewise.
849 (mface_get_hook): New function.
850 (mface_put_hook): New function.
851 (mface_update): Adjusted for the change of MFace.
853 * input-gui.c (win_callback): Use mplsit_get_func.
854 (minput__win_init): Use mplsit_put_func.
856 * input.c (take_action_list): Use mplist_get_func.
857 (init_ic_info): Likewise.
858 (fini_ic_info): Likewise.
859 (minput_callback): Likewise.
860 (minput__init): Use mplist_put_func.
862 * language.c (mlang__init): Use msymbol_put_func.
864 * m17n-core.h (M17NFunc): New function type.
865 (M17N_FUNC): New macro.
866 (msymbol_put_func, msymbol_get_func): Extern them.
867 (mplist_put_func, mplist_get_func): Extern them.
869 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
871 * m17n-gui.c (mframe): Add a proper casting.
873 * plist.h (struct MPlist): Make the member val a union.
874 (MPLIST_VAL): Adjusted for the above change.
875 (MPLIST_FUNC): New macro.
876 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
878 * plist.c (mplist_put_func, mplist_get_func): New functions.
880 * symbol.c (msymbol__fini): Use MPLIST_VAL.
881 (msymbol_put_func, msymbol_get_func): New functions.
883 * textprop.c (mtext_serialize): Use msymbol_get_func.
884 (mtext_deserialize): Likewise.
886 2007-03-28 Kenichi Handa <handa@m17n.org>
888 * input.c (get_candidate_list): Avoid unnecessary unref.
890 2007-03-23 Kenichi Handa <handa@m17n.org>
892 * database.c (mdatabase__update): Unref plist at the tail.
894 2007-03-21 Kenichi Handa <handa@m17n.org>
896 * input.c (update_custom_info): Fix for the case "name == Mnil &&
898 (config_command): Fix for the case that configuration is
900 (config_variable): Likewise.
901 (minput_config_command): If keyseqlist is an empty list, cancel
903 (minput_config_variable) If value is an empty list, cancel the
905 (minput_save_config): Handle cancellation of config and customize
908 2007-03-15 Kenichi Handa <handa@m17n.org>
910 * input.c (minput_config_variable): Check custom->vars (not
913 2007-03-01 Kenichi Handa <handa@m17n.org>
915 * input.c (reload_im_info): Setup cmds, vars, and title of
917 (check_variable_value): Fix the return value.
919 * database.c (mdatabase__check): If necessary, update database and
922 2007-02-28 Kenichi Handa <handa@m17n.org>
924 * database.c (get_dir_info): Set dir_info->status to
926 (check_version): New function.
927 (register_database): Don't call find_database.
928 (register_databases_in_files): Don't register a database of
930 (mdatabase__update): Likewise. Avoid unnecessary scanning.
932 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
933 and MDB_STATUS_OUTDATED.
935 * font.h (struct MFont): Types of members type, source, and
936 spacing changed to unsigned.
938 * internal-gui.h (struct): Types of members category and type
941 * internal.h (struct MText): Types of members format and coverage
944 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
945 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
947 2007-02-23 Kenichi Handa <handa@m17n.org>
949 * input.c (Mpop): New variable.
950 (fully_initialize): Initialize Mpop.
951 (parse_action_list): Handle Mpop.
952 (take_action_list): Likewise.
953 (handle_key): When a key is unhandled, shift to the initial state
954 only if the current state has no branch action.
956 2007-02-12 Kenichi Handa <handa@m17n.org>
958 * input.c (get_preceding_char): Unref mt if necessary.
959 (get_following_char): Likewise.
960 (parse_action_list): Fix handling of `insert' action as
962 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
963 (take_action_list): Check invalid candidate list.
965 2007-02-06 Kenichi Handa <handa@m17n.org>
967 * input.c (integer_value): Check also ic->produced for @-N.
969 2007-01-26 Kenichi Handa <handa@m17n.org>
971 * database.c (mdatabase__update): Check mdatabase__dir_list from
974 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
976 2007-01-12 Kenichi Handa <handa@m17n.org>
978 * input.c (handle_key): Handle a branch action of the initial
981 2007-01-10 Kenichi Handa <handa@m17n.org>
983 * m17n-gd.c (gd_render): Delete superfluous line.
985 2006-12-26 Kenichi Handa <handa@m17n.org>
987 * m17n.h (minput_callback): Extern it.
989 * input.h (minput__callback): Delte extern.
991 * input.c (get_surrounding_text): Adjusted for the change of
992 minput__callback to minput_callback.
993 (delete_surrounding_text): Likewise.
994 (minput_create_ic): Likewise.
995 (minput_destroy_ic): Likewise.
996 (minput_filter): Likewise.
997 (minput_set_spot): Likewise.
998 (minput_toggle): Likewise.
999 (minput_reset_ic): Likewise.
1001 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
1002 and ic->candidate_to to 0.
1003 (minput_callback): Renamed from minput__callback.
1005 * input-gui.c (win_callback): Adjusted for the change of
1006 minput__callback to minput_callback.
1008 2006-12-15 Kenichi Handa <handa@m17n.org>
1010 * font-ft.c (ft_add_font): Fix typo.
1012 2006-12-06 Kenichi Handa <handa@m17n.org>
1014 * Version 1.3.4 released.
1016 2006-11-16 Kenichi Handa <handa@m17n.org>
1018 * input.c (parse_action_list): Allow (undo 0).
1019 (adjust_markers): New function.
1020 (preedit_insert, preedit_delete): Call adjust_markers.
1021 (preedit_replace): New function.
1022 (update_candidate): Call preedit_replace instead of preedit_insert
1024 (filter): When ic_info->commit_key_head is nonzero, shift input
1025 event keys even if there's no committed text.
1027 2006-11-10 Kenichi Handa <handa@m17n.org>
1029 * input.h (MInputContextInfo): New member commit_key_head.
1031 * input.c (preedit_commit): Update ic_info->commit_key_head.
1032 (take_action_list): Reset ic_info->commit_key_head on Mundo.
1033 (filter): When committed, shift keys by ic_info->commit_key_head.
1035 2006-10-30 Kenichi Handa <handa@m17n.org>
1037 * input.c (preedit_delete): Fix typo.
1038 (take_action_list): Print more debugging information. Allow
1039 variable in arg of 'select' and `pushback'.
1041 * database.c (gen_database_name): Don't put extra space.
1042 (load_database): Print debugging information.
1043 (register_databases_in_files): New arg headlen. Callers changed.
1044 (mdatabase__load_for_keys): Shorten debugging information.
1045 (mdatabase_load): Don't print debugging information here.
1047 2006-10-27 Kenichi Handa <handa@m17n.org>
1049 * input.c (marker_code): New arg surrounding. Callers changed.
1050 (surrounding_pos): Check if name[0] == '@'.
1051 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
1052 (take_action_list): Likewise.
1053 (get_preceding_char): If POS is zero, always call
1054 get_surrounding_text.
1056 2006-10-19 Kenichi Handa <handa@m17n.org>
1058 * input.c (load_variables): Fix setting of `global'.
1060 2006-10-16 Kenichi Handa <handa@m17n.org>
1062 * draw.c (draw_background): Be sure to set *to_x.
1063 (render_glyph_string): If from == to, just return.
1065 2006-10-18 Kenichi Handa <handa@m17n.org>
1067 * database.c (get_dir_info): Return NULL if the directory name is
1069 (register_databases_in_files): Call register_database with
1071 (mdatabase__update): Fix logic. Call register_database with
1073 (mdatabase_define): Call register_database with
1074 MDB_STATUS_EXPLICIT.
1076 * input.c (delete_surrounding_text): Be sure to set members
1077 preceding_text and following_text to NULL.
1078 (shift_state): Save variable values in ic_info->vars_saved.
1079 (preedit_commit): Don't print debug information here. Don't
1080 change ic_info->keys here.
1081 (get_candidate_list): Don't ref plist.
1082 (take_action_list): Don't unref return value of
1083 get_candidate_list. For undo, reset ic->produced and recover
1084 ic_info->vars. Be sure to set ic->candidate_list to NULL after
1086 (init_ic_info): Set ic_info->vars_saved.
1087 (fini_ic_info): Unref ic_info->vars_saved.
1088 (re_init_ic): Be sure to set ic->candidate_list to NULL after
1090 (filter): Be sure to set members preceding_text and following_text
1091 to NULL. Print debug information about produced text. Delete
1092 processed keys from ic_info->keys.
1094 * input.h (MInputContextInfo): New member vars_saved.
1096 2006-10-16 Kenichi Handa <handa@m17n.org>
1098 * database.c (mdatabase__update): Fix the way to get db_info.
1100 2006-10-02 Kenichi Handa <handa@m17n.org>
1102 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
1103 `size' changed to 24.
1105 * font.c (xlfd_unparse_name): Adjusted for the change of
1107 (font_score): Likewise.
1108 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
1110 * m17n-X.c (MFontX, _MFontX): Deleted.
1111 (SET_SIZE, HAVE_SIZE): Deleted.
1112 (free_display_info): Adjusted for the change of
1113 disp_info->font_list format.
1114 (xfont_registry_list): Likewise.
1115 (xfont_open): Likewise.
1116 (xfont_list): Likewise.
1117 (xfont_encode_char): Ignore size to find a realized font.
1118 (MRealizedFontXft): Change the order of members to make it
1119 compatible with MRealizedFontFT.
1121 2006-09-27 Kenichi Handa <handa@m17n.org>
1123 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
1124 (mfont_close): Add comments.
1126 * mtext-lbrk.c (mtext_line_break): Add comment.
1128 2006-09-26 Kenichi Handa <handa@m17n.org>
1130 * input.c (minput_get_description): Handle description about
1131 inclusion-only input methods.
1133 2006-09-21 Kenichi Handa <handa@m17n.org>
1135 * input.c (M_gettext): New variable.
1136 (fully_initialize): Initialize M_gettext.
1137 (check_description): New function.
1138 (load_commands): Call check_description.
1139 (config_all_commands): Be sure to unref pl.
1140 (load_variables): Call check_description.
1141 (config_all_variables): Be sure to unref pl.
1142 (load_im_info): Call check_description.
1144 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
1146 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
1147 and bind_textdomain_codeset.
1149 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
1151 2006-09-15 Kenichi Handa <handa@m17n.org>
1153 * input.c (reload_im_info): Update custom and global info.
1154 (init_ic_info): Fix previous change.
1156 2006-09-14 Kenichi Handa <handa@m17n.org>
1158 * database.c: Include <libgen.h>.
1159 (mdatabase__lock): Make a directory if necessary.
1161 * input.c (resolve_command): Adjusted for the format change of
1162 configured_cmds member.
1163 (load_commands, load_variables): Fix for errornous data handling.
1164 (config_command, config_variable): New function.
1165 (config_all_commands, config_all_variables): Renamed from
1166 config_commands and config_variables. Utilize the above function.
1167 (check_variable_value): Argument changed. Callers changed.
1168 (load_im_info): Call config_all_commands and config_all_variables.
1169 (init_ic_info): Adjusted for the format change of configured_vars
1171 (minput__init): Initialize Mcustomized, Mconfigured, and
1173 (Mcustomized, Mconfigured, Minherited): New variables.
1174 (minput_get_command): Be sure to return NULL if an input method
1175 use no local command.
1176 (minput_get_variable): Be sure to return NULL if an input method
1177 use no local variable.
1178 (minput_config_command, minput_config_variable)
1179 (minput_save_config): Adjusted for the format change of
1180 configured_cmds and configured_vars members.
1182 * plist.c (write_element): Delete superfluous ':'.
1184 2006-09-13 Kenichi Handa <handa@m17n.org>
1186 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
1187 (minput_config_file): Extern it.
1189 * draw.c (Minherited): Declaration moved to input.c.
1190 (mdraw__init): Don't initialize Minherited here.
1192 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
1194 2006-09-07 Kenichi Handa <handa@m17n.org>
1196 * textprop.c (mtext_serialize): Call mplist__serialize with the
1199 * plist.h (mplist__serialize): Prototype adjusted.
1200 (mplist__assq): Extern it.
1202 * plist.c: Include <ctype.h>
1203 (PUTC, PUTS): New macros.
1204 (write_symbol): New function.
1205 (write_element): New arg indent.
1206 (dump_string, dump_plist_element): Delete them.
1207 (mplist__from_string): New arg pretty.
1208 (mplist__assq): New function.
1209 (mdebug_dump_plist): Use write_element.
1211 * mtext.c (mtext_cat_char): Allocate more memory.
1212 (mdebug_dump_mtext): Don't escal a newline character.
1214 * m17n.h (minput_get_command, minput_get_variable)
1215 (minput_config_command, minput_config_variable)
1216 (minput_save_config): Extern them.
1218 * m17n-core.c: Include <string.h>.
1219 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
1220 use the stream stdout instead of a file of that name.
1222 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
1225 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
1226 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1227 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
1228 (MDEBUG_DUMP): Flush the stream.
1230 * input.h (struct _MInputMethodInfo): Delete member im. New
1231 members mdb, language, name, extra, cmds, configured_cmds,
1232 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
1233 (MInputContextInfo): New member tick.
1235 * input.c: Big change to improve user-side input method
1236 customization. Here, list just public API changes.
1237 (minput_get_commands, minput_get_variables)
1238 (minput_assign_command_keys, minput_set_variable): Label them
1240 (minput_get_command, minput_get_variable)
1241 (minput_config_command, minput_config_variable)
1242 (minput_save_config): New functions.
1244 * database.h (PATH_MAX): Define it if not yet defined.
1245 (PATH_SEPARATOR): Likewise.
1246 (enum MDatabaseStatus): New enum.
1247 (struct MDatabaseInfo): Moved from database.c. New members status,
1248 time, lock_file, and uniq_file.
1249 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
1250 (mdatabase__unlock): Extern them.
1252 * database.c: Include <time.h>.
1253 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
1254 (GEN_PATH): Args changed. Callers changed.
1255 (struct MDatabaseInfo): Moved to database.h.
1256 (struct MDatabase, mdb_list): Deleted.
1257 (mdatabase__list): New var.
1258 (get_database_filename): Deleted. Callers changed to use
1260 (find_file, get_database_file): New files.
1261 (get_dir_info): Initialize new members of MDatabaseInfo.
1262 (find_database): Arg chagnded. Callers changed.
1263 (free_db_info, register_database, register_databases_in_files):
1265 (update_database_list): Deleted.
1266 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
1267 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
1268 (mdatabase__update): New function.
1269 (mdatabase__check): Return value changed.
1270 (mdatabase__file, mdatabase__lock, mdatabase__save)
1271 (mdatabase__unlock): New functions.
1273 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
1275 * input.c (get_surrounding_text): Return -2 when surrounding text
1277 (get_following_char): Likewise.
1278 (get_preceding_char): Likewise.
1279 (minput__callback): Return 0 if there is a callback function,
1282 2006-08-17 Kenichi Handa <handa@m17n.org>
1284 * input.c (reset_ic): Use shift_state to setup the current state.
1286 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
1288 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
1289 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
1290 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
1292 2006-08-02 Kenichi Handa <handa@m17n.org>
1294 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
1296 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
1298 * font-ft.c (ft_encapsulate): Add code for debugging.
1299 (mfont__ft_drive_otf): Be sure to encode character before getting
1302 2006-07-21 Kenichi Handa <handa@m17n.org>
1304 * draw.c (mdraw_text_extents): Fix previous typo.
1306 2006-07-19 Kenichi Handa <handa@m17n.org>
1308 * draw.c (gstring_width): New arg lbearing.
1309 (render_glyph_string): Adjusted for the change of gstring_width.
1310 (mdraw_text_extents): Fix lbearing of ink and line metrics.
1312 * m17n-core.h (Mlanguage): Extern it.
1314 * m17n.h (Mlanguage): Extern deleted.
1316 * mtext.c (mtext__init): Initialize Mlanguage.
1317 (Mlanguage): Declaration moved from locale.c
1319 * locale.c (mlocale__init): Don't initialize Mlanguage here.
1320 (Mlanguage): Declaration moved to mtext.c.
1322 * language.c (mlang__init): Don't initialize Mlanguage here.
1324 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
1326 2006-07-14 Kenichi Handa <handa@m17n.org>
1328 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
1329 (MRealizedFontFT): New member face_encapsulated.
1330 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
1331 (ft_gen_font): New function.
1332 (ft_add_font): Use ft_gen_font.
1333 (ft_list_script): Store lists in ft_script_list.
1334 (ft_check_otf): New arg ft_face. Caller changed.
1335 (ft_check_language): Likewise.
1336 (ft_check_script): Likewise.
1337 (ft_encapsulate, ft_close): New functions.
1338 (mfont__ft_driver): Initialize members encapsulate and close.
1339 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
1341 * font.h (struct MRealizedFont): New member encapsulating.
1342 (struct MFontDriver): New members encapsulate and close.
1344 * font.c (mfont__match_p): If FONT is realized, check capability
1345 by font drivers's check_capability method.
1346 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
1349 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
1350 declarations of foundry and fam local vars.
1351 (xft_driver): Make it static.
1353 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
1354 (mfont_close): Extern them.
1356 * m17n-gd.c (device_open): Don't specify foundry and family of the
1359 2006-07-11 Kenichi Handa <handa@m17n.org>
1361 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
1363 2006-07-13 Kenichi Handa <handa@m17n.org>
1365 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
1367 (ft_check_script): Delete unused var.
1368 (ft_list_capability): Likewise.
1370 * font.c (mfont__get_capability): Setup cap->otf.
1371 (Motf): Make it global.
1372 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
1374 * font.h (MFontCapability): New member otf.
1376 * language.c (mlang__fini): Delete unused vars.
1378 * m17n-gui.h (Motf): Extern it.
1380 * database.c (update_database_list): Delete unused vars.
1382 2006-07-07 Kenichi Handa <handa@m17n.org>
1384 * font-ft.c (DEVICE_DELTA): Fix typo.
1386 2006-07-06 Kenichi Handa <handa@m17n.org>
1388 * fontset.c (mfont__lookup_fontset): Don't ignore family and
1391 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1393 * database.c: Update comments.
1395 2006-07-05 Kenichi Handa <handa@m17n.org>
1397 * database.c (PATH_MAX): Define it if not yet defined.
1398 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
1400 (get_database_filename): Use GEN_PATH.
1401 (get_dir_info): Don't include the last '/' in directory name.
1402 (register_database): New function.
1403 (update_database_list): Use register_database. Search all
1404 directories in mdatabase__dir_list for wildcard databases.
1405 (mdatabase__init): Check "~/.m17n.d".
1407 2006-07-03 Kenichi Handa <handa@m17n.org>
1409 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
1410 push reverse property.
1412 * plist.c (dump_plist_element): Fix previous change.
1414 2006-06-28 Kenichi Handa <handa@m17n.org>
1416 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
1419 * draw.c (MbidiNSM): New variable.
1420 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
1421 attention to bidi type NSM.
1422 (mdraw__init): Initialize MbibiNSM.
1424 * language.c (mscript__char_list): Fix finding a char-list element.
1426 * plist.c (dump_string): Return number of printed characters.
1427 (dump_plist_element): Print elements more compactly.
1429 2006-06-23 Kenichi Handa <handa@m17n.org>
1431 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
1432 (include_HEADERS): Likewise.
1434 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
1436 * language.c: Update documentation.
1438 2006-06-23 Kenichi Handa <handa@m17n.org>
1440 * font-ft.c (struct MFontFT): Delete member lang.
1441 (free_ft_info): Don't unref member lang. Destroy members langset
1443 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
1444 changed. Set members langset and charset.
1445 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
1447 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
1449 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
1450 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
1451 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
1452 characters at first. If it fails, try listing by language names.
1453 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
1454 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
1455 change of MFontCapability.
1456 (ft_list_capability): Likewise. Try listing by languages, then by
1457 scripts. Check OTF at last.
1458 (ft_check_script): New function.
1459 (ft_select): Adjusted for the check of MFontCapability.
1460 (ft_list_family_names): New function.
1461 (ft_check_capability): If cap->script is not Mnil, call
1463 (mfont__ft_driver): Initialize with ft_list_family_names.
1465 * font.h (struct MFontDriver): New member list_fmaily_names.
1466 (struct): Change member "MSymbol *lang" to "MSymbol language".
1468 * font.c: Include "language.h".
1469 (Motf): New variable.
1470 (otf_script_list, load_otf_script_list): Delete it.
1471 (find_script_from_otf_tag): Delete it.
1472 (merge_capability): New function.
1473 (mfont__init): Init Motf.
1474 (mfont__fini): Don't unref otf_script_list.
1475 (free_font_capability): Check cap->script_tag to determine if
1476 OTF-related capability is set.
1477 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
1478 the change of type MFontCapability.
1479 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
1480 and Motf properties.
1481 (mfont_list): Call merge_capability for LANGUAGE arg.
1482 (mfont_list_family_names): New function.
1484 * input-gui.c: Typo in comments fixed.
1486 * input.c: Typo in comments fixed.
1488 * language.h (mlanguage__list): Delete it.
1489 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
1492 * language.c: Include "mtext.h".
1493 (M_script_lang_list): Delete it.
1494 (language_list, script_list): New variables.
1495 (load_lang_script_list, init_language_list, init_script_list): New
1497 (mlang__init): Don't load language database here.
1498 (mlang__fini): Unref language_list and script_list if not NULL.
1499 (mlanguage__list): Delete it.
1500 (mlanguage__info, mscript__info, mscript__char_list)
1501 (mscript__otf_tag, mscript__from_otf_tag): New functions.
1502 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
1503 (mscript_list, mscript_language_list): New functions.
1505 * m17n-gui.h (mfont_list_family_names): Extern it.
1507 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
1508 (mlanguage_text, mscript_list, mscript_language_list): Extern
1511 2006-06-21 Kenichi Handa <handa@m17n.org>
1513 * m17n-X.c (xfont_driver): Initialize with
1514 xfont_list_family_names.
1515 (xfont_list_family_names): New function.
1516 (xft_driver): Initialize with NULL for list_family_names member.
1517 (device_init): Set list_family_names member of xft_driver to that
1518 of mfont__ft_driver.
1520 2006-06-06 Kenichi Handa <handa@m17n.org>
1522 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
1524 2006-03-24 Kenichi Handa <handa@m17n.org>
1526 * font-ft.c (ft_open): Improve debug message.
1528 * fontset.c (mfontset__get_font): Fix for the case that no font in
1529 per_script list is available.
1531 2006-02-06 Kenichi Handa <handa@m17n.org>
1533 * Version 1.3.3 released.
1535 2006-02-22 Kenichi Handa <handa@m17n.org>
1537 * textprop.c: Fix some typos in documentation.
1539 * plist.c: Fix some typos in documentation.
1541 * m17n-core.h: Fix some typos in documentation.
1542 (M17NLIB_PATCH_LEVEL): Updated to 3.
1543 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
1545 * symbol.c: Fix some typos in documentation.
1547 * mtext.c: Fix some typos in documentation.
1549 * input.c: Fix several typos in documentation.
1551 2006-02-06 Kenichi Handa <handa@m17n.org>
1553 * Version 1.3.2 released.
1555 2006-02-03 Kenichi Handa <handa@m17n.org>
1557 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
1558 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
1560 * font.c (xlfd_parse_name): Fix handling of the name "nil".
1562 * draw.c (layout_glyphs): Fix handling left_padding of
1565 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
1567 2006-02-02 Kenichi Handa <handa@m17n.org>
1569 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
1570 if WITH_GUI is true.
1572 2006-01-25 Kenichi Handa <handa@m17n.org>
1574 * input.c (resolve_expression): If the value of PLIST is a plist,
1575 but the first element is not symbol, return 0.
1577 2006-01-17 Kenichi Handa <handa@m17n.org>
1579 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
1580 HAVE_GD is 2 or the greater.
1582 2006-01-16 Kenichi Handa <handa@m17n.org>
1584 * Version 1.3.1 released.
1586 2006-01-16 Kenichi Handa <handa@m17n.org>
1588 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
1589 simulating anti-aliasing.
1591 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
1592 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
1594 2006-01-12 Kenichi Handa <handa@m17n.org>
1596 * input.c (get_surrounding_text): Always pop ic->plist.
1597 (reset_ic): Don't reset ic->plist.
1599 2006-01-10 Kenichi Handa <handa@m17n.org>
1601 * input.c (preedit_commit): For debugging, print only commiting
1602 charactes. Don't set ic->candidate_show to 0.
1603 (handle_key): Don't run branch-actions just by shifting to the
1605 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
1606 Reset vars and plist.
1608 2006-01-07 Kenichi Handa <handa@m17n.org>
1610 * input.c (load_branch): Confirm that maps is not NULL.
1612 2006-01-05 Kenichi Handa <handa@m17n.org>
1614 * input-gui.c (win_filter): Try to convert arg to key only when
1617 * plist.c (read_integer_element): If '#' and '-' are followed by
1618 non-integer-constituent, read them as a part of a symbol.
1619 (read_symbol_element): New arg C.
1620 (read_element): Adjust args to read_symbol_element.
1622 * input.c (load_macros): On overwriting a macro, free the old
1624 (minput__init): Store Mmap in load_im_info_keys.
1625 (minput_get_title_icon): If the input method has no title, be sure
1627 (minput_get_description): If the input method has no description,
1628 be sure to return NULL.
1629 (minput_get_variables): Fix documentation.
1630 (handle_key): Pay attention to the case that key is Mnil.
1631 (filter): Likewise. Fix handling of such symbol as S-A.
1633 2005-12-22 Kenichi Handa <handa@m17n.org>
1635 * Version 1.3.0 released.
1637 2005-12-22 Kenichi Handa <handa@m17n.org>
1639 * font-ft.c (ft_list): If the specified font has no property,
1642 2005-12-20 Kenichi Handa <handa@m17n.org>
1644 * character.c (mchar_get_prop): Check char_prop_list.
1645 (mchar_put_prop, mchar_get_prop_table): Likewise.
1647 2005-12-18 Kenichi Handa <handa@m17n.org>
1649 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
1650 file name sans language.
1652 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
1654 * input.c: Fix typo in comments.
1656 2005-12-14 Kenichi Handa <handa@m17n.org>
1658 * input.c (minput_get_title_icon): Check the default icon for the
1661 2005-12-13 Kenichi Handa <handa@m17n.org>
1663 * input.c (Mless_equal, Mgreater_equal): New variables.
1664 (parse_expression, resolve_expression, parse_action_list)
1665 (take_action_list): Handle the aboves.
1666 (filter): Treat key S-X as X.
1667 (minput__init): Initialize Mless_equal and Mgreater_equal.
1668 (minput_get_title_icon): New function.
1670 * m17n.h (minput_get_title_icon): Extern it.
1672 * database.c (get_database_filename): Return a filename instead of
1674 (load_database): Adjusted for the above change.
1675 (mdatabase__load_for_keys): Likewise.
1676 (mdatabase__find_file): New function.
1678 * database.h (mdatabase__find_file): Extern it.
1680 * font.h (mfont__resize): Delete extern.
1682 * font.c (mfont__list): Check resize ratio.
1683 (mfont__resize): Delete it.
1684 (mfont_resize_ratio): Include the code of mfont__resize.
1686 * font-ft.c (ft_open): Check resize ratio.
1688 * m17n-X.c (xfont_open): Check resize ratio.
1689 (xft_open): Likewise.
1691 2005-12-07 Kenichi Handa <handa@m17n.org>
1693 * input.c (take_action_list): If take_action_list return -1,
1695 (handle_key): Likewise.
1697 * face.c (mface__for_chars): When font is specified and layouter
1698 is found for it, if the layouter doesn't support one of a
1699 character, use a face sans layouter for it.
1701 2005-12-06 Kenichi Handa <handa@m17n.org>
1703 * fontset.c (mfont__lookup_fontset): If only a fallback font is
1704 found, don't use it for more than one character.
1706 2005-12-05 Kenichi Handa <handa@m17n.org>
1708 * face.c (mface__realize): Set rfont->layouter to Mnil.
1709 (mface__for_chars): Fix handling of layouter.
1711 * character.h (mchar__define_prop): Extern it.
1713 * database.c (update_database_list): Call mchar__define_prop if
1716 * character.c (mchar__init): Don't call mchar_define_property.
1717 Instead just initialize property keys.
1718 (mchar__fini): Free char_prop_list only if it's not NULL.
1719 (mchar__define_prop): New function.
1720 (mchar_define_property): Call mchar__define_prop.
1722 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
1725 2005-12-02 Kenichi Handa <handa@m17n.org>
1727 * language.c (mlang__init): Handle extra chars.
1729 * m17n-gui.h (mfont_check): Adjust prototype.
1731 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
1732 (xfont_check_capability): New function.
1733 (xft_driver): Specify xft_check_capability.
1734 (xft_check_capability): New function.
1736 * font-ft.c (M0_3): Delete it.
1738 (ft_get_charmaps): Refer to M0.
1739 (fc_parse_pattern): Fix previous change.
1740 (ft_list_language): Check also extra chars.
1741 (ft_check_otf): Define it even if HAVE_OTF is undef.
1742 (ft_check_lang): Check the result of FcLangSetHasLang against
1743 FcLangDifferentLang. Check also extra chars.
1744 (ft_list_capability): Delete ifdef HAVE_OTF.
1745 (ft_select): Likewise.
1746 (ft_open): Improve debug information.
1747 (ft_check_capability): New function.
1748 (mfont__ft_driver): Specify ft_check_capability.
1749 (mfont__ft_init): Initialize M0.
1751 * fontset.c (get_font_from_group): New function.
1752 (mfontset__get_font): New function.
1754 * fontset.h (mfontset__get_font): Extern it.
1756 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
1757 (mfont__fini): Delete ifdef HAVE_OTF.
1758 (free_font_capability): Likewise.
1759 (mfont__get_capability): Likewise.
1760 (mfont__check_capability): New function.
1761 (mfont_check): Change the order of arguments. Use
1764 * font.h (struct MFontDriver): New member check_capability.
1765 (MFontCapability): Delete ifdef HAVE_OTF.
1766 (mfont__check_capability): Extern it.
1768 * face.c (mface__realize): Fix handling of FONT arg.
1769 (mface__for_chars): Fix handling of explicitly specified font.
1771 2005-11-25 Kenichi Handa <handa@m17n.org>
1773 * font-flt.c (run_command): Print debug info for
1776 * draw.c (layout_glyphs): Fix handling of left/right_padding.
1778 * face.c (mface__for_chars): Check rfont before accessing the
1781 2005-11-21 Kenichi Handa <handa@m17n.org>
1783 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
1786 * fontset.c (fontset_table): New variable.
1787 (free_fontset): Call M17N_OBJECT_UNREGISTER.
1788 (mfont__fontset_init): Add fontset_table as an object array.
1789 (mfont__realize_fontset): Ref FONTSET.
1790 (mfont__free_realized_fontset): Unref REALIZED->fontset.
1791 (mfontset): Call M17N_OBJECT_REGISTER.
1792 (mfontset_copy): Likewise.
1794 * input.c (handle_key): For debugging, print information about
1796 (filter): Add an alias for Meta and Alt modifiers.
1797 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
1799 (minput__init): Initialize them.
1800 (parse_expression): New function.
1801 (resolve_expression): New function.
1802 (parse_action_list): Handle expressions by parse_expression.
1803 (take_action_list): Handle expressions by resolve_expression.
1804 (parse_nested_list_value): Fix previous change.
1805 (resolve_command): Fix handling of the return value of
1808 2005-11-18 Kenichi Handa <handa@m17n.org>
1810 * font-ft.c (ft_check_otf, otf_script_list): Define only when
1811 HAVE_OTF is defined.
1812 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
1814 (ft_select): Likewise.
1816 * font.c (mfont_list): Fix for the case that FONT is NULL.
1817 (OTF_tag): Delete it.
1818 (load_otf_script_list): Define only when HAVE_OTF is defined.
1819 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
1822 * draw.c (truncate_gstring): Be sure to truncate at
1823 glapheme-cluster boundary.
1825 2005-11-11 Kenichi Handa <handa@m17n.org>
1827 * input.c (delete_surrounding_text): Clear cache if necessary.
1829 2005-11-09 Kenichi Handa <handa@m17n.org>
1831 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
1832 glyph prev is also supported by the current flt.
1834 2005-11-08 Kenichi Handa <handa@m17n.org>
1836 * m17n-X.c (xft_render): Cancel previous change.
1838 2005-11-07 Kenichi Handa <handa@m17n.org>
1840 * input.c: Include <stdlib.h>.
1841 (get_surrounding_text, delete_surrounding_text)
1842 (get_preceding_char, get_following_char): New functions.
1843 (integer_value): New arg surrounding. If it is nonzero, try to
1844 get a surrounding character. Callers changed.
1845 (take_action_list): Check `value' before setting an element.
1846 (destroy_ic): Unref ic_info->preceding_text and
1847 ic_info->following_text.
1848 (minput__init): Initialize Minput_get_surrounding_text and
1849 Minput_delete_surrounding_text.
1850 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
1852 (filter): Unref ic_info->preceding_text and
1853 ic_info->following_text.
1855 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
1858 * input.h (MInputContextInfo): New members preceding_text and
1861 2005-11-04 Kenichi Handa <handa@m17n.org>
1863 * input.c (parse_nested_list_value): Fix handling of the global
1865 (get_nested_list): Get global definitions by load_partial_im_info.
1866 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
1867 MInputCandidatesChanged.
1868 (take_action_list): Likewise.
1869 (reset_ic): Likewise.
1870 (create_ic): Don't pay special attention to
1871 Mcandidates_group_size.
1872 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
1873 (minput_set_variable): Get a definition of varible by
1874 mplist_find_by_value, not mplist_get.
1876 * m17n.h (enum MInputCandidatesChanged): New enum.
1878 2005-11-01 Kenichi Handa <handa@m17n.org>
1880 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
1882 (mwin__destroy_window): If xft_draw's drawable is win, change it
1883 to device->drawable before destroying win.
1885 2005-10-31 Kenichi Handa <handa@m17n.org>
1887 * input.c (load_im_info): Fix adding of state.
1889 * m17n-core.c (m17n_fini_core): Fix reporting of module
1892 * m17n.c (m17n_fini): Fix reporting of module finalization.
1894 * m17n-gui.c (m17n_init_win): Fix reporting of module
1897 2005-10-29 Kenichi Handa <handa@m17n.org>
1899 * input.c (get_candidate_list): Fix the timing of referring plist.
1901 2005-10-28 Kenichi Handa <handa@m17n.org>
1903 * input.c (load_branch): Ignore an undefined map name.
1904 (load_im_info): Set im_info->title from `name' only if it's not
1906 (shift_state): Always update ic->status.
1907 (adjust_candidates): Renamed from adjust_candidate_command.
1908 Argument changed. Caller changed.
1909 (get_candidate_list, regularize_action): New functions.
1910 (take_action_list): Use them. On handling Munhandle, don't set
1912 (handle_key): If KEY is not handled by MAP, and MAP has
1913 branch_actions, perform them.
1915 * database.c (mdatabase__fini): Free dir_info->filename;
1917 2005-10-20 Kenichi Handa <handa@m17n.org>
1919 * input.c (marker_code): Accept '@@'.
1920 (integer_value): Handle '@@'.
1921 (parse_action_list): Accept a symbol argument.
1922 (take_action_list): Resolve the symbol argument. Handle the
1925 2005-10-18 Kenichi Handa <handa@m17n.org>
1927 * input.c: Include "charset.h".
1928 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
1930 (MIMState): New member (M17NObject control).
1931 (lookup_nested_list, set_nested_list, parse_nested_list_value)
1932 (get_nested_list, resolve_variable): New functions.
1933 (integer_value): New arg (MPlist **value). Set it to the plist
1934 element containing the value.
1935 (resolve_command): New function.
1936 (load_translation): New arg (MPlist *map_actions).
1937 (load_branch): New args language and name. If `keylist' is a
1938 symbol, resolved that as a command name.
1939 (free_map): New arg top. Free map->map_actions only if top is
1941 (free_state): New function.
1942 (load_state): New arg name.
1943 (im_info_list): New variable.
1944 (free_im_info, get_im_info_by_tags): New functions.
1945 (load_im_info): Arg key changed to plist. Handle `include'.
1946 Return (MInputMethodInfo *).
1947 (preedit_commit): Ref ic->candidate_list.
1948 (get_select_charset, adjust_candidate_command): New functions.
1949 (take_action_list): Handle `include'. Adjust candidate action
1950 properly. Handle control variables `candidates-charset' and
1951 `candidates-group-size'.
1952 (open_im): Use get_im_info.
1953 (create_ic): Get global variables.
1954 (load_partial_im_info): New function.
1955 (get_im_info): New function.
1956 (check_command_keyseq, check_command_list, check_variable_list):
1958 (minput__init): Don't handle M_database_hook and Mdetail_text.
1959 Initialize M_candidates, Mcandidates_group_size,
1960 Mcandidates_charset.
1961 (parse_variable_list, get_variable_list, parse_command_list)
1962 (get_command_list): Delete them.
1963 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
1964 (minput__fini): Simply unref command_list and variable_list.
1965 (minput_get_description): Adjusted for the new form of description.
1966 (minput_get_commands): Use get_nested_list.
1967 (minput_assign_command_keys): Likewise.
1968 (minput_get_variables, minput_set_variable): Likewise.
1970 * input.h (MInputMethodInfo): New members im and maps.
1972 * database.h (M_database_hook): Delete extern.
1973 (MDatabaseHookFunc): Delete extern.
1974 (mdatabase__check): Extern it.
1976 * database.c: Include <glob.h>.
1977 (MAX_TIME): New macro.
1978 (Masterisk): New variable.
1979 (get_database_stream): Argument changed to (MDatabaseInfo *).
1981 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
1982 (find_database): New function.
1983 (update_database_list): New function.
1984 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
1985 calling update_database_list.
1986 (mdatabase__check): New function.
1987 (mdatabase_find): Use update_database and find_database. Don't
1988 handle MDatabaseHookFunc.
1989 (mdatabase_list): Call update_database at first.
1990 (mdatabase_define): Adjusted for the change of mdb->extra_info.
1991 (MDatabaseList): New type.
1993 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
1995 * m17n.h (Mdetail_text): Delete extern.
1997 * m17n-core.h (mplist_conc): Delete extern.
1999 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
2001 (mplist_conc): Renamed to mplist__conc.
2002 (mplist__pop_unref): New function.
2004 2005-10-14 Kenichi Handa <handa@m17n.org>
2006 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
2008 (read_element): If keys is an empty plist, return any element
2010 (dump_plist_element): Check if plist is nested.
2011 (mplist_conc): Always ref tail.
2012 (mplist_set): If key is a managing key, ref val in advance.
2014 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
2015 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
2016 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
2019 * fontset.c (free_fontset): Unref fontset_list if necessary.
2020 (mfont__fontset_fini): Don't free fontset_list. Unref
2022 (mfont__realize_fontset): Initialize request.
2023 (mfontset): Ref default_fontset or fontset only if necessary.
2024 (mfontset_copy): Don't ref copy.
2026 * draw.c (render_glyphs): Check gend->type before checking
2029 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
2030 unrefed plists to NULL.
2032 2005-10-04 Kenichi Handa <handa@m17n.org>
2034 * textprop.c (mtext_serialize): Be sure to make mt
2035 MTEXT_FORMAT_UTF_8 and NULL terminated.
2037 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
2039 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
2041 2005-10-03 Kenichi Handa <handa@m17n.org>
2043 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
2044 is not at the beginning of line.
2046 2005-09-22 Kenichi Handa <handa@m17n.org>
2048 * input.c: Include <sys/stat.h> and <unistd.h>.
2049 (Minclude, Mcommit, Munhandle): New variables.
2050 (minput__init): Initialize them. Push only Mstate to
2051 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
2052 (parse_action_list): Allow integer arg for undo. Handle Mcommit
2054 (load_input_method): Handle "include" directive. If no states are
2056 (shift_state): If state_name is Mt, shift back to the previous
2057 state. Call preedit_commit to commit preedit text.
2058 (preedit_commit): New function.
2059 (take_action_list): Improve debug printing. Handle commit and
2061 (handle_key): Check the return value of take_action_list. Don't
2062 take branch_actions just after changing to the root map.
2063 (reset_ic): Reset all ic_info members.
2064 (filter): When a key is not handled, just move ic_info->keys
2065 instead fo calling reset_ic.
2066 (load_im_info): If key is not Mstate, push Mmap to
2068 (MDatabaseStatList): New type.
2069 (imdir_stat_list): New variable.
2070 (input_method_hook): Don't cancel the hook. Check the
2071 modification time of directories.
2072 (minput__fini): Free imdir_stat_list;
2074 * input.h (MInputContextInfo): New member prev_state.
2076 * m17n-core.h (mplist_conc): Extern it.
2078 * plist.c (mplist_conc): New function.
2080 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
2082 * font.h (MRealizedFont): New member average_width.
2084 * font-ft.c (ft_open): Set rface->average_width.
2086 * font.c (xlfd_unparse_name): Print '*' before registry name.
2088 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
2089 (xfont_open): Set rfont->average_width.
2090 (xft_open): Likewise.
2091 (device_open): Initialize disp_info->AVERAGE_WIDTH.
2093 * internal-gui.h (struct MFrame): New member average_width.
2095 * m17n-gui.c (mframe): Fix setting of frame->rfont.
2096 (mframe_get_prop): Return the average_width of a font.
2098 * face.c (mface__realize): Set rface->average_width.
2099 (mface__update_frame_face): Set frame->average_width.
2101 * face.h (MRealizedFace): New member average_width.
2103 2005-09-19 Kenichi Handa <handa@m17n.org>
2105 * font.c (xlfd_unparse_name): New arg full_xlfd.
2106 (mfont__encode_char): Use shortcut only for X core fonts.
2107 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
2108 (mfont_put_prop): Handle `language' property.
2109 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
2110 Print file can capability info too.
2112 * m17n-core.c (mdebug__output): New variable.
2113 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
2114 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
2115 (m17n_fini_core): Close mdebug__output if it's not stderr.
2117 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
2118 (xfont_open): Handle baseline_offset.
2119 (xfont_find_metric): Likewise.
2120 (xfont_render): Likewise.
2121 (xft_open): Likewise.
2122 (xft_render): Likewise.
2124 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
2125 (mdebug__output): Extern it.
2126 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
2127 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
2128 (MDEBUG_DUMP): New macro.
2129 (MDEBUG_PRINT_TIME): Print to medebug__output.
2131 * font.h (MRealizedFont): New member baseline_offset.
2133 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
2135 (fc_weight_table): Add FC_WEIGHT_REGULAR.
2136 (ft_list_family): Check alias.
2137 (ft_list_language): If language is "en", don't try to the second
2139 (ft_default_list): New variable.
2140 (ft_list_default): New function.
2141 (ft_select): If family is not specified, try only the default
2142 fonts. Treat the weights normal and medium same.
2143 (ft_open): Fix debug message. If registry is not specified, try
2144 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
2145 (ft_find_metric): Likewise.
2146 (ft_render): Likewise.
2147 (ft_list): Fix debug message. Accept the registring iso8859-1.
2148 If family is not specified, try only the default fonts.
2150 * face.c (mface__realize): Fix logic of opening a font.
2152 2005-09-16 Kenichi Handa <handa@m17n.org>
2154 * face.c (mface__realize):
2156 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
2159 * input.c (shift_state): Fix the condition of taking init actions.
2160 (take_action_list): Fix handling of pushback action.
2161 (handle_key): Don't change key while checking its alias.
2162 (minput__init): Initialize new variables.
2163 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
2166 2005-09-12 Kenichi Handa <handa@m17n.org>
2168 * mtext.c (mtext__uppercase): Add proper open/close parens.
2169 (mtext_titlecase): Add proper casting.
2171 * input.c (parse_action_list): Handle the case that the arg is a
2172 key sequence (MText or MPlist).
2173 (take_action_list): Likewise.
2174 (shift_state): Shorter debug message.
2175 (handle_key): Terminate a debug message by "\n".
2176 (reset_ic): Don't take initial actions here.
2177 (minput_open_im): Print a debug message.
2178 (minput_close_im): Likewise.
2179 (minput_create_ic): Likewise.
2180 (minput_destroy_ic): Likewise.
2182 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
2184 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
2187 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
2188 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
2191 * character.c: Add Japanese documentation for
2192 mchar_get_prop_table ().
2194 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
2196 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
2197 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
2198 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
2200 (init_case_conversion): New function.
2201 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
2202 (uppercase_precheck, lowercase_precheck, final_sigma)
2203 (after_soft_dotted, more_above, before_dot, after_i)
2204 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
2206 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
2208 * plist.c (read_mtext_element): Fix previous change.
2210 2005-09-05 Kenichi Handa <handa@m17n.org>
2212 * plist.c (read_mtext_element): Handle \uXXXX notation.
2214 * internal.h (MTABLE_MALLOC): Don't use a local variable.
2215 (MTABLE_ALLOCA): Change the name of local variable.
2217 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
2218 HAVE_FREETYPE are defined.
2220 * m17n-X.c: Check HAVE_X11.
2222 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
2223 directory listing libraries.
2224 (noinst_PROGRAMS): Define it only in maintainer mode.
2226 2005-09-02 Kenichi Handa <handa@m17n.org>
2228 * m17n-gui.h (mdraw_line_break_option): Extern it.
2230 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
2231 end of the first glyph.
2232 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
2234 (mdraw_line_break_option): New variable.
2235 (mdraw_default_line_break): Use mtext_line_break.
2237 * mtext.h (wordseg_func_table): Don't extern it.
2238 (mtext__wseg_fini): Extern it.
2240 * mtext.c: Don't include word-thai.h.
2241 (wordseg_func_table): Delete this variable.
2242 (mtext__init): Don't initialize above. Don't call
2243 mtext__word_thai_init.
2244 (mtext__fini): Don't free wordseg_func_table. Call
2245 mtext__wseg_fini instead fo mtext__word_thai_fini.
2246 (MTextWordsegFunc): Don't typedef it.
2247 (mtext__word_segment): Moved to mtext-wseg.c.
2249 * m17n-core.h (enum MTextLineBreakOption): New enum.
2250 (mtext_line_break): Extern it.
2252 * mtext-wseg.c: New file.
2254 * mtext-lbrk.c: New file.
2256 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
2257 add mtext-lbrk.c and mtext-wseg.c.
2259 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
2260 the case that head is NULL.
2262 2005-09-01 Kenichi Handa <handa@m17n.org>
2264 * word-thai.c (wordseg_propertize): If the property value is nil,
2265 don't make the property no-merge.
2266 (thai_wordseg): Don't require *from and *to are set a priori. Pay
2267 attention to the case that they are NULL.
2268 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
2271 * character.c (mchar_get_prop_table): New function.
2273 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
2275 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
2276 (mchar_get_prop_table): Extern it.
2278 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
2279 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
2281 * internal.h (enum MTextCoverage): New enum.
2282 (MText): New member coverage.
2284 * mtext.c (FORMAT_COVERAGE): New macro.
2285 (insert): Copy mt2->coverage.
2286 (mtext__from_data): Initialize mt->coverage.
2287 (mtext__adjust_format): Update mt->coverage.
2288 (mtext): Initialize mt->coverage.
2289 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
2290 Update mt->coverage if necessary.
2291 (mtext_duplicate): Copy mt->coverage.
2292 (mtext_insert, mtext_replace): New functions.
2293 (mtext_dup): Use mtext_duplicate.
2294 (mtext__word_segment): Don't set *from and *to if a word
2295 segmentation funcion is not found.
2296 (mtext_ins_char): Fix typo.
2298 2005-08-25 Kenichi Handa <handa@m17n.org>
2300 * font.h (MFont): New member for_full_width.
2302 * font.c (compare_font_score): Prefer a font of not
2305 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
2306 registry charset of a font is one of CJK charsets.
2308 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
2309 supports some of CJK.
2311 2005-08-24 Kenichi Handa <handa@m17n.org>
2313 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
2315 * m17n-gui.c (null_device_open): Check Mresolution param and set
2318 * m17n-gd.c (device_open): Check Mresolution param and set
2321 * m17n-X.c (MWDevice): New member resy.
2322 (xfont_open): Set ascent, descent, and max_advance members of
2324 (xft_open): Likewise.
2325 (device_open): Compare also screen_num to find a device. Set
2326 device->resy and frame->dpi.
2328 * internal-gui.h (MFrame): New member dpi.
2330 * font.h (MRealizedFont): New member max_advance.
2332 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
2333 (mfont__init): Don't initialize Mascent, Mdescent.
2334 (Mascent, Mdescent): Delete these variables.
2335 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
2336 Mfont_descent instead of Mascent and Mdescent.
2337 (mfont_put_prop): Allow negative size.
2338 (mfont_find): Handle the case of spec->size < 0. Fix previous
2340 (mfont_list): Handle the case of spec->size < 0.
2341 (mfont_check): Likewise.
2343 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
2344 (fc_get_pattern): Handle the case of font->size < 0.
2345 (ft_open): Set ascent, descent, and max_advance members of rfont.
2346 (ft_find_metric): Improve rounding.
2347 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
2350 * face.c (mface__realize): Handle the case of font->size < 0.
2352 2005-08-22 Kenichi Handa <handa@m17n.org>
2354 * coding.c (MConverterStatus): Change the member buf to union.
2355 (mconv_buffer_converter): Add const to the arg buf.
2356 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2357 (mconv_decode): Adjusted for the change of MConverterStatus.
2358 (mconv_encode_range): Likewise.
2360 * m17n.h (mconv_buffer_converter): Prototype adjusted.
2361 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2363 2005-08-20 Kenichi Handa <handa@m17n.org>
2365 * m17n-gui.h (mfont_from_name): Prototype adjusted.
2366 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
2368 * m17n-X.c (xfont_open): Set members ascent, descent, and
2369 max_advance of rfont.
2370 (xft_open): Likewise.
2372 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
2374 (mfont__ft_parse_name): Add const to the arg name.
2376 * font.c (xlfd_parse_name): Add const to the arg name. Call
2377 mfont__set_property instead of mfont_set_spec. Set font->spacing.
2378 (xlfd_unparse_name): Handle spacing.
2379 (mfont__init): Initialize new variables.
2380 (mfont__id): Handle spacing.
2381 (mfont__merge): Likewise.
2382 (mfont__set_spec): This function deleted.
2383 (mfont__parse_name_into_font): Add const to the arg name. Fix the
2384 condition of calling mfont__ft_parse_name.
2385 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
2386 (mfont_get_prop): Handle properties spacing, ascent, descent,
2388 (mfont_find): Return a realized font.
2389 (mfont_from_name): Add const to the arg name.
2391 * font.h (enum MFontProperty): New member MFONT_SPACING.
2392 (enum MFontSpacing): New enum.
2393 (MFont): New members spacing and max_advance.
2394 (mfont__ft_parse_name): Prototype adjusted.
2395 (mfont__set_spec): Extern deleted.
2396 (mfont__parse_name_into_font): Prototype adjusted.
2398 2005-08-19 Kenichi Handa <handa@m17n.org>
2400 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
2402 * font.c (mfont_list): If FONT is null, use a temporary font.
2403 (mfont_parse_name): Add const to the arg name.
2405 2005-08-18 Kenichi Handa <handa@m17n.org>
2407 * word-thai.c: Surround code by #ifdef and #endif to escape from
2410 * font-ft.c: Mostly re-written.
2412 * font-flt.c (FontLayoutCmdOTF): This type deleted.
2413 (FontLayoutCmd): Type of the member otf changed..
2414 (load_otf_command): Adjusted for the format change of otf command.
2415 (load_command): Likewise.
2416 (free_flt_command): Unref cmd->body.otf.
2417 (run_otf): Ajusted for the type change of otf_cmd.
2418 (run_command): Ajusted for the type change of otf_cmd. On
2419 debugging, print ctx->combining_code.
2420 (mfont__flt_run): Initialize ctx's members code_offset,
2421 combining_code, and left_padding to 0.
2423 * face.h (struct MRealizedFace): New member font.
2424 (mface__realize): Prototype adjusted.
2426 * face.c (find_realized_face): New arg font.
2427 (find_realized_face): Adjusted for the change of MFont.
2428 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
2429 (mface__fini): Don't call mdebug__report_object.
2430 (mface__realize): New arg font.
2431 (mface__for_chars): Adjusted for the change of mfont__encode_char.
2432 Optimize the latin case.
2433 (mface__free_realized): Free rface->font.
2434 (mface__update_frame_face): Adjusted for the change of mface__realize.
2435 (mface_equal): New function.
2437 * draw.c (Mcommon): New variable.
2438 (visual_order): Args to mfont__encode_char changed.
2439 (compose_glyph_string): Handle Mfont text property.
2440 (layout_glyphs): Adjusted for the change of MFont.
2441 (mdraw__init): Initialize Mcommon.
2442 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
2444 * font.h (enum MFontType): Members completely changed.
2445 (enum MFontProperty): Move MFONT_SIZE to the tail.
2446 (enum MFontSource): New enum.
2447 (struct MFont): New members type, source, sizes, file, capability,
2449 (struct MRealizedFont): Type of member font changed. Members
2450 score, status, and encoding deleted.
2451 (MFontScore): New type.
2452 (MFontList): Member changed.
2453 (struct MFontDriver): New member has_char. Types of members
2455 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2456 (Mapple_roman): Extern them.
2457 (OTF_Tag): Typedefed if not HAVE_OTF.
2458 (enum MFontOpenTypeTable): New enum.
2459 (MFontCapability): New type.
2460 (mfont__ft_drive_otf): Prototype adjusted.
2461 (mfont__score): Extern deleted.
2462 (mfont__merge): Extern it.
2463 (mfont__has_char): Extern it.
2464 (mfont__encode_char): Prototype adjusted.
2465 (mfont__open): Extern it.
2466 (mfont__set_spec): Prototype adjusted.
2467 (mfont__get_capability): Extern it.
2469 * font.c: Include "fontset.h".
2470 (M_font_capability, M_font_list, M_font_list_len): New variables.
2471 (font_score_priority): Change order of initial elements.
2472 (font_score_shift_bits): Fix array size.
2473 (common_weight): Add "thin", "semibold", and "heavy".
2474 (common_stretch): Add "ultracondensed", "extracondensed",
2475 "extraexpanded", and "utltraexpand".
2476 (font_weight_regular, font_weight_normal, font_weight_medium): New
2478 (gen_font_name): This function deleted.
2479 (find_encoding): Set font->encoding.
2480 (OTF_tag): New function.
2481 (otf_script_list): New variable.
2482 (load_otf_script_list): New function.
2483 (find_script_from_otf_tag): New function.
2484 (xlfd_parse_name): Set font->type and font->source.
2485 (mfont__free_realized): Free chains rfonts.
2486 (font_score): Renamed from mfont__score.
2487 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2488 (Mapple_roman): New variables.
2489 (mfont__init): Initilize new variables. Initalize
2490 default_encoding.encoding_name and
2491 default_encoding.encoding_charset to Municode_full and
2492 mcharset__unicode. Use SAFE* macros for allocating filepath
2494 (mfont__fini): Free otf_script_list.
2495 (mfont__id): New function.
2496 (mfont__match_p): Check also capability member of MFont.
2497 (mfont__merge): New funciton.
2498 (mfont__set_spec_from_face): Set type and source members.
2499 (mfont__set_spec_from_plist): Set capability and type members.
2500 (mfont__select): Argument changed.
2501 (mfont__available): New function.
2502 (compare_font_score): New function.
2503 (mfont__list): New function.
2504 (mfont__open): Return a realized font.
2505 (mfont__resize): Adjusted for the change of MFont.
2506 (mfont__has_char): New function.
2507 (mfont__encode_char): Argument changed.
2508 (mfont__set_spec): Argument changed.
2509 (free_font_capability): New function.
2510 (mfont__get_capability): New function.
2511 (MFontfile): New variable.
2512 (mfont_get_prop): Adjusted for the change of MFont.
2513 (mfont_put_prop): Likewise.
2514 (mfont_set_selection_priority): Fix the way of setting
2515 font_score_priority[].
2516 (mfont_find): Use mfont__list instead of mfont__select.
2517 (mfont_resize_ratio): Adjusted for the change of MFont.
2518 (mfont_list): Use mfont__list.
2519 (mfont_check): New function.
2520 (font_score): Make it static.
2522 * fontset.h (mfont__realize_fontset): Prototype adjusted.
2523 (mfont__lookup_fontset): Likewise.
2525 * fontset.c (struct MFontset): Delete member font_spec_list.
2526 (struct MRealizedFontset): Type of member spec changed. New
2528 (load_font_group): Arg spec_list deleted.
2529 (load_fontset_contents): Adjusted for the change of fontset_def.
2530 (free_fontset): Fix the way of freeing fontset elements.
2531 (realize_fontset_elements): Argument changed.
2532 (get_per_script): New function.
2533 (free_realized_fontset_elements): Fix the way of feeing rfontset
2535 (update_fontset_elements): Fix args to realize_fontset_elements.
2536 (mfont__realize_fontset): New arg spec.
2537 (try_font_list): New function.
2538 (try_font_group): New arg request. Use try_font_list.
2539 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
2541 (mfontset): Adjusted for the change of MFontset.
2542 (mfontset_copy): Likewise. Don't share plists.
2543 (mfontset_modify_entry): Adjusted for the change of MFontset.
2544 (mfontset_lookup): Call get_per_script.
2545 (mdebug_dump_fontset): Print also the address of fonts.
2547 * input.c (shift_state): Don't reset ic_info->vars.
2548 (take_action_list): Call MDEBUG_PRINT fore calling
2551 * internal-gui.h (MFontDriver): Don't typedef it here.
2553 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
2554 (MXFont): This type deleted.
2556 (struct _MFontX): New struct.
2557 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
2558 (MDisplayInfo): Member base_font_list deleted.
2559 (DEFAULT_FONT): Definition changed.
2560 (FALLBACK_FONT): This maclr deleted.
2561 (free_display_info): Adjusted for the change of MDisplayInfo.
2562 (free_device): Argument to mfont__free_realized changed.
2563 (xfont_driver): Adjusted for the change of MFontDriver.
2564 (xfont_registry_list): Use MFontX instead of MXFont.
2565 (MRealizedFontX): Renamed from MXFontInfo.
2566 (xfont_select): Return the font found first.
2567 (close_xfont): Change MXFontInfo to MRealizedFontX.
2568 (xfont_open): Return the realized font.
2569 (xfont_find_metric): Get xfont from rfont->fontp.
2570 (xfont_has_char): New function.
2571 (xfont_encode_char): Adjusted for the argument change.
2572 (xfont_render): Get xfont from rfont->fontp.
2573 (xfont_list): Adjusted for the argument change.
2574 (MRealizedFontXft): Renamed from MXftFontInfo.
2575 (xft_driver): Ajusted for the change of MFontDriver.
2576 (close_xft): Change MXtfFontInfo to MRealizedFontXft
2577 (xft_open_font): Argument changed.
2578 (xft_open): Argument changed. Return the realized font.
2579 (xft_find_metric): Get xft_font from rfont->fontp.
2580 (xft_has_char, xft_encode_char): New functions.
2581 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
2582 font if not yet opened.
2583 (device_open): Don't set frame->font.
2585 * m17n-gd.c (gd_font_driver): Adjusted for the change of
2587 (gd_font_open): New function.
2588 (gd_render): Don't use the local variable ft_info.
2589 (device_init): Adjusted for the change of gd_font_driver.
2591 * textprop.c (mtext__prop_init): Initialize text_property_table.
2592 Call M17N_OBJECT_ADD_ARRAY.
2593 (mtext__prop_fini): Don't call mdebug__report_object.
2595 * plist.c (mplist__init): Initialize plist_table.
2596 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
2597 (mplist__fini): Don't call mdebug__report_object.
2599 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
2600 (mtext__fini): Don't call mdebug__report_object.
2601 (MTEXT_FORMAT_UTF_16): Correct type.
2602 (mtext_data): New function.
2603 (mtext_text): Fix calculation of limit and args to
2606 * language.c: Include "plist.h".
2607 (M_script_lang_list): New variable.
2608 (mlang__init): Read languages and their information from m17n
2610 (mlanguage__list): New function.
2611 (Miso639_1, Miso639_2): New variables.
2613 * language.h (mlanguage__list): Extern it.
2615 * database.c (get_database_stream): Use SAFE_* macros for
2616 allocating and freeing path.
2617 (mdatabase__init): Likewise.
2619 * symbol.c (msymbol__fini): Don't free symbols here.
2620 (msymbol__free_table): New function.
2621 (msymbol_is_managing_key): New function.
2623 * symbol.h (msymbol__free_table): Extern it.
2624 (msymbol__list): Extern it.
2626 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
2628 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
2629 (struct _M17NObjectArray): New member name and next.
2630 (mdebug__add_object_array): Extern it.
2631 (M17N_OBJECT_ADD_ARRAY): New macro.
2632 (mdebug__report_object): Don't extern it.
2634 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
2636 * m17n-gui.c (free_frame): Don't free frame->font.
2637 (null_device_fini): Fix code for freeing
2638 null_device.realized_font_list.
2639 (m17n_fini_win): Free interface.
2640 (mframe): Cast the return value of dlsym. Set frame->font here.
2641 (mframe_get_prop): Check frame->rface->rfont before accessing the
2644 * m17n-gui.h (Mfontfile): Extern it.
2645 (mfont_check): Extern it.
2646 (mface_equal): Extern it.
2648 * m17n-core.c: Include "symbol.h".
2649 (report_header_printed): This variable deleted.
2650 (object_array_root): New variable.
2651 (report_object_array): New function.
2652 (mdebug__report_object): This function deleted.
2653 (mdebug__add_object_array): New function.
2654 (m17n_init_core): Call mchartable_init () before mtext_init ().
2655 (m17n_fini_core): Call report_object_array (if necessary) and
2656 msymbol__free_atable at the end.
2658 * m17n-core.h (msymbol_is_managing_key): Extern it.
2659 (mtext_data): Extern it.
2660 (MTEXT_FORMAT_UTF_16): Correct type.
2661 (M17NLIB_MINOR_VERSION): Changed to 3.
2662 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
2664 * chartab.c (mchartable__init): Initalize chartable_table.count.
2665 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
2666 mdebug__report_object.
2668 2005-05-26 Kenichi Handa <handa@m17n.org>
2670 * m17n.h (Miso639_1, Miso639_2): Extern them.
2672 * symbol.h (msymbol__list): Extern it.
2674 * symbol.c (msymbol__list): New function.
2676 2005-05-19 Kenichi Handa <handa@m17n.org>
2678 * input-gui.c (minput__win_init): Don't change the value of
2681 2005-05-16 Kenichi Handa <handa@m17n.org>
2683 * m17n-core.c (m17n_object): Be sure to initialize all members.
2685 * font-ft.c (fc_decode_prop): Fix args to msymbol.
2687 2005-05-09 Kenichi Handa <handa@m17n.org>
2689 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
2691 2005-04-27 Kenichi Handa <handa@m17n.org>
2693 * language.c (mlang__init): Add "an" (Aragonese).
2695 * word-thai.c: Add support for libthai.
2696 (mtext__word_thai_init): Initialize wordseg library conditionaly.
2697 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
2699 * mtext.c: Include "word-thai.h" conditionaly.
2700 (mtext__init): Call mtext__word_thai_init conditionaly.
2701 (mtext__fini): Call mtext__word_thai_fini conditionaly.
2703 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
2704 not WORDCUT_LD_FLAGS.
2706 2005-04-19 Kenichi Handa <handa@m17n.org>
2708 * word-thai.c (wordseg_propertize): Always unref the attached
2710 (thai_wordseg): Don't unref the property.
2712 2005-04-18 Kenichi Handa <handa@m17n.org>
2714 * word-thai.c: Include stdlib.h.
2715 (wordseg_propertize): Add dummy function for the case that wordcut
2716 library doesn't exist.
2717 (wordseg_propertize): Fix for old wordcut library.
2719 2005-04-16 Kenichi Handa <handa@m17n.org>
2721 * word-thai.c: Include <stdio.h>.
2723 2005-04-15 Kenichi Handa <handa@m17n.org>
2725 * draw.c: Include mtext.h.
2726 (linebreak_table, M_break_at_space, M_break_at_word)
2727 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
2728 (compose_glyph_string): Check POS before getting Mface text
2730 (truncate_gstring): Give correct TO arg to line_break function.
2731 (GET_LB_TYPE): New macro.
2732 (find_break_backward, find_break_forward): New functions.
2733 (mdraw__init): Initialize the above new variables.
2734 (mdraw__fini): Free linebreak_table.
2735 (mdraw_default_line_break): Use find_break_backward and
2738 * word-thai.c: New file.
2740 * word-thai.h: New file.
2742 * mtext.c: Include word-thai.h.
2743 (wordseg_func_table): New variable.
2744 (mtext__init): Initialize wordseg_func_table and call
2745 mtext__word_thai_init.
2746 (mtext__fini): Call mtext__word_thai_fini, free
2748 (MTextWordsegFunc): New type.
2749 (mtext__word_segment): New function.
2751 * mtext.h (wordseg_func_table): Extern it.
2752 (mtext__word_segment): Extern it.
2754 * m17n.c (m17n_init): Fix typo (== -> =).
2756 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
2757 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
2759 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
2760 (MTEXTPROP_VAL): New macros.
2762 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
2764 2005-04-07 Kenichi Handa <handa@m17n.org>
2766 * database.c (load_chartable): Fix pursing of symbol name.
2768 2005-03-24 Kenichi Handa <handa@m17n.org>
2770 * m17n.c (m17n_init): Fix typo (== -> =).
2772 2005-03-11 Kenichi Handa <handa@m17n.org>
2774 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
2776 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
2778 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
2781 2005-03-09 handa <handa@m17n.org>
2783 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
2784 calling m17n_init ().
2786 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
2787 calling m17n_init_core ().
2789 2005-02-28 Kenichi Handa <handa@m17n.org>
2791 * font-flt.c (mfont__flt_run): Add resulting code sequence in
2794 2005-02-17 Kenichi Handa <handa@m17n.org>
2796 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
2797 (M_description, M_command, M_variable): New variables.
2798 (load_im_info_keys): New variables.
2799 (load_im_info, check_command_keyseq, get_description_advance)
2800 (parse_command_list, get_command_list, parse_variable_list)
2801 (get_variable_list, input_method_hook): New functions.
2802 (command_list, variable_list): New variables.
2803 (minput__init): Put input_method_hook to Minput_method.
2804 Initialize M_description, M_command, M_variable, Mdetail_text,
2805 load_im_info_keys, command_list, variable_list.
2806 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
2807 (Mdetail_text): New variable.
2808 (minput_get_description, minput_get_commands)
2809 (minput_assign_command_keys, minput_get_variables)
2810 (minput_set_variable): New functions.
2812 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
2813 (minput_assign_command_keys, minput_get_variables)
2814 (minput_set_variable): Extern them.
2816 * plist.c (UNGETC): Just decrement st->p.
2817 (read_mtext_element): New arg skip.
2818 (read_integer_element): Likewise.
2819 (read_symbol_element): Likewise.
2820 (read_element): New arg KEYS.
2821 (mplist__from_plist): Don't increment ref-count of NULL object.
2822 (mplist__from_file): New arg KEYS.
2823 (mplist_put): Don't increment ref-count of NULL object.
2824 (mplist_add): Likewise.
2825 (mplist_push): Likewise.
2826 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
2828 * plist.h (mplist__from_file): Prototype adjusted.
2830 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
2831 (get_database_stream): New function.
2832 (load_database): Use get_database_stream.
2833 (M_database_hook): New variable
2834 (mdatabase__init): Initialize M_database_hook.
2835 (mdatabase__load_for_keys): New function.
2836 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
2838 (mdatabase_define): Free mdb->extra_info if necessary.
2840 * database.h (mdatabase__dir_list, M_database_hook)
2841 (mdatabase__load_for_keys): Extern them.
2842 (MDatabaseHookFunc): New type.
2844 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
2846 2004-12-27 Kenichi Handa <handa@m17n.org>
2848 * Version 1.2.0 released.
2850 2004-12-27 Kenichi Handa <handa@m17n.org>
2852 * input.c (minput_filter): Don't reset ic->xxx_changed.
2854 * mtext.c (mtext_from_data): Fix documentation.
2856 2004-12-25 Kenichi Handa <handa@m17n.org>
2858 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
2859 (M17NLIB_VERSION_NAME): Update to "1.2.".
2861 2004-12-24 Kenichi Handa <handa@m17n.org>
2863 * input.c (reset_ic): Set key_unhandled to 0.
2865 2004-12-21 Kenichi Handa <handa@m17n.org>
2867 * m17n-gui.h (mfont_from_spec): Delete extern.
2869 * input-gui.c (win_callback): Handle Minput_reset.
2870 (minput__win_init): Register reset_ic as a callback for
2873 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
2874 changed. At first, shift to the initial state.
2875 (minput__init): Initialize Minput_reset. Register reset_ic as a
2876 callback for Minput_reset.
2877 (Minput_reset): New variable.
2878 (minput_filter): Always set ic->xxx_changed to 0.
2879 (minput_reset_ic): New function.
2880 (integer_value): Fix typo ('>' -> '<') and calculation of length
2883 * m17n-core.c (merror_code): Change type to `int'.
2885 * m17n-misc.h (merror_code): Adjust type.
2887 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
2889 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
2890 (mtext_change_prop): Delete extern.
2892 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
2893 to `int'. Move the documents to m17n-core.h.
2895 2004-12-13 Kenichi Handa <handa@m17n.org>
2897 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
2898 (MTextProperty): Document it.
2900 2004-12-09 Kenichi Handa <handa@m17n.org>
2902 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
2904 2004-12-03 Kenichi Handa <handa@m17n.org>
2906 * internal.h (m17n__core_initialized, m17n__shell_initialized,
2907 m17n__gui_initialized): New externs.
2909 * m17n-core.h (enum M17NStatus): New enum.
2910 (m17n_status): Extern it.
2912 * m17n-core.c (core_initialized): Delete this variable.
2913 (m17n__core_initialized, m17n__shell_initialized,
2914 m17n__gui_initialized): New variables.
2915 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
2916 instead of core_initialized.
2917 (m17n_status): New function.
2919 * m17n.c (shell_initialized): Delete this variable.
2920 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
2923 * m17n-gui.h (m17n_init_win): Adjust the prototype.
2925 * m17n-gui.c (win_initialized): Delete this variable.
2926 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
2927 instead of gui_initialized.
2929 2004-11-19 Kenichi Handa <handa@m17n.org>
2931 * input.c (reset_ic): Check if ic_info->state is NULL.
2932 (filter): If ic_info->state is NULL, return 0.
2933 (load_input_method): Don't unref `maps' it it's not created.
2935 2004-11-15 Kenichi Handa <handa@m17n.org>
2937 * input.c (find_candidates_group): If INDEX is -1, find the last
2939 (take_action_list): If the previous of the first candidate is
2940 requested, select the last candidate.
2942 2004-11-08 Kenichi Handa <handa@m17n.org>
2944 * m17n-X.c (device_open): Try at most 32 fonts to find a
2945 non-autoscaled font.
2947 * font.c (xlfd_parse_name): Fix previous change.
2949 2004-11-05 Kenichi Handa <handa@m17n.org>
2951 * font.c: (commont_style): Include dummy elements "slanted" and
2952 "rslanted" to prefer "o" to "r" if "i" is requested.
2954 * font-ft.c (ft_to_prop): Fix "oblique" entry.
2956 2004-10-29 Kenichi Handa <handa@m17n.org>
2958 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
2960 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
2961 New members smallest and larger.
2962 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
2963 (xfont_registry_list): Likewise.
2964 (xfont_select): Likewise.
2967 2004-10-28 Kenichi Handa <handa@m17n.org>
2969 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
2970 font name comparison.
2971 (xfont_select): Fix logic for selecting a larger size font.
2973 2004-10-25 Kenichi Handa <handa@m17n.org>
2975 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
2978 2004-10-22 Kenichi Handa <handa@m17n.org>
2980 * input.c (update_candidate): Renamed from udpate_candidate.
2981 (take_action_list): Show more debugging info on arithmetic commands.
2983 * m17n-X.c (device_open): Fix previous change.
2985 * draw.c (compose_glyph_string): Don't get face property at the
2988 2004-10-21 Kenichi Handa <handa@m17n.org>
2990 * draw.c (compose_glyph_string): Fix for the case of category
2993 2004-10-19 Kenichi Handa <handa@m17n.org>
2995 * input.c (mdebug_mask): New variable.
2996 (shift_state): Print debug information.
2997 (take_action_list): Likewise.
2998 (handle_key): Likewise.
3000 2004-10-14 Kenichi Handa <handa@m17n.org>
3002 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
3004 2004-10-13 Kenichi Handa <handa@m17n.org>
3006 * m17n-X.c (device_open): Be sure to register at least one font
3009 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
3010 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
3012 2004-10-12 Kenichi Handa <handa@m17n.org>
3014 * draw.c (alloc_gstring): Fix previous change.
3016 * font-ft.c (ft_list_generic): Fix for the case of not
3019 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
3021 * font.c (mfont_list): If no font is found, return NULL.
3022 (load_font_encoding_table): Put entries of nil registry first.
3023 (find_encoding): Adjust for the above change.
3025 2004-10-11 Kenichi Handa <handa@m17n.org>
3027 * m17n-gui.h (mfont_list): Adjust prototype.
3029 * m17n-X.c (xfont_list): New arg maxnum.
3031 * font.h (struct MFontDriver): Change prototype of <list>.
3033 * font-ft.c (fc_generic_family_list): Delete it.
3034 (Mserif, Msans_serif, Mmonospace): Delete them.
3035 (M_generic_family_info): New variable.
3036 (enum GenericFamilyType): New enum.
3037 (struct GenericFamilyInfo): New struct.
3038 (generic_family_table): New variable.
3039 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
3041 (add_font_info): Get style here.
3042 (ft_list_family): Don't initialize fc_config here. Don't list
3044 (ft_list_generic): New function.
3045 (ft_select): Pay attention to generic familes here.
3046 (ft_open): Fix calculation of ascent and descent.
3047 (ft_list): Pay attention to generic families.
3048 (mfont__ft_init): Initialize M_generic_family_info,
3049 generic_family_table, and fc_config..
3050 (mfont__ft_fini): Finalize generic_family_table.
3052 * draw.c (compose_glyph_string): Use more constant font for
3053 glyphs. Adjust for the member change in MGlyph.
3054 (layout_glyph_string): Adjust for the member change in MGlyph.
3055 (alloc_gstring): Intilize scracth_glyph to avoid
3056 compose_glyph_string on it.
3057 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
3058 (mdraw_coordinates_position): Fix previous change.
3060 * internal-gui.h (glyph_category): New enum.
3061 (MGlyph): Change type of <category> to enum glyph_category.
3063 * face.c (mface__realize): Delete args langauge and charset.
3064 (mface__for_chars): Fix for the case that glyphs have different
3066 (mface__update_frame_face): Adjust for mface__realize change.
3068 * face.h (mface__realize): Adjust prototype.
3070 2004-10-05 Kenichi Handa <handa@m17n.org>
3072 * language.c (mlang__init): Add Akan.
3074 2004-10-04 Kenichi Handa <handa@m17n.org>
3076 * font-ft.c (add_font_info): Add instead of push the element.
3077 (ft_list_family): For generic fonts, try all
3078 substituted. families.
3080 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
3081 (run_rule): Don't update cluster range here.
3082 (run_command): Update cluster range on appending a glyph.
3083 (run_otf): Update cluster range for glyphs generated by OTF.
3085 2004-10-02 Kenichi Handa <handa@m17n.org>
3087 * m17n-X.c (device_open): Handle Mfont key in PLIST.
3089 2004-09-30 Kenichi Handa <handa@m17n.org>
3091 * font-ft.c (ft_select): Ignore family on calling mfont__score.
3093 2004-09-30 Kenichi Handa <handa@m17n.org>
3095 * font.h: Include <fontconfig/fontconfig.h>.
3096 (MFTInfo): New member langset.
3097 (mfont__encoding_list): Extern it.
3099 * font.c (mfont__encoding_list): New function.
3100 (mdebug_dump_font_list): New function.
3102 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
3103 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
3105 (ft_family_list): New variable.
3106 (set_font_info): New arg basep. Callers changed.
3107 (fc_list): Check the return value of FcPatternGetString.
3108 (add_font_info): New arg plist. Callers changed. Update
3110 (ft_list_family): New function (merged fc_list and ft_list_all).
3111 (ft_select): Use ft_list_family.
3112 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
3114 (mfont__ft_init): Initialize above new variables.
3115 (mfont__ft_fini): Free ft_family_list.
3116 (STRDUP_LOWER): New macro.
3117 (set_font_info): Use STRDUP_LOWER.
3118 (ft_list_family): Avoid duplicate addition of font path. Use
3120 (fc_decode_prop): Fix typo.
3122 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
3123 (xfont_registry_list): Change argument disp_info to frame.
3125 (xfont_list_all): New function.
3126 (xfont_list): If FONT is not NULL, check all fonts.
3128 2004-09-28 Kenichi Handa <handa@m17n.org>
3130 * m17n-X.c (MXFont, MXFontList): New types.
3131 (MDisplayInfo): Delete members font_registry_list,
3132 iso8859_1_family_list, iso10646_1_family_list, new members
3133 font_list, base_font_list.
3134 (free_display_info): Adusted for the change of MDisplayInfo.
3135 (xfont_driver): Initialize with xfont_list.
3136 (font_compare): New function.
3137 (build_font_list): Deleted.
3138 (xfont_registry_list): New function.
3139 (xfont_select): Use xfont_registry_list.
3140 (xfont_list): New function.
3141 (device_open): Adusted for the change of MDisplayInfo.
3143 * font-ft.c (add_font_info): New arg languages. Callers changed.
3144 (fc_list): Get languages from fonts..
3145 (ft_list_all): Renamed from ft_list. Callers changed.
3146 (ft_list): New function.
3147 (mfont__ft_driver): Initalize with ft_list.
3149 * font.c (mfont_list): New function.
3151 * font.h (struct MFontDriver): New member `list'.
3152 (MFTInfo): New member languages.
3154 * m17n-gui.h (mfont_list): Extern it.
3156 2004-09-27 Kenichi Handa <handa@m17n.org>
3158 * internal-gui.h (struct MGlyphString): Delete members mt,
3159 sub_width, sub_lbrearing, sub_rbearing, and region.
3161 * draw.c (MSubTextExtents): New type.
3162 (layout_glyphs): New arg extents. Set its members.
3163 (layout_glyph_string): Adjusted for the above change.
3164 (alloc_gstring): Don't set gstring->mt.
3165 (truncate_gstring): Call line_break function with mt instead of
3168 2004-09-22 Kenichi Handa <handa@m17n.org>
3170 * mtext.c (count_utf_16_chars): Count each code of invalid
3173 2004-09-19 Kenichi Handa <handa@m17n.org>
3175 * mtext.c (default_utf_16, default_utf_32): Rename them to
3176 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
3179 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
3182 2004-09-13 Kenichi Handa <handa@m17n.org>
3184 * draw.c (Mlatin): Don't declare it here.
3185 (visual_order): Fix reordering of combining characters.
3186 (compose_glyph_string): Fix detection of script.
3187 (layout_glyphs): Don't fix reordering of combining characters
3189 (layout_glyph_string): Pay attention to
3190 control->disable_overlapping_adjustment.
3191 (truncate_gstring): Include at least on character in a line.
3192 (get_gstring): Always scan one full line.
3193 (mdraw__init): Don't initialize Mlatin here.
3194 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
3195 have a font, use ascent/descent of an ASCII font. Allow
3196 ink_array_return and logical_array_return to be NULL.
3197 (mdraw_coordinates_position): Fix iteration.
3199 * font-ft.c (MFTtoProp): Member completely changed.
3200 (ft_to_prop): Adjusted for the above change.
3201 (ft_to_prop_size): Likewise.
3202 (set_font_info): Adjusted for the change of MFTtoProp.
3203 (fc_generic_family_list): New variable.
3204 (fc_list): Add special handling of generic font names.
3205 (mfont__ft_init): Adjusted for the change of MFTtoProp.
3206 Initialize fc_generic_family_list.
3207 (mfont__ft_fini): Don't free ft_to_prop. Free
3208 fc_generic_family_list.
3209 (FC_vs_M17N_font_prop): New type.
3210 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
3211 (fc_decode_prop, fc_encode_prop): New functions.
3212 (mfont__ft_parse_name): Use fc_decode_prop.
3213 (mfont__ft_unparse_name): Use fc_encode_prop.
3215 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
3216 (MWDevice): Add member realized_font_list.
3217 (free_display_info): Don't free disp_info->realized_font_list.
3218 (free_device): Free device->realized_fontset_list.
3219 (xft_find_metric): Use gstring->frame instead of rfont->frame.
3220 (device_open): Don't initialize disp_info->realized_font_list.
3221 (device_open): Initialize device->realized_font_list and set it to
3222 frame->realized_font_list.
3224 * fontset.c (try_font_group): New function.
3225 (mfont__lookup_fontset): Use try_font_group.
3227 * font.c (common_weight): Change the order of "regular".
3229 * face.c (Mlatin): Don't make it static.
3230 (mface__realize): Be sure to set work_gstring.frame.
3231 (mface__for_chars): Likewise.
3233 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
3236 * internal-gui.h (Mlatin): Extern it.
3238 * m17n-gui.h (MDrawControl): New member
3239 disable_overlapping_adjustment.
3241 2004-09-06 Kenichi Handa <handa@m17n.org>
3243 * font-flt.c (run_otf): Fix typo ('}'->']').
3245 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
3246 (COMBINING_PRECOMPUTED_P): New macros.
3248 * draw.c (layout_glyphs): Handle precomputed combining code.
3250 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
3251 precomupted combining code.
3253 2004-09-03 Kenichi Handa <handa@m17n.org>
3255 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
3258 2004-08-27 Kenichi Handa <handa@m17n.org>
3260 * face.c (mface_put_prop): If the new value is the same as the
3261 current one, don't increment frame->tick.
3263 2004-08-25 Kenichi Handa <handa@m17n.org>
3265 * fontset.c (mfontset): Initialize font_spec_list member.
3266 (mfontset_copy): Load fontset if necessary.
3268 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
3269 'metrics' to for C++.
3271 * draw.c (mdraw_glyph_info): Adjusted for the member name change
3274 2004-08-16 Kenichi Handa <handa@m17n.org>
3276 * Version 1.1.0 released.
3278 2004-08-13 Kenichi Handa <handa@m17n.org>
3280 * language.c (mlang__init): Add Dhivehi.
3282 * m17n-gui.c (Mx, Mfreetype): Delete it.
3283 (m17n_init_win): Don't initialize Mx and Mfreetype here.
3285 * m17n-gui.h (Mfreetype, Mxft): Extern them.
3286 (mfont_resize_ratio): Extern it.
3287 (MDrawGlyphInfo): New member logical_width;
3288 (MDrawGlyph): New type.
3289 (mdraw_glyph_list): Prototype adjusted.
3291 * m17n-X.c (xfont_open): Set type and fontp members.
3292 (xft_open): Likewise.
3294 * internal-gui.h (Mx, Mfreetype): Delete extern.
3296 * font.h (struct MRealizedFont): New member type and fontp.
3298 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
3299 (Mx, Mfreetype): Declare here.
3300 (Mxft): New variable.
3301 (mfont_resize_ratio): New function.
3303 * font-ft.c (ft_open): Set type and fontp members.
3305 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
3308 2004-08-11 Kenichi Handa <handa@m17n.org>
3310 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
3313 2004-08-06 Kenichi Handa <handa@m17n.org>
3315 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
3318 * font-flt.c (run_otf): Print debugging information if necessary.
3320 2004-08-05 Kenichi Handa <handa@m17n.org>
3322 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
3323 positioning_type 5 and 6. Switch simplified.
3325 2004-08-04 Kenichi Handa <handa@m17n.org>
3327 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
3329 2004-08-02 Kenichi Handa <handa@m17n.org>
3331 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
3332 set val to 1 even if it is greater than 1.
3334 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
3336 2004-07-29 Kenichi Handa <handa@m17n.org>
3338 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
3339 debugging information.
3341 * internal.h (MDEBUG_PRINT5): New macro.
3343 * draw.c (layout_glyphs): Don't combine a zero width glyph with
3344 the previous one if the zero width glyph has left or right
3347 2004-07-26 Kenichi Handa <handa@m17n.org>
3349 * m17n-X.c (xft_render): Pay attention to members left_padding and
3350 right_padding of MGlyph.
3352 * draw.c (visual_order): Allocate one more elements for arrays as
3353 a workaround of fribidi bug.
3354 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
3355 instead of MGlyph->bidi_sensitive.
3356 (layout_glyph_string): Pay attentinon to
3357 control->orientation_reversed when padding at the head or tail.
3358 Fix adjustment of space glyph width.
3359 (get_gstring): If cursor_width or cursor_bidi is changed, don't
3362 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
3363 instead of MGlyph->bidi_sensitive.
3365 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
3367 2004-07-26 Kenichi Handa <handa@m17n.org>
3369 * draw.c (visual_order): Don't treat combined glyphs specially.
3370 (layout_glyphs): Don't get metrics glyphs that are already ready.
3371 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
3372 width with the previous one.
3373 (draw_background): Fix bar cursor position on a r2l glyph.
3375 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
3376 (run_rule): Fix place of updating cluster_begin_pos and
3377 cluster_end_pos here.
3378 (run_otf): Don't set left_padding.
3380 * font-ft.c (adjust_anchor): Type of argument `code' changed.
3382 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
3383 Fix handling of GPOS.
3384 (mfont__ft_drive_gpos): Delete this function.
3386 * font.h (mfont__ft_drive_otf): Renamed back from
3387 mfont__ft_drive_gsub.
3388 (mfont__ft_drive_gpos): Delete extern.
3390 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
3391 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
3393 2004-07-23 Kenichi Handa <handa@m17n.org>
3395 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
3396 the same bidi level.
3398 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
3400 2004-07-22 Kenichi Handa <handa@m17n.org>
3402 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
3404 2004-07-20 Kenichi Handa <handa@m17n.org>
3406 * draw.c (render_glyphs): Fix checking of g->code validity.
3408 * face.c (mface__realize): Set g.type.
3410 2004-07-18 Kenichi Handa <handa@m17n.org>
3412 * Makefile.am: Prepend ${top_srcdir} to all *.la in
3415 * m17n-gui.c (mframe): Print error message give by dlopen to
3418 2004-07-16 Kenichi Handa <handa@m17n.org>
3420 * draw.c (compose_glyph_string): Improve the way of deciding a
3421 script. For a character that doesn't have script property, use
3422 the last non-latin script.
3424 * font-ft.c (fc_list): Cancel previous change.
3425 (mfont__ft_init): Add more entries in ft_to_prop_name.
3427 2004-07-15 Kenichi Handa <handa@m17n.org>
3429 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
3430 previous or next character glyphs.
3432 2004-07-14 Kenichi Handa <handa@m17n.org>
3434 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
3435 of type GLYPH_SPACE.
3437 * fontset.c (mfont__lookup_fontset): If glyph type is
3438 GLYPH_SPACE, get codes for SPACE.
3440 * internal-gui.h (Mfont): Delete extern.
3442 * m17n-gui.h (Mfont): Delete duplicated extern.
3444 2004-07-13 Kenichi Handa <handa@m17n.org>
3446 * font-ft.c (DEVICE_DELTA): New macro.
3447 (adjust_anchor): New function.
3448 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
3450 (mfont__ft_drive_gpos): New function.
3452 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
3453 (FontLayoutContext): Delete member `rfont'.
3454 (run_otf): Set g->otf_cmd. Call
3455 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
3456 only whne HAVE_OTF is defined.
3458 * fontset.c: Include "config.h".
3460 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
3461 (MGlyph): New member otf_cmd.
3463 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
3464 (mfont__ft_drive_gpos): Extern it.
3466 * face.c: Include "config.h".
3468 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
3470 * input-gui.c: Include "config.h".
3472 * plist.c: Include "config.h".
3474 2004-07-06 Kenichi Handa <handa@m17n.org>
3476 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
3477 internal-gui.h: Cancel previous changes.
3479 * m17n-gd.h: Delete it.
3481 * Makefile.am (libm17n_core_la_LIBADD): New variable.
3482 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
3483 @XML2_LD_FLAGS@ to above.
3484 (libm17n_la_LIBADD): Add -ldl.
3485 (libm17n_la_LDFLAGS): Add -export-dynamic.
3486 (X_LD_FLAGS): Fix the order of linking.
3487 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
3488 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
3489 (libm17n_X_la_LDFLAGS): Add -module.
3490 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
3491 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3492 (libm17n_gd_la_LDFLAGS): Add -module.
3493 (include_HEADERS): Delete m17n-gd.h.
3495 2004-06-30 Kenichi Handa <handa@m17n.org>
3497 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
3498 (MDeviceLibraryInterface): Delete it.
3499 (register_device_library): Delete it.
3500 (m17n__device_library_list): Renamed from device_library_list.
3502 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
3503 (m17n_init_win): Adjust prototype.
3505 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
3506 (m17n_init_gd): New function.
3508 * m17n-gd.h: New file.
3510 * m17n-X.h: Include <m17n-gui.h>.
3511 (m17n_init_X): Extern it.
3512 (M17N_INIT): Redefine it.
3514 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
3515 (m17n_init_X): New function.
3517 * internal-gui.h (m17n__device_library_list): Extern it.
3518 (struct MDeviceDriver): New members initialized, init, and fini.
3520 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
3522 (libm17n_X_la_LIBADD): Delete aboves.
3523 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
3524 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3525 (libm17n_gd_la_LDFLAGS): Delete it.
3526 (include_HEADERS): Add m17n-gd.h.
3528 2004-06-25 Kenichi Handa <handa@m17n.org>
3530 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
3531 (libm17n_gd_la_LDFLAGS): Cancel previous change.
3533 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
3535 * font-ft.c (fc_list): If FcFontList finds no font, try
3538 * draw.c (compose_glyph_string): Terminate the last loop after
3539 doing default combining if necessary.
3541 2004-06-24 Kenichi Handa <handa@m17n.org>
3543 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
3545 * character.c (mchar_define_property): Add const to an arg.
3547 * charset.c (mchar_define_charset): Add const to an arg.
3549 * coding.c (MCodingSystem): Add const to an arg or decoder.
3550 (finish_decoding): Add const to an arg.
3551 (decode_coding_charset, decode_coding_utf_8)
3552 (decode_coding_utf_16, decode_coding_utf_32)
3553 (decode_coding_iso_2022, decode_coding_sjis)
3554 (mconv_define_coding): Likewise.
3556 * m17n-X.c (xft_find_metric): Delete unused variable.
3558 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
3561 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
3564 * mtext.c (count_utf_8_chars, count_utf_16_chars)
3565 (mtext__from_data, mtext_from_data): Add `const' to an arg.
3567 * mtext.h (mtext__from_data): Ajust prototype.
3569 2004-06-23 Kenichi Handa <handa@m17n.org>
3571 * draw.c (compose_glyph_string): Always get glyph codes by
3573 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
3574 (mdraw_glyph_list): New function.
3576 * font-flt.c (mfont__flt_run): Be sure to call
3577 rfont->driver->encode_char.
3579 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
3580 (ft_encode_char): Delete arg C.
3581 (ft_render): Don't call FT_Get_Char_Index.
3583 * font.c (mfont__encodable_p): Delete it.
3584 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
3586 * font.h (struct MFontDriver): Delete arg C of encode_char.
3587 (mfont__encodable_p): Delete extern.
3589 * m17n-X.c (xfont_encode_char): Delete arg C.
3590 (xft_find_metric): Don't cal FT_Get_Char_Index.
3591 (xft_render): Likewise.
3593 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
3595 (mdraw_glyph_list): Extern it.
3597 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
3599 2004-06-22 Kenichi Handa <handa@m17n.org>
3601 * m17n-gui.h (mfontset_lookup): Extern it.
3603 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
3605 * fontset.c (realize_fontset_elements)
3606 (free_realized_fontset_elements, update_fontset_elements): New
3608 (mfont__realize_fontset): Call realize_fontset_elements.
3609 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
3610 (mfont__lookup_fontset): If a fontset was modified, update
3611 the realized fontset.
3612 (mfontset_modify_entry): Increment fontset->tick.
3613 (mfontset_lookup): New function.
3615 2004-06-21 Kenichi Handa <handa@m17n.org>
3617 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
3619 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
3620 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
3621 length of source text 0.
3623 2004-06-21 Kenichi Handa <handa@m17n.org>
3625 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
3626 (compare): Pay attention to format other than utf-8.
3627 (copy): Delete this function.
3628 (count_by_utf_8, count_by_utf_16, insert): New functions.
3629 (count_utf_16_chars): Fix handling of a surrogate pair.
3630 (find_char_forward, find_char_backward): Likewise.
3631 (mtext__from_data): Delete unnecessary check. Fix number of
3633 (mtext_from_data): Don't count items.
3634 (mtext_ref_char): Optimize the code.
3635 (mtext_set_char): Pay attention to format other than utf-8.
3636 (mtext_cat_char): Likewise.
3637 (mtext_dup): Don't call copy, instead do allocation here.
3638 (mtext_cat): Call insert instead of copy.
3639 (mtext_ncat): Likewise.
3640 (mtext_cpy): Delete character at first and call insert instead of
3642 (mtext_ncpy): Likewise.
3643 (mtext_copy): Likewise.
3644 (mtext_duplicate): Call insert instead of copy.
3645 (mtext_del): Pay attention to format other than utf-8.
3646 (mtext_ins): Simply call insert.
3647 (mtext_ins_char): Pay attention to format other than utf-8.
3648 (mtext_tok): Call insert instead of copy.
3649 (mtext_text): Call UNIT_BYTES.
3651 * textprop.c (mtext__adjust_plist_for_change): New function.
3653 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
3654 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
3655 (CHAR_UNITS_AT): Fix typo.
3656 (CHAR_UNITS_BY_HEAD): Fix typo.
3657 (STRING_CHAR_AND_UNITS): Fix typo.
3659 * internal.h (MTEXT_READ_ONLY_P): New macro.
3661 * mtext.h (mtext__replace): Delete the extern.
3662 (mtext__adjust_foramt): Adjust prototype.
3664 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
3665 if possible. Otherwise make a copy of mmt.
3667 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
3670 2004-06-18 Kenichi Handa <handa@m17n.org>
3672 * character.h (CHAR_STRING_UTF16): Fix syntax.
3674 2004-06-16 Kenichi Handa <handa@m17n.org>
3676 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
3677 (libm17n_X_la_LIBADD): Delete it.
3678 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
3680 * m17n-X.c (device_open): Add parens in `if' condition.
3682 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
3683 (DEC_POSITION): Likewise.
3684 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
3686 2004-06-15 Kenichi Handa <handa@m17n.org>
3688 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
3691 * draw.c (compose_glyph_string): If langauge is specified, call
3692 mface__for_chars even if a text is all latin. Fix condition for
3693 setting non_ascii_found.
3695 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
3697 * m17n.h (minput_char_to_key): Delete extern.
3699 * m17n-gui.h (minput_event_to_key): Cancel previous change.
3701 * m17n-gui.c (null_device_open): Set several members of frame.
3703 2004-06-14 Kenichi Handa <handa@m17n.org>
3705 * m17n-gui.h (minput_event_to_key): Delete extern.
3707 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
3709 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
3711 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
3713 2004-06-08 Kenichi Handa <handa@m17n.org>
3715 * character.c (mchar_put_prop): Don't increment the ref-count of
3718 2004-06-04 Kenichi Handa <handa@m17n.org>
3720 * m17n-core.c (mdebug__register_object): New function.
3721 (mdebug__unregister_object): Likewise.
3723 * internal.h (mdebug__register_object, mdebug__unregister_object):
3725 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
3728 * charset.c (mcharset__load_from_database): Don't call
3729 mconv__register_charset_coding here.
3731 * coding.c (find_coding): Get a real name from an element of
3732 coding_definition_list.
3733 (mconv__register_charset_coding): Set the real name at the top of
3735 (mcoding__load_from_database): Likewise.
3736 (mconv_list_codings): Adjusted for the above change.
3738 2004-06-03 Kenichi Handa <handa@m17n.org>
3740 * coding.c (find_coding): Find by canonicalized name. Don't have
3741 to modify the element of coding_definition_list by
3743 (mconv__define_coding_from_charset): Delete it.
3744 (mconv__register_charset_coding): Canonicalize sym.
3745 (mcoding__load_from_database): Register plist modified by
3748 * coding.h (mconv__define_coding_from_charset): Don't extern it.
3750 * font-ft.c (ft_open): Fix setting of rfont->descent.
3752 2004-06-02 Kenichi Handa <handa@m17n.org>
3754 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
3755 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
3756 (xlfd_unparse_name): Renamed from xfont_build_name.
3757 (mfont__init): Initialized Mfontconfig.
3758 (mfont__free_realized): Unconditionally unref rfont->info.
3759 (mfont__select): Free `this' if it's not best.
3760 (mfont__open): Don't check frame->realized_font_list.
3761 (mfont__parse_name_into_font): New function.
3762 (Mfontconfig): New variable.
3763 (mfont_from_name): Call mfont_parse_name.
3764 (mfont_name): Call mfont_unparse_name.
3765 (mdebug_dump_font): Likewise.
3767 * font.h (struct MFontDriver): Delete members parse_name and
3769 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
3770 (mfont__parse_name_into_font): Extern it.
3772 * font-ft.c: Include "symbol.h".
3773 (close_ft): Unconditionally free filename and charmap_list of
3775 (ft_open): Duplicate base->filename. Increment ref-count of
3776 ft_info->charmap_list. Free ft_info->charmap_list and
3777 ft_info->filename on error.
3778 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
3780 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
3782 (enum xlfd_field_idx): Moved to font.c.
3783 (split_font_name, build_font_name): Likewise.
3784 (build_font_list): Call mfont__parse_name_info_font.
3785 (xfont_open): Call mfont__unparse_name. Free name.
3786 (xfont_parse_name, xfont_build_name): Moved to font.c
3787 (xft_select): Prototype deleted.
3788 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
3789 Call mfont_pase_name.
3791 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
3792 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
3795 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
3798 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
3800 2004-06-01 Kenichi Handa <handa@m17n.org>
3802 * fontset.c (mfontset_modify_entry): Pay attention to the case
3803 that fontset->font_spec_list is NULL.
3805 2004-05-31 Kenichi Handa <handa@m17n.org>
3807 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3809 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3811 * font.c (mfont__select): Print score the a font for debugging.
3813 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
3815 * coding.c (reset_coding_sjis): Check kanji and kana instead of
3816 kanji_sym and kana_sym.
3818 2004-05-28 Kenichi Handa <handa@m17n.org>
3820 * Makefile.am (VINFO): New variable.
3821 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
3822 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
3824 2004-05-27 Kenichi Handa <handa@m17n.org>
3826 The following chanages are to make device dependent functions
3827 accessible only from MDeviceDriver structure, and to add GD and
3828 null device drivers. Font drivers get also device dependent.
3830 * m17n.c (m17n_init): Increament shell_initialized.
3831 (m17n_fini): Decremented shell_initialized.
3833 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
3835 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
3836 (Mwidget, Mcolormap, Mx): Extern them.
3838 * m17n-gui.c: Include <dlfcn.h> and "config.h".
3839 (free_frame): Call frame->driver->close instead of
3841 (DLOPEN_SHLIB_EXT): New macro.
3842 (MDeviceLibraryInterface): New type.
3843 (device_library_list): New variable.
3844 (register_device_library): New function.
3845 (null_device): New variable.
3846 (null_device_close, null_device_get_prop)
3847 (null_device_realize_face, null_device_free_realized_face): New
3849 (null_driver): New variable.
3850 (null_device_init, null_device_fini, null_device_open): New
3852 (null_interface): New variable.
3853 (Mfreetype, Mdevice): Declare them.
3854 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
3855 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
3856 Mwin__Close_Device. Register drivers for Mx and Mgd.
3857 (m17n_fini_win): Decremented win_initialized. Call "fini"
3858 function of all opened devices. Don't call mwin__fini.
3859 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
3861 (mframe): Handle Mdevice key of PLIST.
3862 (mframe_get_prop): Call frame->device->get_prop instead of
3863 mwin__device_get_prop.
3865 * m17n-gd.c: New file.
3867 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
3868 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
3870 * m17n-core.c (m17n_init_core): Increate core_initialized.
3871 (m17n_fini_core): Decremented core_initialized.
3873 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
3874 (Mcolormap): Don't extern them here.
3876 * m17n-X.c (FRAME_DEVICE): New macro.
3877 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
3878 (free_display_info): Use MPLIST_DO.
3879 (free_device): Free rface->info.
3880 (xft_close): Delete it.
3881 (device_init): Renamed from mwin__init.
3882 (device_fini): Renamed from mwin__fini.
3883 (device_open): Renamed from mwin__open_device.
3884 (x_driver): New variable.
3885 (MXFontInfo): Delete member frame, add member display.
3886 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
3887 Don't declare them here.
3889 * internal-gui.h (MDeviceType): New enum.
3890 (MWDefice): Delete it.
3891 (struct MFrame): Change type of device to void *. New members
3892 device_type, driver, font_driver_list.
3893 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
3894 (MDeviceDriver): New type.
3895 (Mx, Mgd, Mfreetype): Extern them.
3896 (mwin__XXX): Delete all of them.
3898 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
3900 (win_destroy_ic): Likewise.
3901 (adjust_window_and_draw): Likewise.
3902 (win_callback): Likewise.
3903 (Mxim): Declare it here.
3904 (minput_event_to_key): Call M_CHECK_READABLE.
3906 * fontset.c (mfont__lookup_fontset): Delete local variable
3909 * font.h (struct MFontDriver): Delete member close, add members
3910 parse_name and build_name.
3911 (mfont__driver_list): Delete extern.
3912 (mfont__close): Delete extern.
3914 * font.c (mfont__init): Don't set mfont__driver_list.
3915 (mfont__fini): Don't unref mfont__driver_list.
3916 (mfont__select): Try font drivers in frame->font_driver_list. Set
3917 driver member of a realized font.
3918 (mfont__close): Delete it.
3919 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
3920 functions of the default frame.
3922 * font-ft.c (close_ft): Check ft_info->ft_face and work
3924 (add_font_info): Allocate ft_info by M17N_OBJECT.
3925 (ft_close): Delete it.
3926 (mfont__ft_driver): Don't set ft_close.
3927 (ft_select): Increment ref-count of best_font.
3928 (ft_open): Decremented ref-count of base. On error, call
3929 FT_Done_Face and free ft_info.
3930 (ft_find_metric): Always use XXX_MONO in load_flags.
3931 (ft_render): Fix setting of width. Call
3932 frame->driver->draw_points instead of mwin__draw_points.
3933 (ft_to_prop): Don't set mfont__driver_list.
3934 (mfont__ft_fini): Just unref ft_info.
3936 * face.c (mface__init): Exchange foreground and background of
3937 mface__default. Call mface_put_prop to set hline of
3939 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
3940 (mface__free_realized): Don't call mwin__free_realized_face.
3942 * draw.c (Mdepth): Don't declare it here.
3943 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
3944 (render_glyphs, render_glyph_string): Likewise.
3945 (mdraw__init): Don't set Mdepth.
3946 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
3948 (mdraw_text_per_char_extents): Return 0 on success and -1 on
3950 (mdraw_text_items): Check FRAME is writable.
3951 (mdraw_per_char_extents): Implement body.
3953 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
3955 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
3956 (GUI_SOURCES): Delete it.
3957 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
3958 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
3959 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
3960 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
3961 (linkgui_LDADD): Set to libm17n-gui.la
3962 (linkgui_LDFLAGS): New target.
3963 (SRC): Include ${libm17n_gui_la_SOURCES} and
3964 ${libm17n_gd_la_SOURCES}.
3966 2004-05-24 Kenichi Handa <handa@m17n.org>
3968 * draw.c (draw_background): Don't draw background even if
3969 rface->face.property[MFACE_BACKGROUND] is not Mnil.
3971 2004-05-22 Kenichi Handa <handa@m17n.org>
3973 * m17n-X.c (xft_open_font): Fix anti_alias setting.
3975 2004-05-20 Kenichi Handa <handa@m17n.org>
3977 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
3979 * m17n-gui.c: Include "plist.h".
3980 (mframe): If PLIST is NULL, initialize it to emply plist.
3982 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
3983 (xft_driver): New variable.
3984 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
3985 (xft_find_metric, xft_render): New function.
3986 (mwin__init): Adjusted for the new mfont__driver_list.
3987 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
3988 generated face to PARAM.
3989 (mwin__realize_face): Fix setting of box colors. Don't call hook
3991 (mwin__draw_hline): New function.
3992 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
3993 (mwin__xft_render): Delete these function.
3995 * internal-gui.h (struct MFrame): New member tick.
3996 (struct MGlyphString): New member tick.
3997 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
3998 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
3999 (mwin__xft_render): Delete extern.
4001 * fontset.c (mfont__lookup_fontset): Make the code simpler.
4002 (mfontset): Always increment the reference count of returned
4005 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
4006 (MFTInfo): Moved to font.h.
4007 (ft_iso8859_1_font_list): Delete this variable.
4008 (set_font_info): Don't set font->property[MFONT_TYPE].
4009 (set_font_info): Don't udpate ft_iso8859_1_font_list.
4010 (add_font_info): Change type to void.
4011 (fc_list): Change anme from xft_list. Caller changed. Include
4012 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
4013 (mfont__ft_driver): Change name from ft_driver. Caller changed.
4014 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
4015 (close_ft): Don't call mwin__xft_close. Unref
4016 ft_info->extra_info.
4017 (ft_open): Don't setup ft_info->fontname. Don't call
4019 (ft_find_metric): Don't call mwin__xft_get_metric.
4020 (ft_encode_char): Call rfont->driver->open instead of ft_open.
4021 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
4022 (mfont__ft_init): Adjusted for new mfont__driver_list.
4023 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
4025 * font.c (mfont__driver_list): Make it MPlist.
4026 (mfont__init): Adjust initialization of mfont__driver_list.
4027 (mfont__fini): Free mfont__driver_list.
4028 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
4029 (mfont__select): Adjusted for the new mfont__driver_list.
4031 * font.h (enum MFontProperty): Delete MFONT_TYPE.
4032 (mfont__drirver_list): Adjust prototype.
4033 (MFTInfo): Move to here from fron.c. Deleve member fontname.
4035 * face.h (struct MFace): Delete member realized_face_list, add
4037 (struct MRealizedFace): Delete member need_update
4038 andnofont_rface, add member non_ascii_list.
4039 (mface__update_frame_face): Extern it.
4041 * face.c (hline_prop_list, box_prop_list, noop_hook): New
4043 (get_hline_create, get_box_create): New functions.
4044 (find_realized_face): Cancel previous change. Arg RFONT deleted.
4046 (free_face): Cancep previous change. Free face->frame_list.
4047 (serialize_hline): Do nothing if hline->width is zero.
4048 (serialize_box): Do nothing if box->width is zero.
4049 (mface__init): Setup all properties of mface__default.
4050 (mface__fini): Free hline_prop_list and box_prop_list.
4051 (mface__realize): Cancel previous change. Update
4052 face->frame_list. Setup rface->non_ascii_list.
4053 (mface__for_chars): Update rface->non_ascii_list.
4054 (mface__free_realized): Free rface->non_ascii_list.
4055 (mface__update_frame_face): New function.
4056 (mface): Initialize face->frame_list.
4057 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
4059 (mface_merge): Likewise.
4060 (mface_put_prop): If key is Mhline or Mbox, get value by
4061 get_hline_create or get_box_create respectively.
4062 (mface_put_prop): Update frame->tick and call
4063 mface__update_frame_face if necessary.
4064 (mface_update): Do nothing if func is noop_hook.
4066 * draw.c (render_glyphs): If a font is not found, use
4067 mwin__draw_empty_boxes.
4068 (alloc_gstring): Initialize gstring->tick.
4069 (get_gstring): Check gstring->tick.
4071 2004-05-17 Kenichi Handa <handa@m17n.org>
4073 * face.c (find_realized_face): Return value changed. If RFONT is
4074 NULL, avoid unnecessary checking.
4075 (free_face): Free face->realized_face_list.
4076 (mface__realize): Adjusted for the change of find_realized_face.
4077 If it returns a realized face that needs update, free it and
4078 realize a new one. Push a new realized face to
4079 frame->realized_face_list instead of appending.
4080 (mface__for_chars): Adjusted for the change of find_realized_face.
4081 Short cut if the required font is in rface->ascii_rface.
4082 (mface_put_prop): Free old value if necessary. Set need_update
4083 member of realized faces to 1.
4085 * face.h (struct MFace): Delete member tick, add member
4087 (struct MRealizedFace): Delete member tick, add member
4090 2004-05-13 Kenichi Handa <handa@m17n.org>
4092 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
4094 2004-05-12 Kenichi Handa <handa@m17n.org>
4096 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
4098 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
4099 parse it XftNameParse.
4101 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
4102 (all_fonts_scaned): New variable.
4103 (set_font_info): FAMILY may be Mnil.
4104 (add_font_info): Argument changed.
4105 (xft_list): Call add_font_info in it.
4106 (ft_list): Likewise.
4107 (ft_select): Make it work in the case family is Mnil.
4108 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
4109 (mfont__ft_fini): Set all_fonts_scaned to 0.
4111 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
4112 that is failed to open.
4114 2004-05-10 Kenichi Handa <handa@m17n.org>
4116 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
4117 device's depth is 1 (i.e. monochrome).
4119 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
4120 to work around the problem of libtool.
4122 * font-ft.c: Include <freetype/ftbdf.h>.
4123 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
4125 (mfont__ft_init): Initialize them.
4126 (ft_iso8859_1_font_list): New variable.
4127 (set_font_info): Detect a font containing iso8859-1 glyphs and
4128 register it in ft_iso8859_1_font_list. If the font is not
4129 scalable, assume it as BDF or PCF font and setup SIZE and RESY
4130 properties of the font from its properties.
4131 (add_font_list): If the font is not scalable, check if it is BDF
4132 or PCF font. If not, ignore it.
4133 (ft_select): If FAMILY is Mnil, return NULL only if the requested
4134 registry is not iso8859-1.
4135 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
4136 ft_iso8859_1_font_list.
4137 (ft_find_metric): If the font is not scalable, assume it as BDF
4138 or PCF, and get a metric from its properties.
4139 (mfont__ft_fini): Free ft_iso8859_1_font_list.
4141 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
4143 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
4144 (libm17n_la_LDFLAGS): Delete it.
4145 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
4146 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
4148 2004-05-06 Kenichi Handa <handa@m17n.org>
4150 * draw.c (compose_glyph_string): Fix previous change.
4152 2004-04-30 Kenichi Handa <handa@m17n.org>
4154 * font-ft.c (ft_list): Delete unused variable `result'.
4155 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
4157 2004-04-27 Kenichi Handa <handa@m17n.org>
4159 * m17n-X.c: Include config.h
4160 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
4161 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
4162 (MWDevice) [HAVE_XFT2]: New member xft_draw.
4163 (FRAME_CMAP, FRAME_VISUAL): New macros.
4164 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
4165 (xfont_driver): Make it static.
4166 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
4167 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
4168 info->xft_color_back.
4169 (MXftFontInfo) [HAVE_XFT2]: New type.
4170 (mwin__xft_close) [HAVE_XFT2]: New function.
4171 (mwin__xft_open) [HAVE_XFT2]: New function.
4172 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
4173 (mwin__xft_render) [HAVE_XFT2]: New function.
4175 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4176 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
4177 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
4180 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4182 * font-ft.c: Don't include FT_FREETYPE_H here.
4183 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
4184 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
4185 (MFTInfo): New member charmap_index.
4186 (MFTInfo) [HAVE_XFT2]: New member xft_info.
4187 (check_otf_filename): Renamed from check_filename. Return value
4189 (ft_set_property): This function deleted.
4190 (set_font_info): New function.
4191 (add_font_list): Argument changed. Add multiple fonts.
4192 (xft_list) [HAVE_XFT2]: New function.
4193 (ft_list) [not HAVE_XFT2]: New function.
4194 (ft_select): Add code for Xft.
4195 (close_ft): Likewise.
4196 (ft_open): Likewise.
4197 (ft_find_metric): Likewise.
4198 (ft_encode_char): Likewise.
4199 (ft_render): Likewise.
4201 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
4203 2004-04-26 Kenichi Handa <handa@m17n.org>
4205 * textprop.c (mtext_attach_property): Declare the return type as
4208 2004-04-21 Kenichi Handa <handa@m17n.org>
4210 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
4212 2004-04-09 Kenichi Handa <handa@m17n.org>
4214 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
4216 (load_command): Setup above members.
4218 2004-04-05 Kenichi Handa <handa@m17n.org>
4220 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
4222 2004-03-30 Kenichi Handa <handa@m17n.org>
4224 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
4227 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
4228 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
4230 2004-03-29 Kenichi Handa <handa@m17n.org>
4232 * Version 1.0 Patch Level 2 released.
4234 2004-03-29 Kenichi Handa <handa@m17n.org>
4236 * charset.c (make_charset): Set charset->fully_loaded and
4237 charset->simple correctly. Don't try to get charset->min_char and
4238 charset->max_char for a charset of method subset and superset.
4239 Don't load a mapping file here.
4240 (mcharset__init): Set unified_max.
4241 (mcharset__load_from_database): Free a working plist.
4243 * coding.c (mcoding__fini): Free all malloced data.
4245 * input-gui.c (win_create_ic): Set control.as_image for preediting
4248 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
4249 `count') to initialize the array.
4251 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
4254 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
4256 (mwin__create_window): Fix bug of setting a background pixel of a
4258 (mwin__adjust_window): Clear the window before drawing.
4260 * m17n-core.c (mdebug__report_object): Free array->objectes if
4262 (m17n_init_core): Don't set report_header_printed to 0 here.
4263 Fix debugging information.
4264 (m17n_fini_core): Set report_header_printed to 0 here.
4266 * m17n-core.h (mplist_deserialize): Extern it.
4268 * m17n-gui.c (m17n_fini_win): Fix debugging information.
4270 * m17n.c (m17n_fini): Fix debugging information.
4272 * mtext.c (mtext__adjust_foramt): New function.
4274 * mtext.h (mtext__adjust_foramt): Extern it.
4276 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
4278 * plist.h (mplist__deserialize): Don't extern it.
4280 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
4281 elements of symbol_table to NULL. Report about created and freed
4282 symbols if MDEBUG_FINI is set.
4284 2004-03-22 Kenichi Handa <handa@m17n.org>
4286 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
4288 * m17n.c (m17n_init): Fix the way of checking merror_code.
4290 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
4292 2004-03-22 Kenichi Handa <handa@m17n.org>
4294 * fontset.c (realize_font_group): Adjust the font size by
4295 mfont__resize before selecting a font.
4297 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
4299 2004-03-19 Kenichi Handa <handa@m17n.org>
4301 * Version 1.0 Patch Level 1 released.
4303 2004-03-19 Kenichi Handa <handa@m17n.org>
4305 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
4307 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
4309 2004-03-19 Kenichi Handa <handa@m17n.org>
4311 Re-apply the changes forgotten in the released version.
4313 * charset.c (mcharset__load_from_database): Call
4314 mchar_define_charset.
4316 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
4317 (mconv_encode_range): Put Mcoding text property.
4319 2004-03-18 Kenichi Handa <handa@m17n.org>
4321 * draw.c (Mdepth): New variable.
4322 (visual_order): Delete unused local var `pos'.
4323 (compose_glyph_string): Fix for the case that gstring->glyphs is
4324 realloced. Stop generating glyphs at TO. Fix handling of
4326 (layout_glyphs): Get metrics of all glyphs in advance. Set
4327 lbearing and rbearing of base of composition glyph correctly.
4328 Handle left-overhang glyphs correctly.
4329 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
4331 (dump_combining_code): Change the defualt off_x character to ".".
4332 (mdraw__init): Initialize Mdepth.
4334 * face.c (work_gstring): New variable
4335 (mface__init): Initialize work_gstring.
4336 (mface__fini): Free work_gstring.glyphs.
4337 (mface__realize): Don't handle videomode property here. Adjusted
4338 for the change of mfont__get_metric.
4339 (mface__for_chars): Adjusted for the change of mfont__get_metric.
4341 * face.h (enum face_gc): Moved to m17n-X.c.
4343 * font.h (struct MFontDriver): Arguments of find_metric changed.
4344 (mfont__select): Prototype adjusted.
4345 (mfont__get_metric): Likewise.
4346 (mfont__ft_drive_otf): Likewise.
4347 (mfont__flt_run): Likewise.
4349 * font.c (mfont__select): New argument layouter. If layouter is
4350 different in the registered font, make a new copy of realized
4352 (mfont__get_metric): Argument changed. Get metrics of multiple
4354 (mfont_find): Call mfont__select with layouter as Mnil.
4356 * font-flt.c (FontLayoutContext): New member rfont.
4357 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
4358 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
4360 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
4362 (NUM_POINTS): New macro.
4363 (MPointTable): New type.
4364 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
4365 (mfont__ft_drive_otf): New argument rfont.
4367 * fontset.c (realize_font_group): Adjusted for the changed of
4369 (check_fontset_element): This function deleted.
4371 * input-gui.c (adjust_window_and_draw): Locate a preedit window
4372 off the parent window if the preedit text is zero length.
4374 * internal-gui.h (struct MFrame): New members foreground,
4375 background, videomode, font.
4376 (struct MGlyphString): New member anti_alias.
4377 (MDrawPoint): New type.
4378 (mwin__draw_bitmap): Prototype deleted.
4379 (mwin__draw_points): Prototype added.
4381 * m17n-gui.h (MDrawControl): New member anti_alias.
4383 * m17n-gui.c (free_frame): Free frame->font.
4384 (mframe): Set the fontset of frame->face to the default fontset.
4386 * m17n-X.c (RGB_GC): New type.
4387 (enum gc_index): Renamed from enum face_gc. Member names changed.
4389 (struct MWDevice): Members foreground and background deleted. New
4390 member scratch_gc, gc_list.
4391 (DEFAULT_FONT, FALLBACK_FONT): New macros.
4392 (free_device): Free GCs in device->gc_list.
4393 (get_rgb_gc): New function.
4394 (get_gc): Renamed and argument changed from get_color.
4395 (get_gc_for_anti_alias): New function.
4396 (xfont_find_metric): Arguments changed. Get metrics of multiple
4398 (set_region): Argument changed. Caller changed.
4399 (xfont_render): Allways set a font in gc.
4400 (x_error_handler, x_io_error_handler): Define only if
4401 X_SET_ERROR_HANDLER is defined.
4402 (mwin__open_device): Create device->scratch_gc. Set members
4403 foreground, background, and videomode of frame. Call
4404 XSetErrorHandler and XSetIOErrorHandler only if
4405 X_SET_ERROR_HANDLER is defined.
4406 (struct gc_list): Deleted.
4407 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
4408 (mwin__realize_face): Adjusted for the change of the format of
4409 rface->info and the charge of set_region.
4410 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
4411 (mwin__draw_box): Likewise.
4412 (mwin__draw_bitmap): This function deleted.
4413 (mwin__draw_points): New function.
4414 (mwin__verify_region): Adjusted for the change of the format of
4415 rface->info and the charge of set_region.
4416 (mwin__create_window): Inherit backgound pixel from parent.
4417 (mwin__dump_gc): Adjusted for the change of the format of
4420 2004-03-16 Kenichi Handa <handa@m17n.org>
4422 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
4424 * input.c (M_key_alias): New variable.
4425 (handle_key): Try M_key_alias property of a key too.
4426 (minput__init): Initialize M_key_alias. Give that property to
4427 symbols in one_char_symbol. Fix bug of initializing
4430 * draw.c (compose_glyph_string): Don't handle
4431 ignore_formatting_char here. Include formatting characters in the
4432 range processed by a FTL.
4433 (layout_glyph_string): Handle ignore_formatting_char here.
4435 2004-03-12 Kenichi Handa <handa@m17n.org>
4437 * input-gui.c (win_create_ic): Enable bidi in status control.
4439 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
4441 2004-03-09 Kenichi Handa <handa@m17n.org>
4443 * input.c (load_input_method): If title is not specified, use the
4444 input method name as title.
4446 * m17n-X.c (get_color): Make it static.
4447 (xim_create_ic, xim_destroy_ic, x_error_handler)
4448 (x_io_error_handler): Likewise.
4450 2004-03-01 Kenichi Handa <handa@m17n.org>
4452 * Version 1.0 released.
4455 Copyright (C) 2003, 2004
4456 National Institute of Advanced Industrial Science and Technology (AIST)
4457 Registration Number H15PRO112
4459 This file is part of the m17n library.
4461 The m17n library is free software; you can redistribute it and/or
4462 modify it under the terms of the GNU Lesser General Public License
4463 as published by the Free Software Foundation; either version 2.1 of
4464 the License, or (at your option) any later version.
4466 The m17n library is distributed in the hope that it will be useful,
4467 but WITHOUT ANY WARRANTY; without even the implied warranty of
4468 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4469 Lesser General Public License for more details.
4471 You should have received a copy of the GNU Lesser General Public
4472 License along with the m17n library; if not, write to the Free
4473 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
4474 Boston, MA 02110-1301, USA.