1 2007-12-07 Kenichi Handa <handa@ni.aist.go.jp>
3 * plist.c (read_mtext_element): Don't free the malloced buffer.
5 2007-12-04 Kenichi Handa <handa@ni.aist.go.jp>
7 * m17n-core.h (merror_code): Extern it.
9 * m17n-misc.h (merror_code): Don't extern it.
11 * m17n.h: Handle the case of _M17N_FLT_H_ being defined.
13 * m17n-flt.h: Handle the case of _M17N_H_ being defined.
15 2007-11-22 Kenichi Handa <handa@ni.aist.go.jp>
17 * draw.c (compose_glyph_string): Check g->rface->layouter, not
18 g->rface->rfont->layouter.
20 * font-ft.c (ft_drive_otf): Fix setting of g->g.from and g->g.to.
22 * m17n-flt.c (FontLayoutContext): New member encoded_offset.
23 (run_rule): Use ctx->encoded_offset.
24 (run_command): Likewise.
25 (run_stages): Set ctx->encoded_offset.
27 2007-11-21 Kenichi Handa <handa@ni.aist.go.jp>
29 * m17n-flt.c (enum GlyphInfoMask): Adjusted for the change of
30 bit-size of MFLTGlyph->internal.
32 2007-11-20 Kenichi Handa <handa@ni.aist.go.jp>
34 * draw.c (visual_order): Exclude the last anchor glyph from the
37 * m17n-flt.h (MFLTGlyph): New member <adjusted>.
39 * m17n-flt.c (run_otf): Set adjusted flag of glyphs if necessary.
40 (run_stages): Likewise.
41 (load_flt): Unref top after checking plist.
43 * m17n-X.c (xft_render): Check adjusted flag of glyphs.
45 2007-11-12 Kenichi Handa <handa@ni.aist.go.jp>
47 * font-ft.c (ft_check_otf): Fix arg to OTF_check_features.
49 * m17n-flt.c (Mcombining): New variable.
50 (Mfont_facility): Renamed from Mfont_has. Referrer changed.
51 (enum FontLayoutCmdRuleSrcType): Delete SRC_EXIST, add
52 SRC_HAS_GLYPH and SRC_OTF_SPEC.
53 (FontLayoutCmdRule): Delete src.exist, add src.supported_glyph and
55 (load_command): Adjusted for the above changes.
57 (combining_code_from_class): Delete it.
58 (mflt_get): Check flt->name against Mcombining, not Mt.
60 * internal-flt.h (Mcombining): Extern it.
62 * draw.c (compose_glyph_string): Call run_flt with Mcombining for
65 2007-11-09 Kenichi Handa <handa@ni.aist.go.jp>
67 * face.c (mface__realize): Reset measured flag before calling
70 * m17n-flt.c (run_stages): Fix handing of off_x and off_y.
71 (setup_combining_coverage): New function.
72 (setup_combining_flt): New function.
73 (mflt_get): If flt is not found, return NULL. If name if Mt,
74 call setup_combining_flt.
75 (mflt_run): For debugging, print font family name.
77 * font-ft.c (ft_render): Fix handling of baseline_offset.
78 (ft_encapsulate): Set metrics in 26.6 fixed pixel.
79 (ft_render): Check pixel_mode to determine anti_alias.
81 * m17n-X.c (xfont_find_metric): Delete invalid "continue" line.
82 (xfont_find_metric): Set metrics in 26.6 fixed pixel.
83 (xfont_render): Set baseline_offset in pixel.
84 (xft_render): Fix handling of baseline_offset.
86 * draw.c (run_flt): Set font.font.family.
87 (compose_glyph_string): Fix handling of combining characters.
89 * fontset.c (try_font_list): Check if the named flt is surely
92 2007-11-07 Kenichi Handa <handa@ni.aist.go.jp>
94 * draw.c (analyse_bidi_level): New function.
95 (visual_order): Do reordering using the already decided
97 (compose_glyph_string): Decide bidi-level before calling flt.
99 * m17n-flt.c (mflt_run): Fix typo.
101 * font-ft.c (ft_drive_otf): Fix indexing gstring->glyphs.
103 2007-11-06 Kenichi Handa <handa@ni.aist.go.jp>
105 * draw.c (visual_order): Don't rely on the width of glyphs.
106 (run_flt): Fix culculation of g->g.to.
108 * m17n-flt.c (run_rule): Don't set error code here.
109 (run_cond): Likewise.
110 (run_otf): Fix culculation of xoff and yoff.
111 (run_command): Don't set error code here.
115 * m17n-X.c (xfont_open): Keep rfont's metrics in 26.6 fixed pixels.
116 (xfont_find_metric): Set glyph's yadv to 0.
117 (xft_find_metric): Likewise.
119 * font-ft.c (ft_open): Keep rfont's metrics in 26.6 fixed pixels.
120 (ft_find_metric): Adjust glyph's metrics.
121 (ft_encapsulate): Keep rfont's metrics in 26.6 fixed pixels.
122 (ft_drive_otf): Set mark glyph's xadv to 0.
124 * face.c (mface__for_chars): Adjusts the unit of face's ascent and
127 2007-10-29 Kenichi Handa <handa@m17n.org>
129 * m17n-flt.h (struct _MFLTOtfSpec): Adjusted for the new FLT handling.
130 (mflt_get): Adjusted for the argument change.
131 (mflt_name): Adjusted for the return value change.
133 * m17n-flt.c (Mgenerator, Mend): New variables.
134 (flt_min_coverage, flt_max_coverage): New variables.
137 (Mfont_has): Renamed from Mexist. Referrers chagned.
138 (gen_otf_tag): Handle the trailing whitespaces.
139 (otf_count_features, otf_store_features): Fix for negative features.
140 (parse_otf_command): Adjusted for the change of MFLTOtfSpec.
141 (load_otf_command): Likewise.
142 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
143 (load_flt): Argument changed. Caller changed.
144 (free_flt_list): New function.
145 (run_rule): Adjusted for the change of FontLayoutContext.
146 (mflt_run): Adjusted for the change of FontLayoutContext.
148 * m17n-gui.c (m17n_init_win): Call m17n_init_flt.
149 (m17n_fini_win): Call m17n_fini_flt.
151 * m17n-gui.h: Include m17n-flt.h.
153 * m17n-gd.c: Adusted for the change of MGlyph.
155 * m17n-X.c: Adusted for the change of MGlyph.
156 (xft_check_otf, xft_drive_otf): New functions.
158 * internal-gui.h (MGlyph): Modified for new FLT handling.
160 * fontset.c (try_font_list): Adusted for the change of MGlyph.
162 * font-ft.c: Adjusted for the change of MGlyph.
163 (ft_check_cap_otf): Renamed from ft_check_otf. Callers changed.
164 (get_glyph_metric): Deleted.
165 (ft_check_otf): New function.
166 (ft_drive_otf): New fucntion.
168 * font.c: Adjusted for the change of MGlyph.
169 (mfont__init): Don't call mfont__flt_init.
170 (mfont__fini): Don't call mfont__flt_fini.
171 (mfont__get_glyph_id, mfont__get_metrics): New functions.
173 * font.h (struct MRealizedFont): New members x_ppem and y_ppem.
174 (MFLTFontForRealized): New struct.
175 (struct MFontDriver): New members check_otf and drive_otf.
176 (mfont__get_glyph_id, mfont__get_metrics): Extern them.
178 * face.c: Adjusted for the change of MGlyph.
180 * draw.c: Adjusted for the change of MGlyph.
182 * m17n.c (m17n_init): Don't call mchar_init.
184 * m17n-core.c (m17n_init_core): Call mchar_init.
186 * m17n-core.h (mchartable_min_char, mchartable_max_char): Extern them.
188 * input.c: Include "m17n.h" instead of "m17n-gui.h".
190 * chartab.c (mchartable): Initialize table->min_char to -1.
191 (mchartable_min_char): New function.
192 (mchartable_max_char): New function.
194 * Makefile.am (GUI_SOURCES): Delete font-flt.c.
195 (libm17n_gui_la_LIBADD): Add ${top_builddir}/src/libm17n-flt.la.
197 2007-10-12 Kenichi Handa <handa@m17n.org>
199 * m17n-core.h (Mcharset): Extern it.
200 Move detabase related declarations from m17n.h.
202 * m17n-flt.h: Include m17n-core.h instead of m17n.h.
203 (struct _MFLTOtfFeatures): New struct.
204 (struct _MFLTOtfSpec): Delete gsub, gpos, etc, add gsub_gpos.
205 (struct _MFLTFont): Delete otf, add check_otf.
206 (MCHAR_INVALID_CODE): Define it.
208 * plist.c (read_mtext_element): Simplify the code.
210 * m17n.h: Move database related declarations to m17n-core.h
211 (Mharset): Don't extern it.
213 * m17n.c (m17n_init): Don't call mdatabase__init.
215 * m17n-gd.c (read_rgb_txt): Check also /etc/X11/rgb.txt. Downcase
218 * m17n-flt.c: Include m17n-core.h instead of m17n.h.
219 (Mexist): New variable.
220 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
221 (FontLayoutCmdRule): New member src.exist.
222 (parse_otf_command): Handle gsub_count and gpos_count separately.
223 (load_otf_command): Adjusted for the change of MFLTOtfSpec.
224 (load_command): Handle the command "exist".
225 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
226 (run_rule): Handle the case SRC_EXIST.
227 (run_otf): Adjusted for the change of MFLTOtfSpec.
228 (run_command): Check the range of FROM.
229 (check_otf_spec): Delete it.
230 (m17n_init_flt): Call m17n_init_core instead of m17n_init.
232 (m17n_fini_flt): Call m17n_fini_core instead of m17n_fiini.
233 (mflt_find): Call font->check_otf instead of check_otf_spec.
234 (mflt_run): Keep the metrics in 26.6 fixed point.
236 * m17n-core.c (mdatabase__finder, mdatabase__loader): Delete them.
237 (m17n_init_core): Call mdatabase__init.
239 * m17n-X.c (device_open): Use mplist_add, not mplist_push.
241 * internal.h (mdatabase__finder, mdatabase__loader): Delete externs
244 * font-flt.c (Mexist): New variable.
245 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
246 (FontLayoutCmdRule): New member src.exist.
247 (load_category_table): Use isalnum, not isalpha.
248 (load_command): Check the command "exist".
249 (run_rule): Hande the case SRC_EXIST.
250 (run_command): Check the range of FROM.
251 (mfont__flt_init): Initialize Mexist.
253 * draw.c (layout_glyphs): Fix calculation of off_x and off_y.
255 * database.h (mdatabase__load_charset_func): Extern it.
257 * database.c: Include m17n-core.h instead of m17n.h.
258 (load_chartable): Use mtext__from_data.
259 (load_charset): Moved to charset.c
260 (load_database): Call mdatabase__load_charset_func instead of
262 (mdatabase__load_charset_func): New variable.
263 (mdatabase__init): Initialize mdatabase__load_charset_func and
264 Mcharset. Don't set mdatabase__finder and mdatabase__loader.
265 (mdatabase__save): Use fwrite, not mconv_encode_stream.
266 (Mcharset): Declare it here.
268 * charset.c: Include "database.h.".
269 (load_charset): Moved from database.c.
270 (mcharset__init): Initialize mdatabase__load_charset_func, don't
273 * character.c (mchar_define_property): Call mdatabase_find directly.
274 (mchar_get_prop): Call mdatabase_add directly.
275 (mchar_put_prop): Call mdatabase_load directly.
276 (mchar_get_prop_table): Likewise.
278 * Makefile.am (libm17n_core_la_SOURCES): Add database.[ch].
279 (libm17n_la_SOURCES): Remove database.[ch].
280 (libm17n_flt_la_LIBADD): Delete libm17n.la, add libm17n-core.la.
282 2007-09-18 Kenichi Handa <handa@m17n.org>
284 * face.c (mface__realize): Try Freetype based font at first.
286 * font.c: Include <ctype.h>
288 2007-09-16 Kenichi Handa <handa@m17n.org>
290 * m17n-flt.c (load_flt): New arg full. If full is zero, load only
292 (run_otf): Call font->get_metrics, not font->get_metric.
293 (run_stages): Likewise.
294 (CHECK_FLT_COVERAGE): New macro.
295 (CHECK_FLT_STAGES): Call load_flt with the second arg 1.
296 (check_otf_spec): New function.
297 (m17n_fini_flt): Unref flt->coverage.
298 (mflt_find): Argument changed.
299 (mflt_name): New function.
300 (mflt_coverage): Use CHECK_FLT_COVERAGE.
302 * m17n-flt.h (MFLTFont): Member get_metrics renamed from get_metric.
303 (mflt_find): Prototype adjusted.
304 (mflt_name): Extern it.
306 2007-09-14 Kenichi Handa <handa@m17n.org>
308 * m17n-flt.h (struct _MFLTGlyph): Change signedness of members.
310 * font-flt.c (run_otf): Make debug info printing comaptible with
312 (run_command): Likewise.
313 (mfont__flt_run): Likewise.
315 * m17n-flt.c (UPDATE_CLUSTER_RANGE): ctx->cluster_begin_idx is
316 invalid only when it's negative.
318 (run_command): Likewise.
319 (mflt_run): Initialize ctx.cluster_begin_idx to -1.
321 2007-09-10 Kenichi Handa <handa@m17n.org>
323 * m17n-flt.h (struct _MFLTGlyph): New member encoded and measured.
324 (struct _MFLTFont): Prototype of get_glyph_id changed.
326 * m17n-flt.c (enum GlyphInfoMask): Delete EncodedMask and
328 (GAPPEND): Delete this macro.
329 (GET_ENCODED, SET_ENCODED, GET_MEASURED, SET_MEASURED): Adjusted
330 for the change of MFLTGlyph. Caller changed.
331 (run_otf): Simply calls font->get_glyph_id.
332 (run_command): Reset g->encoded and g->measured for direct code.
333 (positioning): Delete this function.
334 (run_stages): Simply calls font->get_glyph_id and font->get_metric.
336 2007-09-07 Kenichi Handa <handa@m17n.org>
338 * draw.c (compose_glyph_string): Improve script detection.
340 2007-09-06 Kenichi Handa <handa@m17n.org>
342 * m17n-flt.h (mflt_get): Extern it.
344 * m17n-flt.c (run_stages): Call positioning only if
345 font->get_metric is non-NULL.
346 (CHECK_FLT_STAGES): Fix typo.
347 (mflt_get): New function.
349 * font-flt.c (mfont__flt_run): Improve debug info printing.
351 2007-09-04 Kenichi Handa <handa@m17n.org>
353 * m17n-flt.c (MFontLayoutTable): Delete this type.
354 (struct _MFLT): New member mdb and coverage.
355 (list_flt): Set flt->mdb.
356 (load_generator): Argument and return value changed. Caller
358 (get_font_layout_table): Delete this function.
359 (run_stages): Argument changed. Caller changed.
360 (CHECK_FLT_STAGES): New macro.
361 (mfont__flt_encode_char): Argument changed.
362 (mflt_find): Likewise.
363 (mflt_coverage): New function.
364 (mflt_run): Argument changed.
365 (mdebug_dump_flt): Likewise.
367 * m17n-flt.h (mflt_coverage): Extern it.
368 (mflt_find): Prototype adjusted.
370 2007-09-03 Kenichi Handa <handa@m17n.org>
372 * internal.h (MTABLE_CALLOC_SAFE, MSTRUCT_CALLOC_SAFE): New macros.
374 * database.c (mdatabase__props): New function.
376 * database.h (mdatabase__props): Extern it.
378 * m17n-flt.h (struct _MFLTGlyphString): Delete user_data, add
380 (struct _MFLTFont): Add suitable_p.
381 (mflt_find): Extern it.
383 * m17n-flt.c: Include "database.h".
384 (struct _MFLT): New struct.
385 (list_flt): New function.
386 (load_flt): Don't update flt_list.
387 (get_font_layout_table): Use flt_list.
388 (m17n_init_flt): Don't initialize flt_list.
389 (m17n_fini_flt): Adjusted for the change of flt_list.
390 (mflt_find): New function.
391 (mflt_run): Fix debug printing.
393 2007-08-23 Kenichi Handa <handa@m17n.org>
395 * m17n-flt.c (run_otf): Remove #ifdef HAVE_OTF and #endi.
396 (run_stages): Print separator in encoded string as "|".
398 2007-08-23 Kenichi Handa <handa@m17n.org>
400 * font-flt.c (mfont__flt_run): Don't calculate a glyph metric if
401 the glyph is already handled by OTF.
403 2007-08-21 Kenichi Handa <handa@m17n.org>
405 * font-ft.c (ft_check_capability): Check cap->script_tag at first.
407 2007-08-20 Kenichi Handa <handa@m17n.org>
409 * font-flt.c (mfont__flt_run): Get glyph metrics before printing
412 2007-08-17 Kenichi Handa <handa@m17n.org>
414 * m17n-flt.h (struct _MFLTGlyphString): Member pointer renamed to
416 (MFLTOtfSpec): Renamed from MFLT_OTF_Spec.
417 (MFLTFont): Prototype of the member drive_otf adjusted.
419 * m17n-flt.c (run_stages): Fix handling of padding.
421 * font-ft.c (get_glyph_metric): New function.
422 (DEVICE_DELTA): Return 26.6 fixed point value.
423 (adjust_anchor): Likewise.
424 (mfont__ft_drive_otf): Use get_glyph_metric.
426 * font-flt.c (mfont__flt_run): Pay attention to padding on
429 2007-08-16 Kenichi Handa <handa@m17n.org>
431 * m17n-flt.c (run_stages): Fix typo.
433 * font-ft.c (adjust_anchor): Argument changed. Calculte based on
435 (mfont__ft_drive_otf): Don't call OTF_check_features for GPOS.
436 Adjusted for the argument change of adjust_anchor. Calculte based
439 2007-08-15 Kenichi Handa <handa@m17n.org>
441 * charset.c (mcharset__load_from_database): Set mdebug_flag
442 instead of mdebug_mask.
444 * coding.c (mcoding__load_from_database): Set mdebug_flag instead
447 * database.c (load_database): Set mdebug_flag instead of
449 (mdatabase__load_for_keys): Likewise.
451 * draw.c: Include "internal-flt.h".
452 (dump_combining_code): Don't subtract 128 from combining code
455 * font-flt.c: Include "internal-flt.h". Set mdebug_flag instead
457 (run_rule): Print debug info only when MDEBUG_FLAG is greater than
459 (run_cond): Likewise.
461 (run_command): Likewise.
462 (mfont__flt_run): Change format of debug info.
464 * font-ft.c: Include "internal-flt.h".
465 Set mdebug_flag instead of mdebug_mask.
466 (mfont__ft_drive_otf): Fix arg to OTF_check_features.
468 * input.c: Set mdebug_flag instead of mdebug_mask.
469 (shift_state): New MDEBUG_FLAG macro.
470 (preedit_commit): Likewise.
473 * internal-flt.h: New file.
475 * internal-gui.h (MAKE_COMBINING_CODE, COMBINING_CODE_OFF_Y)
476 (COMBINING_CODE_OFF_X, COMBINING_CODE_BASE_X)
477 (COMBINING_CODE_BASE_Y, COMBINING_CODE_ADD_X)
478 (COMBINING_CODE_ADD_Y, MAKE_COMBINING_CODE_BY_CLASS)
479 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
480 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P): Move
481 these macros to internal-flt.h.
483 * internal.h (M17N_OBJECT_ADD_ARRAY): Adjusted for the change of
485 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Likewise.
486 (enum MDebugMaskBit): Delete this enum.
487 (enum MDebugFlag): New enum.
488 (mdebug__flag): Don't extern it.
489 (mdebug__flags): Extern it.
490 (MDEBUG_FLAG): New macro.
491 (MDEBUG_PRINT0): Use the macro MDEBUG_FLAG.
492 (MDEBUG_DUMP, MDEBUG_PUSH_TIME, MDEBUG_POP_TIME)
493 (MDEBUG_PRINT_TIME): Likewise.
495 * m17n-X.c (xfont_open): Set mdebug_flag instead of mdebug_mask.
496 (xfont_list): Likewise.
498 * m17n-core.c (mdebug__flag): Delete this variable.
499 (mdebug__flags): New variable.
500 (SET_DEBUG_FLAG): Make it a function.
501 (m17n_init_core): Set mdebug_flag instead of mdebug_mask.
502 (m17n_fini_core): Likewise.
504 * m17n-gui.c (m17n_init_win): Set mdebug_flag instead of mdebug_mask.
505 (m17n_fini_win): Likewise.
507 * m17n-misc.h (enum MErrorCode): Add MERROR_FLT.
509 * m17n.c (m17n_init): Set mdebug_flag instead of mdebug_mask.
510 (m17n_fini): Likewise.
512 * symbol.c (msymbol__free_table): Adjusted for the change of
515 * Makefile.am (BASICBUILDS): Add libm17n-flt.la.
516 (BASICHEADERS): Add m17n-flt.h.
517 (FLT_SOURCES): New variable.
518 (libm17n_flt_la_SOURCES, libm17n_flt_la_LIBADD)
519 (libm17n_flt_la_LDFLAGS): Likewise.
521 * m17n-flt.h: New file.
523 * m17n-flt.c: New file created by modifying font-flt.c.
525 2007-07-13 Kenichi Handa <handa@m17n.org>
527 * Version 1.4.0 released.
529 2007-07-12 Kenichi Handa <handa@m17n.org>
531 * input.c: Fix doxygen @ref commands.
533 2007-07-10 Kenichi Handa <handa@m17n.org>
535 * m17n-core.h (M17NFunc): Fix typo of Doxygen directive.
537 2007-07-09 Kenichi Handa <handa@m17n.org>
539 * m17n-core.h (M17N_BEGIN_HEADER, M17N_END_HEADER): New macros.
541 * m17n.h: Include m17n-core.h if not yet done. Use macros
542 M17N_BEGIN_HEADER and M17N_END_HEADER.
544 * m17n-gui.h: Likewise.
546 * m17n-misc.h: Likewise.
548 2007-06-13 Kenichi Handa <handa@m17n.org>
550 * font-flt.c (load_command): Prepend "^" in the regular expression.
552 2007-06-11 Kenichi Handa <handa@m17n.org>
554 * language.c (mlanguage_name_list): Fix previous change.
556 * coding.c (mcoding__load_from_database): Add aliases in
557 coding_definition_list.
559 2007-06-10 Kenichi Handa <handa@m17n.org>
561 * language.c (mlanguage_name_list): Fix previous change.
563 2007-06-08 Kenichi Handa <handa@m17n.org>
565 * input.c (update_candidate): Copy candidate_list earlier.
566 (re_init_ic): Provide pseudo initialize state if none.
568 2007-06-05 Kenichi Handa <handa@m17n.org>
570 * input.c (preedit_insert): Print debug information.
572 * database.c (expand_wildcard_database): New function.
573 (mdatabase_list): Fix handling of wildcard database.
575 * language.c (load_lang_name): New function.
576 (mlang__fini): Cancel the last two changes.
577 (mlanguage_name_list): New arg script and territories. Use
580 * m17n.h (mlangauge_name_list): Adjusted.
582 2007-06-04 Kenichi Handa <handa@m17n.org>
584 * input.c (open_im): Check if the input method has at least one
587 2007-06-01 Kenichi Handa <handa@m17n.org>
589 * input.c (shift_state): Change the format of debug print.
590 (preedit_commit): New arg need_prefix. Caller changed.
591 (update_candidate): Copy candidate_list.
592 (take_action_list): Likewise.
593 (handle_key): Change the format of debug print.
595 * font-flt.c (load_flt): Ignore unknown directives.
597 2007-05-25 Kenichi Handa <handa@m17n.org>
599 * m17n-core.c (mdebug__unregister_object): Small optimization.
601 * database.c (find_file): Merged into get_database_file.
602 (get_database_file): New arg result. Caller changed.
603 (mdatabase__check): Fix the logic.
605 2007-05-24 Kenichi Handa <handa@m17n.org>
607 * database.c (find_database): If unprocessed wildcard database is
608 found, register database filed and recursively call find_database.
609 (free_db_info): Unref db_info->properties.
610 (register_database): New arg properties. Delete code for
611 initializing mdatabase__list.
612 (register_databases_in_files): Argument changed. Caller changed.
613 (mdatabase__update): Don't list files by glob here.
614 (mdatabase_list): If unprocessed wildcard database is found,
615 register database filed and recursively call mdatabase_list.
617 * database.h (enum MDatabaseStatus): New enum
618 MDB_STATUS_AUTO_WILDCARD.
620 * input.c (load_branch): Fix previous change.
621 (update_global_info): If the global database is not found, return -1.
623 2007-05-23 Kenichi Handa <handa@m17n.org>
625 * database.c (Mversion): New variable.
626 (mdatabase__init): Initialize it.
627 (register_database): New arg properties. Caller changed.
628 (register_databases_in_files): Don't check version here.
629 (mdatabase__update): Likewise.
631 * database.h (MDatabaseInfo): New member properties.
633 2007-05-21 Kenichi Handa <handa@m17n.org>
635 * language.c: Include <ctype.h>
636 (mlanguage__info): Use strncasecmp (not memcmp).
637 (mlanguage_name): Downcase language name for backward
640 * input.c (filter): Don't check Mlanguage property of
643 2007-05-18 Kenichi Handa <handa@m17n.org>
645 * language.c (mlanguage_name): Fix it to handle M-text English
648 * input.c (config_command): Set NAME before using it.
649 (load_branch): Try to resolve a map name by variables.
651 2007-05-17 Kenichi Handa <handa@m17n.org>
653 * language.c (mlang__fini): Fix previous change.
655 2007-05-16 Kenichi Handa <handa@m17n.org>
657 * plist.c (free_plist): Cancel the last change.
658 (write_element): Check if PLIST is nested.
659 (mplist__from_plist): Label a plist as nested if appropriate.
660 (mplist__from_alist): Label a plist as nested.
661 (mplist__conc): Check the value of PL before referring it. Label
662 a plist as nested if appropriate.
663 (mplist_copy): Label a plist as nested if appropriate.
664 (mplist_put_func): Return Mnil if KEY is a managing key.
665 (mplist_push): Label a plist as nested if appropriate.
667 * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
670 * language.c (mlang__fini): Unref each element of langname_list.
672 2007-05-14 Kenichi Handa <handa@m17n.org>
674 * language.c: Include <string.h> and <locale.h>.
675 (langname_list): New variable.
676 (load_lang_script_list): Exclude invalid list elements.
677 (mlang__init): Initialize langname_list.
678 (mlang__fini): Unref langname_list.
679 (mlanguage__info): Adjusted for the change of English
680 name (symbol->M-text).
681 (mlanguage_name): Label it as obsolete.
682 (mlanguage_name_list): New function.
684 * m17n.h (mlanguage_name_list): Extern it.
686 * locale.c (make_locale): Fix setting of members of locale.
688 * plist.c (free_plist): Unref also nested plist.
690 2007-05-11 Kenichi Handa <handa@m17n.org>
692 * coding.c (mconv_reset_converter): Set internal->used to 0.
694 2007-05-08 Kenichi Handa <handa@m17n.org>
696 * input.c (check_description): Force copying the translated text.
698 2007-05-02 Kenichi Handa <handa@m17n.org>
700 * input.c (minput_save_config): Unref unnecessary plist. Use
701 free_im_list to free im_config_list.
703 2007-04-20 Kenichi Handa <handa@m17n.org>
705 * input.c (config_command): Fix previous change again.
706 (config_variable): Likewise.
707 (minput_config_command): Fix for the case of setting back to
709 (minput_config_variable): Likewise.
710 (minput_save_config): Include nil as documentation of customized
713 2007-04-05 Kenichi Handa <handa@m17n.org>
715 * input.c (config_command): Fix previous change.
716 (config_variable): Likewise.
718 * plist.c (mplist_get_func): Fix for backward compatiblity.
720 2007-04-04 Kenichi Handa <handa@m17n.org>
722 * input.c (minput_get_command, minput_config_command): Fix example
725 2007-03-29 Kenichi Handa <handa@m17n.org>
727 These changes are to avoid unsafe casting of a function pointer.
729 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
730 (struct MFace): New member hook.
732 * face.c (serialize_face): Adjusted for the change of MFace.
733 (deserialize_face): Likewise.
734 (mface__init): Likewise. Use msymbol_put_func.
735 (mface__realize): Adjusted for the change of MFace. Avoid
737 (mface_get_prop): Adjusted for the change of MFace.
738 (mface_put_prop): Likewise.
739 (mface_get_hook): New function.
740 (mface_put_hook): New function.
741 (mface_update): Adjusted for the change of MFace.
743 * input-gui.c (win_callback): Use mplsit_get_func.
744 (minput__win_init): Use mplsit_put_func.
746 * input.c (take_action_list): Use mplist_get_func.
747 (init_ic_info): Likewise.
748 (fini_ic_info): Likewise.
749 (minput_callback): Likewise.
750 (minput__init): Use mplist_put_func.
752 * language.c (mlang__init): Use msymbol_put_func.
754 * m17n-core.h (M17NFunc): New function type.
755 (M17N_FUNC): New macro.
756 (msymbol_put_func, msymbol_get_func): Extern them.
757 (mplist_put_func, mplist_get_func): Extern them.
759 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
761 * m17n-gui.c (mframe): Add a proper casting.
763 * plist.h (struct MPlist): Make the member val a union.
764 (MPLIST_VAL): Adjusted for the above change.
765 (MPLIST_FUNC): New macro.
766 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
768 * plist.c (mplist_put_func, mplist_get_func): New functions.
770 * symbol.c (msymbol__fini): Use MPLIST_VAL.
771 (msymbol_put_func, msymbol_get_func): New functions.
773 * textprop.c (mtext_serialize): Use msymbol_get_func.
774 (mtext_deserialize): Likewise.
776 2007-03-28 Kenichi Handa <handa@m17n.org>
778 * input.c (get_candidate_list): Avoid unnecessary unref.
780 2007-03-23 Kenichi Handa <handa@m17n.org>
782 * database.c (mdatabase__update): Unref plist at the tail.
784 2007-03-21 Kenichi Handa <handa@m17n.org>
786 * input.c (update_custom_info): Fix for the case "name == Mnil &&
788 (config_command): Fix for the case that configuration is
790 (config_variable): Likewise.
791 (minput_config_command): If keyseqlist is an empty list, cancel
793 (minput_config_variable) If value is an empty list, cancel the
795 (minput_save_config): Handle cancellation of config and customize
798 2007-03-15 Kenichi Handa <handa@m17n.org>
800 * input.c (minput_config_variable): Check custom->vars (not
803 2007-03-01 Kenichi Handa <handa@m17n.org>
805 * input.c (reload_im_info): Setup cmds, vars, and title of
807 (check_variable_value): Fix the return value.
809 * database.c (mdatabase__check): If necessary, update database and
812 2007-02-28 Kenichi Handa <handa@m17n.org>
814 * database.c (get_dir_info): Set dir_info->status to
816 (check_version): New function.
817 (register_database): Don't call find_database.
818 (register_databases_in_files): Don't register a database of
820 (mdatabase__update): Likewise. Avoid unnecessary scanning.
822 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
823 and MDB_STATUS_OUTDATED.
825 * font.h (struct MFont): Types of members type, source, and
826 spacing changed to unsigned.
828 * internal-gui.h (struct): Types of members category and type
831 * internal.h (struct MText): Types of members format and coverage
834 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
835 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
837 2007-02-23 Kenichi Handa <handa@m17n.org>
839 * input.c (Mpop): New variable.
840 (fully_initialize): Initialize Mpop.
841 (parse_action_list): Handle Mpop.
842 (take_action_list): Likewise.
843 (handle_key): When a key is unhandled, shift to the initial state
844 only if the current state has no branch action.
846 2007-02-12 Kenichi Handa <handa@m17n.org>
848 * input.c (get_preceding_char): Unref mt if necessary.
849 (get_following_char): Likewise.
850 (parse_action_list): Fix handling of `insert' action as
852 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
853 (take_action_list): Check invalid candidate list.
855 2007-02-06 Kenichi Handa <handa@m17n.org>
857 * input.c (integer_value): Check also ic->produced for @-N.
859 2007-01-26 Kenichi Handa <handa@m17n.org>
861 * database.c (mdatabase__update): Check mdatabase__dir_list from
864 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
866 2007-01-12 Kenichi Handa <handa@m17n.org>
868 * input.c (handle_key): Handle a branch action of the initial
871 2007-01-10 Kenichi Handa <handa@m17n.org>
873 * m17n-gd.c (gd_render): Delete superfluous line.
875 2006-12-26 Kenichi Handa <handa@m17n.org>
877 * m17n.h (minput_callback): Extern it.
879 * input.h (minput__callback): Delte extern.
881 * input.c (get_surrounding_text): Adjusted for the change of
882 minput__callback to minput_callback.
883 (delete_surrounding_text): Likewise.
884 (minput_create_ic): Likewise.
885 (minput_destroy_ic): Likewise.
886 (minput_filter): Likewise.
887 (minput_set_spot): Likewise.
888 (minput_toggle): Likewise.
889 (minput_reset_ic): Likewise.
891 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
892 and ic->candidate_to to 0.
893 (minput_callback): Renamed from minput__callback.
895 * input-gui.c (win_callback): Adjusted for the change of
896 minput__callback to minput_callback.
898 2006-12-15 Kenichi Handa <handa@m17n.org>
900 * font-ft.c (ft_add_font): Fix typo.
902 2006-12-06 Kenichi Handa <handa@m17n.org>
904 * Version 1.3.4 released.
906 2006-11-16 Kenichi Handa <handa@m17n.org>
908 * input.c (parse_action_list): Allow (undo 0).
909 (adjust_markers): New function.
910 (preedit_insert, preedit_delete): Call adjust_markers.
911 (preedit_replace): New function.
912 (update_candidate): Call preedit_replace instead of preedit_insert
914 (filter): When ic_info->commit_key_head is nonzero, shift input
915 event keys even if there's no committed text.
917 2006-11-10 Kenichi Handa <handa@m17n.org>
919 * input.h (MInputContextInfo): New member commit_key_head.
921 * input.c (preedit_commit): Update ic_info->commit_key_head.
922 (take_action_list): Reset ic_info->commit_key_head on Mundo.
923 (filter): When committed, shift keys by ic_info->commit_key_head.
925 2006-10-30 Kenichi Handa <handa@m17n.org>
927 * input.c (preedit_delete): Fix typo.
928 (take_action_list): Print more debugging information. Allow
929 variable in arg of 'select' and `pushback'.
931 * database.c (gen_database_name): Don't put extra space.
932 (load_database): Print debugging information.
933 (register_databases_in_files): New arg headlen. Callers changed.
934 (mdatabase__load_for_keys): Shorten debugging information.
935 (mdatabase_load): Don't print debugging information here.
937 2006-10-27 Kenichi Handa <handa@m17n.org>
939 * input.c (marker_code): New arg surrounding. Callers changed.
940 (surrounding_pos): Check if name[0] == '@'.
941 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
942 (take_action_list): Likewise.
943 (get_preceding_char): If POS is zero, always call
944 get_surrounding_text.
946 2006-10-19 Kenichi Handa <handa@m17n.org>
948 * input.c (load_variables): Fix setting of `global'.
950 2006-10-16 Kenichi Handa <handa@m17n.org>
952 * draw.c (draw_background): Be sure to set *to_x.
953 (render_glyph_string): If from == to, just return.
955 2006-10-18 Kenichi Handa <handa@m17n.org>
957 * database.c (get_dir_info): Return NULL if the directory name is
959 (register_databases_in_files): Call register_database with
961 (mdatabase__update): Fix logic. Call register_database with
963 (mdatabase_define): Call register_database with
966 * input.c (delete_surrounding_text): Be sure to set members
967 preceding_text and following_text to NULL.
968 (shift_state): Save variable values in ic_info->vars_saved.
969 (preedit_commit): Don't print debug information here. Don't
970 change ic_info->keys here.
971 (get_candidate_list): Don't ref plist.
972 (take_action_list): Don't unref return value of
973 get_candidate_list. For undo, reset ic->produced and recover
974 ic_info->vars. Be sure to set ic->candidate_list to NULL after
976 (init_ic_info): Set ic_info->vars_saved.
977 (fini_ic_info): Unref ic_info->vars_saved.
978 (re_init_ic): Be sure to set ic->candidate_list to NULL after
980 (filter): Be sure to set members preceding_text and following_text
981 to NULL. Print debug information about produced text. Delete
982 processed keys from ic_info->keys.
984 * input.h (MInputContextInfo): New member vars_saved.
986 2006-10-16 Kenichi Handa <handa@m17n.org>
988 * database.c (mdatabase__update): Fix the way to get db_info.
990 2006-10-02 Kenichi Handa <handa@m17n.org>
992 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
993 `size' changed to 24.
995 * font.c (xlfd_unparse_name): Adjusted for the change of
997 (font_score): Likewise.
998 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
1000 * m17n-X.c (MFontX, _MFontX): Deleted.
1001 (SET_SIZE, HAVE_SIZE): Deleted.
1002 (free_display_info): Adjusted for the change of
1003 disp_info->font_list format.
1004 (xfont_registry_list): Likewise.
1005 (xfont_open): Likewise.
1006 (xfont_list): Likewise.
1007 (xfont_encode_char): Ignore size to find a realized font.
1008 (MRealizedFontXft): Change the order of members to make it
1009 compatible with MRealizedFontFT.
1011 2006-09-27 Kenichi Handa <handa@m17n.org>
1013 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
1014 (mfont_close): Add comments.
1016 * mtext-lbrk.c (mtext_line_break): Add comment.
1018 2006-09-26 Kenichi Handa <handa@m17n.org>
1020 * input.c (minput_get_description): Handle description about
1021 inclusion-only input methods.
1023 2006-09-21 Kenichi Handa <handa@m17n.org>
1025 * input.c (M_gettext): New variable.
1026 (fully_initialize): Initialize M_gettext.
1027 (check_description): New function.
1028 (load_commands): Call check_description.
1029 (config_all_commands): Be sure to unref pl.
1030 (load_variables): Call check_description.
1031 (config_all_variables): Be sure to unref pl.
1032 (load_im_info): Call check_description.
1034 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
1036 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
1037 and bind_textdomain_codeset.
1039 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
1041 2006-09-15 Kenichi Handa <handa@m17n.org>
1043 * input.c (reload_im_info): Update custom and global info.
1044 (init_ic_info): Fix previous change.
1046 2006-09-14 Kenichi Handa <handa@m17n.org>
1048 * database.c: Include <libgen.h>.
1049 (mdatabase__lock): Make a directory if necessary.
1051 * input.c (resolve_command): Adjusted for the format change of
1052 configured_cmds member.
1053 (load_commands, load_variables): Fix for errornous data handling.
1054 (config_command, config_variable): New function.
1055 (config_all_commands, config_all_variables): Renamed from
1056 config_commands and config_variables. Utilize the above function.
1057 (check_variable_value): Argument changed. Callers changed.
1058 (load_im_info): Call config_all_commands and config_all_variables.
1059 (init_ic_info): Adjusted for the format change of configured_vars
1061 (minput__init): Initialize Mcustomized, Mconfigured, and
1063 (Mcustomized, Mconfigured, Minherited): New variables.
1064 (minput_get_command): Be sure to return NULL if an input method
1065 use no local command.
1066 (minput_get_variable): Be sure to return NULL if an input method
1067 use no local variable.
1068 (minput_config_command, minput_config_variable)
1069 (minput_save_config): Adjusted for the format change of
1070 configured_cmds and configured_vars members.
1072 * plist.c (write_element): Delete superfluous ':'.
1074 2006-09-13 Kenichi Handa <handa@m17n.org>
1076 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
1077 (minput_config_file): Extern it.
1079 * draw.c (Minherited): Declaration moved to input.c.
1080 (mdraw__init): Don't initialize Minherited here.
1082 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
1084 2006-09-07 Kenichi Handa <handa@m17n.org>
1086 * textprop.c (mtext_serialize): Call mplist__serialize with the
1089 * plist.h (mplist__serialize): Prototype adjusted.
1090 (mplist__assq): Extern it.
1092 * plist.c: Include <ctype.h>
1093 (PUTC, PUTS): New macros.
1094 (write_symbol): New function.
1095 (write_element): New arg indent.
1096 (dump_string, dump_plist_element): Delete them.
1097 (mplist__from_string): New arg pretty.
1098 (mplist__assq): New function.
1099 (mdebug_dump_plist): Use write_element.
1101 * mtext.c (mtext_cat_char): Allocate more memory.
1102 (mdebug_dump_mtext): Don't escal a newline character.
1104 * m17n.h (minput_get_command, minput_get_variable)
1105 (minput_config_command, minput_config_variable)
1106 (minput_save_config): Extern them.
1108 * m17n-core.c: Include <string.h>.
1109 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
1110 use the stream stdout instead of a file of that name.
1112 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
1115 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
1116 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1117 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
1118 (MDEBUG_DUMP): Flush the stream.
1120 * input.h (struct _MInputMethodInfo): Delete member im. New
1121 members mdb, language, name, extra, cmds, configured_cmds,
1122 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
1123 (MInputContextInfo): New member tick.
1125 * input.c: Big change to improve user-side input method
1126 customization. Here, list just public API changes.
1127 (minput_get_commands, minput_get_variables)
1128 (minput_assign_command_keys, minput_set_variable): Label them
1130 (minput_get_command, minput_get_variable)
1131 (minput_config_command, minput_config_variable)
1132 (minput_save_config): New functions.
1134 * database.h (PATH_MAX): Define it if not yet defined.
1135 (PATH_SEPARATOR): Likewise.
1136 (enum MDatabaseStatus): New enum.
1137 (struct MDatabaseInfo): Moved from database.c. New members status,
1138 time, lock_file, and uniq_file.
1139 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
1140 (mdatabase__unlock): Extern them.
1142 * database.c: Include <time.h>.
1143 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
1144 (GEN_PATH): Args changed. Callers changed.
1145 (struct MDatabaseInfo): Moved to database.h.
1146 (struct MDatabase, mdb_list): Deleted.
1147 (mdatabase__list): New var.
1148 (get_database_filename): Deleted. Callers changed to use
1150 (find_file, get_database_file): New files.
1151 (get_dir_info): Initialize new members of MDatabaseInfo.
1152 (find_database): Arg chagnded. Callers changed.
1153 (free_db_info, register_database, register_databases_in_files):
1155 (update_database_list): Deleted.
1156 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
1157 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
1158 (mdatabase__update): New function.
1159 (mdatabase__check): Return value changed.
1160 (mdatabase__file, mdatabase__lock, mdatabase__save)
1161 (mdatabase__unlock): New functions.
1163 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
1165 * input.c (get_surrounding_text): Return -2 when surrounding text
1167 (get_following_char): Likewise.
1168 (get_preceding_char): Likewise.
1169 (minput__callback): Return 0 if there is a callback function,
1172 2006-08-17 Kenichi Handa <handa@m17n.org>
1174 * input.c (reset_ic): Use shift_state to setup the current state.
1176 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
1178 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
1179 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
1180 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
1182 2006-08-02 Kenichi Handa <handa@m17n.org>
1184 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
1186 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
1188 * font-ft.c (ft_encapsulate): Add code for debugging.
1189 (mfont__ft_drive_otf): Be sure to encode character before getting
1192 2006-07-21 Kenichi Handa <handa@m17n.org>
1194 * draw.c (mdraw_text_extents): Fix previous typo.
1196 2006-07-19 Kenichi Handa <handa@m17n.org>
1198 * draw.c (gstring_width): New arg lbearing.
1199 (render_glyph_string): Adjusted for the change of gstring_width.
1200 (mdraw_text_extents): Fix lbearing of ink and line metrics.
1202 * m17n-core.h (Mlanguage): Extern it.
1204 * m17n.h (Mlanguage): Extern deleted.
1206 * mtext.c (mtext__init): Initialize Mlanguage.
1207 (Mlanguage): Declaration moved from locale.c
1209 * locale.c (mlocale__init): Don't initialize Mlanguage here.
1210 (Mlanguage): Declaration moved to mtext.c.
1212 * language.c (mlang__init): Don't initialize Mlanguage here.
1214 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
1216 2006-07-14 Kenichi Handa <handa@m17n.org>
1218 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
1219 (MRealizedFontFT): New member face_encapsulated.
1220 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
1221 (ft_gen_font): New function.
1222 (ft_add_font): Use ft_gen_font.
1223 (ft_list_script): Store lists in ft_script_list.
1224 (ft_check_otf): New arg ft_face. Caller changed.
1225 (ft_check_language): Likewise.
1226 (ft_check_script): Likewise.
1227 (ft_encapsulate, ft_close): New functions.
1228 (mfont__ft_driver): Initialize members encapsulate and close.
1229 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
1231 * font.h (struct MRealizedFont): New member encapsulating.
1232 (struct MFontDriver): New members encapsulate and close.
1234 * font.c (mfont__match_p): If FONT is realized, check capability
1235 by font drivers's check_capability method.
1236 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
1239 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
1240 declarations of foundry and fam local vars.
1241 (xft_driver): Make it static.
1243 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
1244 (mfont_close): Extern them.
1246 * m17n-gd.c (device_open): Don't specify foundry and family of the
1249 2006-07-11 Kenichi Handa <handa@m17n.org>
1251 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
1253 2006-07-13 Kenichi Handa <handa@m17n.org>
1255 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
1257 (ft_check_script): Delete unused var.
1258 (ft_list_capability): Likewise.
1260 * font.c (mfont__get_capability): Setup cap->otf.
1261 (Motf): Make it global.
1262 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
1264 * font.h (MFontCapability): New member otf.
1266 * language.c (mlang__fini): Delete unused vars.
1268 * m17n-gui.h (Motf): Extern it.
1270 * database.c (update_database_list): Delete unused vars.
1272 2006-07-07 Kenichi Handa <handa@m17n.org>
1274 * font-ft.c (DEVICE_DELTA): Fix typo.
1276 2006-07-06 Kenichi Handa <handa@m17n.org>
1278 * fontset.c (mfont__lookup_fontset): Don't ignore family and
1281 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1283 * database.c: Update comments.
1285 2006-07-05 Kenichi Handa <handa@m17n.org>
1287 * database.c (PATH_MAX): Define it if not yet defined.
1288 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
1290 (get_database_filename): Use GEN_PATH.
1291 (get_dir_info): Don't include the last '/' in directory name.
1292 (register_database): New function.
1293 (update_database_list): Use register_database. Search all
1294 directories in mdatabase__dir_list for wildcard databases.
1295 (mdatabase__init): Check "~/.m17n.d".
1297 2006-07-03 Kenichi Handa <handa@m17n.org>
1299 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
1300 push reverse property.
1302 * plist.c (dump_plist_element): Fix previous change.
1304 2006-06-28 Kenichi Handa <handa@m17n.org>
1306 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
1309 * draw.c (MbidiNSM): New variable.
1310 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
1311 attention to bidi type NSM.
1312 (mdraw__init): Initialize MbibiNSM.
1314 * language.c (mscript__char_list): Fix finding a char-list element.
1316 * plist.c (dump_string): Return number of printed characters.
1317 (dump_plist_element): Print elements more compactly.
1319 2006-06-23 Kenichi Handa <handa@m17n.org>
1321 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
1322 (include_HEADERS): Likewise.
1324 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
1326 * language.c: Update documentation.
1328 2006-06-23 Kenichi Handa <handa@m17n.org>
1330 * font-ft.c (struct MFontFT): Delete member lang.
1331 (free_ft_info): Don't unref member lang. Destroy members langset
1333 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
1334 changed. Set members langset and charset.
1335 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
1337 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
1339 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
1340 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
1341 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
1342 characters at first. If it fails, try listing by language names.
1343 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
1344 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
1345 change of MFontCapability.
1346 (ft_list_capability): Likewise. Try listing by languages, then by
1347 scripts. Check OTF at last.
1348 (ft_check_script): New function.
1349 (ft_select): Adjusted for the check of MFontCapability.
1350 (ft_list_family_names): New function.
1351 (ft_check_capability): If cap->script is not Mnil, call
1353 (mfont__ft_driver): Initialize with ft_list_family_names.
1355 * font.h (struct MFontDriver): New member list_fmaily_names.
1356 (struct): Change member "MSymbol *lang" to "MSymbol language".
1358 * font.c: Include "language.h".
1359 (Motf): New variable.
1360 (otf_script_list, load_otf_script_list): Delete it.
1361 (find_script_from_otf_tag): Delete it.
1362 (merge_capability): New function.
1363 (mfont__init): Init Motf.
1364 (mfont__fini): Don't unref otf_script_list.
1365 (free_font_capability): Check cap->script_tag to determine if
1366 OTF-related capability is set.
1367 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
1368 the change of type MFontCapability.
1369 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
1370 and Motf properties.
1371 (mfont_list): Call merge_capability for LANGUAGE arg.
1372 (mfont_list_family_names): New function.
1374 * input-gui.c: Typo in comments fixed.
1376 * input.c: Typo in comments fixed.
1378 * language.h (mlanguage__list): Delete it.
1379 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
1382 * language.c: Include "mtext.h".
1383 (M_script_lang_list): Delete it.
1384 (language_list, script_list): New variables.
1385 (load_lang_script_list, init_language_list, init_script_list): New
1387 (mlang__init): Don't load language database here.
1388 (mlang__fini): Unref language_list and script_list if not NULL.
1389 (mlanguage__list): Delete it.
1390 (mlanguage__info, mscript__info, mscript__char_list)
1391 (mscript__otf_tag, mscript__from_otf_tag): New functions.
1392 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
1393 (mscript_list, mscript_language_list): New functions.
1395 * m17n-gui.h (mfont_list_family_names): Extern it.
1397 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
1398 (mlanguage_text, mscript_list, mscript_language_list): Extern
1401 2006-06-21 Kenichi Handa <handa@m17n.org>
1403 * m17n-X.c (xfont_driver): Initialize with
1404 xfont_list_family_names.
1405 (xfont_list_family_names): New function.
1406 (xft_driver): Initialize with NULL for list_family_names member.
1407 (device_init): Set list_family_names member of xft_driver to that
1408 of mfont__ft_driver.
1410 2006-06-06 Kenichi Handa <handa@m17n.org>
1412 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
1414 2006-03-24 Kenichi Handa <handa@m17n.org>
1416 * font-ft.c (ft_open): Improve debug message.
1418 * fontset.c (mfontset__get_font): Fix for the case that no font in
1419 per_script list is available.
1421 2006-02-06 Kenichi Handa <handa@m17n.org>
1423 * Version 1.3.3 released.
1425 2006-02-22 Kenichi Handa <handa@m17n.org>
1427 * textprop.c: Fix some typos in documentation.
1429 * plist.c: Fix some typos in documentation.
1431 * m17n-core.h: Fix some typos in documentation.
1432 (M17NLIB_PATCH_LEVEL): Updated to 3.
1433 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
1435 * symbol.c: Fix some typos in documentation.
1437 * mtext.c: Fix some typos in documentation.
1439 * input.c: Fix several typos in documentation.
1441 2006-02-06 Kenichi Handa <handa@m17n.org>
1443 * Version 1.3.2 released.
1445 2006-02-03 Kenichi Handa <handa@m17n.org>
1447 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
1448 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
1450 * font.c (xlfd_parse_name): Fix handling of the name "nil".
1452 * draw.c (layout_glyphs): Fix handling left_padding of
1455 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
1457 2006-02-02 Kenichi Handa <handa@m17n.org>
1459 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
1460 if WITH_GUI is true.
1462 2006-01-25 Kenichi Handa <handa@m17n.org>
1464 * input.c (resolve_expression): If the value of PLIST is a plist,
1465 but the first element is not symbol, return 0.
1467 2006-01-17 Kenichi Handa <handa@m17n.org>
1469 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
1470 HAVE_GD is 2 or the greater.
1472 2006-01-16 Kenichi Handa <handa@m17n.org>
1474 * Version 1.3.1 released.
1476 2006-01-16 Kenichi Handa <handa@m17n.org>
1478 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
1479 simulating anti-aliasing.
1481 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
1482 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
1484 2006-01-12 Kenichi Handa <handa@m17n.org>
1486 * input.c (get_surrounding_text): Always pop ic->plist.
1487 (reset_ic): Don't reset ic->plist.
1489 2006-01-10 Kenichi Handa <handa@m17n.org>
1491 * input.c (preedit_commit): For debugging, print only commiting
1492 charactes. Don't set ic->candidate_show to 0.
1493 (handle_key): Don't run branch-actions just by shifting to the
1495 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
1496 Reset vars and plist.
1498 2006-01-07 Kenichi Handa <handa@m17n.org>
1500 * input.c (load_branch): Confirm that maps is not NULL.
1502 2006-01-05 Kenichi Handa <handa@m17n.org>
1504 * input-gui.c (win_filter): Try to convert arg to key only when
1507 * plist.c (read_integer_element): If '#' and '-' are followed by
1508 non-integer-constituent, read them as a part of a symbol.
1509 (read_symbol_element): New arg C.
1510 (read_element): Adjust args to read_symbol_element.
1512 * input.c (load_macros): On overwriting a macro, free the old
1514 (minput__init): Store Mmap in load_im_info_keys.
1515 (minput_get_title_icon): If the input method has no title, be sure
1517 (minput_get_description): If the input method has no description,
1518 be sure to return NULL.
1519 (minput_get_variables): Fix documentation.
1520 (handle_key): Pay attention to the case that key is Mnil.
1521 (filter): Likewise. Fix handling of such symbol as S-A.
1523 2005-12-22 Kenichi Handa <handa@m17n.org>
1525 * Version 1.3.0 released.
1527 2005-12-22 Kenichi Handa <handa@m17n.org>
1529 * font-ft.c (ft_list): If the specified font has no property,
1532 2005-12-20 Kenichi Handa <handa@m17n.org>
1534 * character.c (mchar_get_prop): Check char_prop_list.
1535 (mchar_put_prop, mchar_get_prop_table): Likewise.
1537 2005-12-18 Kenichi Handa <handa@m17n.org>
1539 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
1540 file name sans language.
1542 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
1544 * input.c: Fix typo in comments.
1546 2005-12-14 Kenichi Handa <handa@m17n.org>
1548 * input.c (minput_get_title_icon): Check the default icon for the
1551 2005-12-13 Kenichi Handa <handa@m17n.org>
1553 * input.c (Mless_equal, Mgreater_equal): New variables.
1554 (parse_expression, resolve_expression, parse_action_list)
1555 (take_action_list): Handle the aboves.
1556 (filter): Treat key S-X as X.
1557 (minput__init): Initialize Mless_equal and Mgreater_equal.
1558 (minput_get_title_icon): New function.
1560 * m17n.h (minput_get_title_icon): Extern it.
1562 * database.c (get_database_filename): Return a filename instead of
1564 (load_database): Adjusted for the above change.
1565 (mdatabase__load_for_keys): Likewise.
1566 (mdatabase__find_file): New function.
1568 * database.h (mdatabase__find_file): Extern it.
1570 * font.h (mfont__resize): Delete extern.
1572 * font.c (mfont__list): Check resize ratio.
1573 (mfont__resize): Delete it.
1574 (mfont_resize_ratio): Include the code of mfont__resize.
1576 * font-ft.c (ft_open): Check resize ratio.
1578 * m17n-X.c (xfont_open): Check resize ratio.
1579 (xft_open): Likewise.
1581 2005-12-07 Kenichi Handa <handa@m17n.org>
1583 * input.c (take_action_list): If take_action_list return -1,
1585 (handle_key): Likewise.
1587 * face.c (mface__for_chars): When font is specified and layouter
1588 is found for it, if the layouter doesn't support one of a
1589 character, use a face sans layouter for it.
1591 2005-12-06 Kenichi Handa <handa@m17n.org>
1593 * fontset.c (mfont__lookup_fontset): If only a fallback font is
1594 found, don't use it for more than one character.
1596 2005-12-05 Kenichi Handa <handa@m17n.org>
1598 * face.c (mface__realize): Set rfont->layouter to Mnil.
1599 (mface__for_chars): Fix handling of layouter.
1601 * character.h (mchar__define_prop): Extern it.
1603 * database.c (update_database_list): Call mchar__define_prop if
1606 * character.c (mchar__init): Don't call mchar_define_property.
1607 Instead just initialize property keys.
1608 (mchar__fini): Free char_prop_list only if it's not NULL.
1609 (mchar__define_prop): New function.
1610 (mchar_define_property): Call mchar__define_prop.
1612 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
1615 2005-12-02 Kenichi Handa <handa@m17n.org>
1617 * language.c (mlang__init): Handle extra chars.
1619 * m17n-gui.h (mfont_check): Adjust prototype.
1621 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
1622 (xfont_check_capability): New function.
1623 (xft_driver): Specify xft_check_capability.
1624 (xft_check_capability): New function.
1626 * font-ft.c (M0_3): Delete it.
1628 (ft_get_charmaps): Refer to M0.
1629 (fc_parse_pattern): Fix previous change.
1630 (ft_list_language): Check also extra chars.
1631 (ft_check_otf): Define it even if HAVE_OTF is undef.
1632 (ft_check_lang): Check the result of FcLangSetHasLang against
1633 FcLangDifferentLang. Check also extra chars.
1634 (ft_list_capability): Delete ifdef HAVE_OTF.
1635 (ft_select): Likewise.
1636 (ft_open): Improve debug information.
1637 (ft_check_capability): New function.
1638 (mfont__ft_driver): Specify ft_check_capability.
1639 (mfont__ft_init): Initialize M0.
1641 * fontset.c (get_font_from_group): New function.
1642 (mfontset__get_font): New function.
1644 * fontset.h (mfontset__get_font): Extern it.
1646 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
1647 (mfont__fini): Delete ifdef HAVE_OTF.
1648 (free_font_capability): Likewise.
1649 (mfont__get_capability): Likewise.
1650 (mfont__check_capability): New function.
1651 (mfont_check): Change the order of arguments. Use
1654 * font.h (struct MFontDriver): New member check_capability.
1655 (MFontCapability): Delete ifdef HAVE_OTF.
1656 (mfont__check_capability): Extern it.
1658 * face.c (mface__realize): Fix handling of FONT arg.
1659 (mface__for_chars): Fix handling of explicitly specified font.
1661 2005-11-25 Kenichi Handa <handa@m17n.org>
1663 * font-flt.c (run_command): Print debug info for
1666 * draw.c (layout_glyphs): Fix handling of left/right_padding.
1668 * face.c (mface__for_chars): Check rfont before accessing the
1671 2005-11-21 Kenichi Handa <handa@m17n.org>
1673 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
1676 * fontset.c (fontset_table): New variable.
1677 (free_fontset): Call M17N_OBJECT_UNREGISTER.
1678 (mfont__fontset_init): Add fontset_table as an object array.
1679 (mfont__realize_fontset): Ref FONTSET.
1680 (mfont__free_realized_fontset): Unref REALIZED->fontset.
1681 (mfontset): Call M17N_OBJECT_REGISTER.
1682 (mfontset_copy): Likewise.
1684 * input.c (handle_key): For debugging, print information about
1686 (filter): Add an alias for Meta and Alt modifiers.
1687 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
1689 (minput__init): Initialize them.
1690 (parse_expression): New function.
1691 (resolve_expression): New function.
1692 (parse_action_list): Handle expressions by parse_expression.
1693 (take_action_list): Handle expressions by resolve_expression.
1694 (parse_nested_list_value): Fix previous change.
1695 (resolve_command): Fix handling of the return value of
1698 2005-11-18 Kenichi Handa <handa@m17n.org>
1700 * font-ft.c (ft_check_otf, otf_script_list): Define only when
1701 HAVE_OTF is defined.
1702 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
1704 (ft_select): Likewise.
1706 * font.c (mfont_list): Fix for the case that FONT is NULL.
1707 (OTF_tag): Delete it.
1708 (load_otf_script_list): Define only when HAVE_OTF is defined.
1709 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
1712 * draw.c (truncate_gstring): Be sure to truncate at
1713 glapheme-cluster boundary.
1715 2005-11-11 Kenichi Handa <handa@m17n.org>
1717 * input.c (delete_surrounding_text): Clear cache if necessary.
1719 2005-11-09 Kenichi Handa <handa@m17n.org>
1721 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
1722 glyph prev is also supported by the current flt.
1724 2005-11-08 Kenichi Handa <handa@m17n.org>
1726 * m17n-X.c (xft_render): Cancel previous change.
1728 2005-11-07 Kenichi Handa <handa@m17n.org>
1730 * input.c: Include <stdlib.h>.
1731 (get_surrounding_text, delete_surrounding_text)
1732 (get_preceding_char, get_following_char): New functions.
1733 (integer_value): New arg surrounding. If it is nonzero, try to
1734 get a surrounding character. Callers changed.
1735 (take_action_list): Check `value' before setting an element.
1736 (destroy_ic): Unref ic_info->preceding_text and
1737 ic_info->following_text.
1738 (minput__init): Initialize Minput_get_surrounding_text and
1739 Minput_delete_surrounding_text.
1740 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
1742 (filter): Unref ic_info->preceding_text and
1743 ic_info->following_text.
1745 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
1748 * input.h (MInputContextInfo): New members preceding_text and
1751 2005-11-04 Kenichi Handa <handa@m17n.org>
1753 * input.c (parse_nested_list_value): Fix handling of the global
1755 (get_nested_list): Get global definitions by load_partial_im_info.
1756 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
1757 MInputCandidatesChanged.
1758 (take_action_list): Likewise.
1759 (reset_ic): Likewise.
1760 (create_ic): Don't pay special attention to
1761 Mcandidates_group_size.
1762 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
1763 (minput_set_variable): Get a definition of varible by
1764 mplist_find_by_value, not mplist_get.
1766 * m17n.h (enum MInputCandidatesChanged): New enum.
1768 2005-11-01 Kenichi Handa <handa@m17n.org>
1770 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
1772 (mwin__destroy_window): If xft_draw's drawable is win, change it
1773 to device->drawable before destroying win.
1775 2005-10-31 Kenichi Handa <handa@m17n.org>
1777 * input.c (load_im_info): Fix adding of state.
1779 * m17n-core.c (m17n_fini_core): Fix reporting of module
1782 * m17n.c (m17n_fini): Fix reporting of module finalization.
1784 * m17n-gui.c (m17n_init_win): Fix reporting of module
1787 2005-10-29 Kenichi Handa <handa@m17n.org>
1789 * input.c (get_candidate_list): Fix the timing of referring plist.
1791 2005-10-28 Kenichi Handa <handa@m17n.org>
1793 * input.c (load_branch): Ignore an undefined map name.
1794 (load_im_info): Set im_info->title from `name' only if it's not
1796 (shift_state): Always update ic->status.
1797 (adjust_candidates): Renamed from adjust_candidate_command.
1798 Argument changed. Caller changed.
1799 (get_candidate_list, regularize_action): New functions.
1800 (take_action_list): Use them. On handling Munhandle, don't set
1802 (handle_key): If KEY is not handled by MAP, and MAP has
1803 branch_actions, perform them.
1805 * database.c (mdatabase__fini): Free dir_info->filename;
1807 2005-10-20 Kenichi Handa <handa@m17n.org>
1809 * input.c (marker_code): Accept '@@'.
1810 (integer_value): Handle '@@'.
1811 (parse_action_list): Accept a symbol argument.
1812 (take_action_list): Resolve the symbol argument. Handle the
1815 2005-10-18 Kenichi Handa <handa@m17n.org>
1817 * input.c: Include "charset.h".
1818 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
1820 (MIMState): New member (M17NObject control).
1821 (lookup_nested_list, set_nested_list, parse_nested_list_value)
1822 (get_nested_list, resolve_variable): New functions.
1823 (integer_value): New arg (MPlist **value). Set it to the plist
1824 element containing the value.
1825 (resolve_command): New function.
1826 (load_translation): New arg (MPlist *map_actions).
1827 (load_branch): New args language and name. If `keylist' is a
1828 symbol, resolved that as a command name.
1829 (free_map): New arg top. Free map->map_actions only if top is
1831 (free_state): New function.
1832 (load_state): New arg name.
1833 (im_info_list): New variable.
1834 (free_im_info, get_im_info_by_tags): New functions.
1835 (load_im_info): Arg key changed to plist. Handle `include'.
1836 Return (MInputMethodInfo *).
1837 (preedit_commit): Ref ic->candidate_list.
1838 (get_select_charset, adjust_candidate_command): New functions.
1839 (take_action_list): Handle `include'. Adjust candidate action
1840 properly. Handle control variables `candidates-charset' and
1841 `candidates-group-size'.
1842 (open_im): Use get_im_info.
1843 (create_ic): Get global variables.
1844 (load_partial_im_info): New function.
1845 (get_im_info): New function.
1846 (check_command_keyseq, check_command_list, check_variable_list):
1848 (minput__init): Don't handle M_database_hook and Mdetail_text.
1849 Initialize M_candidates, Mcandidates_group_size,
1850 Mcandidates_charset.
1851 (parse_variable_list, get_variable_list, parse_command_list)
1852 (get_command_list): Delete them.
1853 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
1854 (minput__fini): Simply unref command_list and variable_list.
1855 (minput_get_description): Adjusted for the new form of description.
1856 (minput_get_commands): Use get_nested_list.
1857 (minput_assign_command_keys): Likewise.
1858 (minput_get_variables, minput_set_variable): Likewise.
1860 * input.h (MInputMethodInfo): New members im and maps.
1862 * database.h (M_database_hook): Delete extern.
1863 (MDatabaseHookFunc): Delete extern.
1864 (mdatabase__check): Extern it.
1866 * database.c: Include <glob.h>.
1867 (MAX_TIME): New macro.
1868 (Masterisk): New variable.
1869 (get_database_stream): Argument changed to (MDatabaseInfo *).
1871 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
1872 (find_database): New function.
1873 (update_database_list): New function.
1874 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
1875 calling update_database_list.
1876 (mdatabase__check): New function.
1877 (mdatabase_find): Use update_database and find_database. Don't
1878 handle MDatabaseHookFunc.
1879 (mdatabase_list): Call update_database at first.
1880 (mdatabase_define): Adjusted for the change of mdb->extra_info.
1881 (MDatabaseList): New type.
1883 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
1885 * m17n.h (Mdetail_text): Delete extern.
1887 * m17n-core.h (mplist_conc): Delete extern.
1889 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
1891 (mplist_conc): Renamed to mplist__conc.
1892 (mplist__pop_unref): New function.
1894 2005-10-14 Kenichi Handa <handa@m17n.org>
1896 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
1898 (read_element): If keys is an empty plist, return any element
1900 (dump_plist_element): Check if plist is nested.
1901 (mplist_conc): Always ref tail.
1902 (mplist_set): If key is a managing key, ref val in advance.
1904 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
1905 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
1906 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
1909 * fontset.c (free_fontset): Unref fontset_list if necessary.
1910 (mfont__fontset_fini): Don't free fontset_list. Unref
1912 (mfont__realize_fontset): Initialize request.
1913 (mfontset): Ref default_fontset or fontset only if necessary.
1914 (mfontset_copy): Don't ref copy.
1916 * draw.c (render_glyphs): Check gend->type before checking
1919 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
1920 unrefed plists to NULL.
1922 2005-10-04 Kenichi Handa <handa@m17n.org>
1924 * textprop.c (mtext_serialize): Be sure to make mt
1925 MTEXT_FORMAT_UTF_8 and NULL terminated.
1927 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
1929 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
1931 2005-10-03 Kenichi Handa <handa@m17n.org>
1933 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
1934 is not at the beginning of line.
1936 2005-09-22 Kenichi Handa <handa@m17n.org>
1938 * input.c: Include <sys/stat.h> and <unistd.h>.
1939 (Minclude, Mcommit, Munhandle): New variables.
1940 (minput__init): Initialize them. Push only Mstate to
1941 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
1942 (parse_action_list): Allow integer arg for undo. Handle Mcommit
1944 (load_input_method): Handle "include" directive. If no states are
1946 (shift_state): If state_name is Mt, shift back to the previous
1947 state. Call preedit_commit to commit preedit text.
1948 (preedit_commit): New function.
1949 (take_action_list): Improve debug printing. Handle commit and
1951 (handle_key): Check the return value of take_action_list. Don't
1952 take branch_actions just after changing to the root map.
1953 (reset_ic): Reset all ic_info members.
1954 (filter): When a key is not handled, just move ic_info->keys
1955 instead fo calling reset_ic.
1956 (load_im_info): If key is not Mstate, push Mmap to
1958 (MDatabaseStatList): New type.
1959 (imdir_stat_list): New variable.
1960 (input_method_hook): Don't cancel the hook. Check the
1961 modification time of directories.
1962 (minput__fini): Free imdir_stat_list;
1964 * input.h (MInputContextInfo): New member prev_state.
1966 * m17n-core.h (mplist_conc): Extern it.
1968 * plist.c (mplist_conc): New function.
1970 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
1972 * font.h (MRealizedFont): New member average_width.
1974 * font-ft.c (ft_open): Set rface->average_width.
1976 * font.c (xlfd_unparse_name): Print '*' before registry name.
1978 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
1979 (xfont_open): Set rfont->average_width.
1980 (xft_open): Likewise.
1981 (device_open): Initialize disp_info->AVERAGE_WIDTH.
1983 * internal-gui.h (struct MFrame): New member average_width.
1985 * m17n-gui.c (mframe): Fix setting of frame->rfont.
1986 (mframe_get_prop): Return the average_width of a font.
1988 * face.c (mface__realize): Set rface->average_width.
1989 (mface__update_frame_face): Set frame->average_width.
1991 * face.h (MRealizedFace): New member average_width.
1993 2005-09-19 Kenichi Handa <handa@m17n.org>
1995 * font.c (xlfd_unparse_name): New arg full_xlfd.
1996 (mfont__encode_char): Use shortcut only for X core fonts.
1997 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
1998 (mfont_put_prop): Handle `language' property.
1999 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
2000 Print file can capability info too.
2002 * m17n-core.c (mdebug__output): New variable.
2003 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
2004 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
2005 (m17n_fini_core): Close mdebug__output if it's not stderr.
2007 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
2008 (xfont_open): Handle baseline_offset.
2009 (xfont_find_metric): Likewise.
2010 (xfont_render): Likewise.
2011 (xft_open): Likewise.
2012 (xft_render): Likewise.
2014 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
2015 (mdebug__output): Extern it.
2016 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
2017 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
2018 (MDEBUG_DUMP): New macro.
2019 (MDEBUG_PRINT_TIME): Print to medebug__output.
2021 * font.h (MRealizedFont): New member baseline_offset.
2023 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
2025 (fc_weight_table): Add FC_WEIGHT_REGULAR.
2026 (ft_list_family): Check alias.
2027 (ft_list_language): If language is "en", don't try to the second
2029 (ft_default_list): New variable.
2030 (ft_list_default): New function.
2031 (ft_select): If family is not specified, try only the default
2032 fonts. Treat the weights normal and medium same.
2033 (ft_open): Fix debug message. If registry is not specified, try
2034 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
2035 (ft_find_metric): Likewise.
2036 (ft_render): Likewise.
2037 (ft_list): Fix debug message. Accept the registring iso8859-1.
2038 If family is not specified, try only the default fonts.
2040 * face.c (mface__realize): Fix logic of opening a font.
2042 2005-09-16 Kenichi Handa <handa@m17n.org>
2044 * face.c (mface__realize):
2046 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
2049 * input.c (shift_state): Fix the condition of taking init actions.
2050 (take_action_list): Fix handling of pushback action.
2051 (handle_key): Don't change key while checking its alias.
2052 (minput__init): Initialize new variables.
2053 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
2056 2005-09-12 Kenichi Handa <handa@m17n.org>
2058 * mtext.c (mtext__uppercase): Add proper open/close parens.
2059 (mtext_titlecase): Add proper casting.
2061 * input.c (parse_action_list): Handle the case that the arg is a
2062 key sequence (MText or MPlist).
2063 (take_action_list): Likewise.
2064 (shift_state): Shorter debug message.
2065 (handle_key): Terminate a debug message by "\n".
2066 (reset_ic): Don't take initial actions here.
2067 (minput_open_im): Print a debug message.
2068 (minput_close_im): Likewise.
2069 (minput_create_ic): Likewise.
2070 (minput_destroy_ic): Likewise.
2072 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
2074 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
2077 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
2078 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
2081 * character.c: Add Japanese documentation for
2082 mchar_get_prop_table ().
2084 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
2086 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
2087 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
2088 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
2090 (init_case_conversion): New function.
2091 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
2092 (uppercase_precheck, lowercase_precheck, final_sigma)
2093 (after_soft_dotted, more_above, before_dot, after_i)
2094 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
2096 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
2098 * plist.c (read_mtext_element): Fix previous change.
2100 2005-09-05 Kenichi Handa <handa@m17n.org>
2102 * plist.c (read_mtext_element): Handle \uXXXX notation.
2104 * internal.h (MTABLE_MALLOC): Don't use a local variable.
2105 (MTABLE_ALLOCA): Change the name of local variable.
2107 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
2108 HAVE_FREETYPE are defined.
2110 * m17n-X.c: Check HAVE_X11.
2112 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
2113 directory listing libraries.
2114 (noinst_PROGRAMS): Define it only in maintainer mode.
2116 2005-09-02 Kenichi Handa <handa@m17n.org>
2118 * m17n-gui.h (mdraw_line_break_option): Extern it.
2120 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
2121 end of the first glyph.
2122 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
2124 (mdraw_line_break_option): New variable.
2125 (mdraw_default_line_break): Use mtext_line_break.
2127 * mtext.h (wordseg_func_table): Don't extern it.
2128 (mtext__wseg_fini): Extern it.
2130 * mtext.c: Don't include word-thai.h.
2131 (wordseg_func_table): Delete this variable.
2132 (mtext__init): Don't initialize above. Don't call
2133 mtext__word_thai_init.
2134 (mtext__fini): Don't free wordseg_func_table. Call
2135 mtext__wseg_fini instead fo mtext__word_thai_fini.
2136 (MTextWordsegFunc): Don't typedef it.
2137 (mtext__word_segment): Moved to mtext-wseg.c.
2139 * m17n-core.h (enum MTextLineBreakOption): New enum.
2140 (mtext_line_break): Extern it.
2142 * mtext-wseg.c: New file.
2144 * mtext-lbrk.c: New file.
2146 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
2147 add mtext-lbrk.c and mtext-wseg.c.
2149 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
2150 the case that head is NULL.
2152 2005-09-01 Kenichi Handa <handa@m17n.org>
2154 * word-thai.c (wordseg_propertize): If the property value is nil,
2155 don't make the property no-merge.
2156 (thai_wordseg): Don't require *from and *to are set a priori. Pay
2157 attention to the case that they are NULL.
2158 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
2161 * character.c (mchar_get_prop_table): New function.
2163 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
2165 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
2166 (mchar_get_prop_table): Extern it.
2168 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
2169 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
2171 * internal.h (enum MTextCoverage): New enum.
2172 (MText): New member coverage.
2174 * mtext.c (FORMAT_COVERAGE): New macro.
2175 (insert): Copy mt2->coverage.
2176 (mtext__from_data): Initialize mt->coverage.
2177 (mtext__adjust_format): Update mt->coverage.
2178 (mtext): Initialize mt->coverage.
2179 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
2180 Update mt->coverage if necessary.
2181 (mtext_duplicate): Copy mt->coverage.
2182 (mtext_insert, mtext_replace): New functions.
2183 (mtext_dup): Use mtext_duplicate.
2184 (mtext__word_segment): Don't set *from and *to if a word
2185 segmentation funcion is not found.
2186 (mtext_ins_char): Fix typo.
2188 2005-08-25 Kenichi Handa <handa@m17n.org>
2190 * font.h (MFont): New member for_full_width.
2192 * font.c (compare_font_score): Prefer a font of not
2195 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
2196 registry charset of a font is one of CJK charsets.
2198 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
2199 supports some of CJK.
2201 2005-08-24 Kenichi Handa <handa@m17n.org>
2203 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
2205 * m17n-gui.c (null_device_open): Check Mresolution param and set
2208 * m17n-gd.c (device_open): Check Mresolution param and set
2211 * m17n-X.c (MWDevice): New member resy.
2212 (xfont_open): Set ascent, descent, and max_advance members of
2214 (xft_open): Likewise.
2215 (device_open): Compare also screen_num to find a device. Set
2216 device->resy and frame->dpi.
2218 * internal-gui.h (MFrame): New member dpi.
2220 * font.h (MRealizedFont): New member max_advance.
2222 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
2223 (mfont__init): Don't initialize Mascent, Mdescent.
2224 (Mascent, Mdescent): Delete these variables.
2225 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
2226 Mfont_descent instead of Mascent and Mdescent.
2227 (mfont_put_prop): Allow negative size.
2228 (mfont_find): Handle the case of spec->size < 0. Fix previous
2230 (mfont_list): Handle the case of spec->size < 0.
2231 (mfont_check): Likewise.
2233 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
2234 (fc_get_pattern): Handle the case of font->size < 0.
2235 (ft_open): Set ascent, descent, and max_advance members of rfont.
2236 (ft_find_metric): Improve rounding.
2237 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
2240 * face.c (mface__realize): Handle the case of font->size < 0.
2242 2005-08-22 Kenichi Handa <handa@m17n.org>
2244 * coding.c (MConverterStatus): Change the member buf to union.
2245 (mconv_buffer_converter): Add const to the arg buf.
2246 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2247 (mconv_decode): Adjusted for the change of MConverterStatus.
2248 (mconv_encode_range): Likewise.
2250 * m17n.h (mconv_buffer_converter): Prototype adjusted.
2251 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2253 2005-08-20 Kenichi Handa <handa@m17n.org>
2255 * m17n-gui.h (mfont_from_name): Prototype adjusted.
2256 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
2258 * m17n-X.c (xfont_open): Set members ascent, descent, and
2259 max_advance of rfont.
2260 (xft_open): Likewise.
2262 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
2264 (mfont__ft_parse_name): Add const to the arg name.
2266 * font.c (xlfd_parse_name): Add const to the arg name. Call
2267 mfont__set_property instead of mfont_set_spec. Set font->spacing.
2268 (xlfd_unparse_name): Handle spacing.
2269 (mfont__init): Initialize new variables.
2270 (mfont__id): Handle spacing.
2271 (mfont__merge): Likewise.
2272 (mfont__set_spec): This function deleted.
2273 (mfont__parse_name_into_font): Add const to the arg name. Fix the
2274 condition of calling mfont__ft_parse_name.
2275 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
2276 (mfont_get_prop): Handle properties spacing, ascent, descent,
2278 (mfont_find): Return a realized font.
2279 (mfont_from_name): Add const to the arg name.
2281 * font.h (enum MFontProperty): New member MFONT_SPACING.
2282 (enum MFontSpacing): New enum.
2283 (MFont): New members spacing and max_advance.
2284 (mfont__ft_parse_name): Prototype adjusted.
2285 (mfont__set_spec): Extern deleted.
2286 (mfont__parse_name_into_font): Prototype adjusted.
2288 2005-08-19 Kenichi Handa <handa@m17n.org>
2290 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
2292 * font.c (mfont_list): If FONT is null, use a temporary font.
2293 (mfont_parse_name): Add const to the arg name.
2295 2005-08-18 Kenichi Handa <handa@m17n.org>
2297 * word-thai.c: Surround code by #ifdef and #endif to escape from
2300 * font-ft.c: Mostly re-written.
2302 * font-flt.c (FontLayoutCmdOTF): This type deleted.
2303 (FontLayoutCmd): Type of the member otf changed..
2304 (load_otf_command): Adjusted for the format change of otf command.
2305 (load_command): Likewise.
2306 (free_flt_command): Unref cmd->body.otf.
2307 (run_otf): Ajusted for the type change of otf_cmd.
2308 (run_command): Ajusted for the type change of otf_cmd. On
2309 debugging, print ctx->combining_code.
2310 (mfont__flt_run): Initialize ctx's members code_offset,
2311 combining_code, and left_padding to 0.
2313 * face.h (struct MRealizedFace): New member font.
2314 (mface__realize): Prototype adjusted.
2316 * face.c (find_realized_face): New arg font.
2317 (find_realized_face): Adjusted for the change of MFont.
2318 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
2319 (mface__fini): Don't call mdebug__report_object.
2320 (mface__realize): New arg font.
2321 (mface__for_chars): Adjusted for the change of mfont__encode_char.
2322 Optimize the latin case.
2323 (mface__free_realized): Free rface->font.
2324 (mface__update_frame_face): Adjusted for the change of mface__realize.
2325 (mface_equal): New function.
2327 * draw.c (Mcommon): New variable.
2328 (visual_order): Args to mfont__encode_char changed.
2329 (compose_glyph_string): Handle Mfont text property.
2330 (layout_glyphs): Adjusted for the change of MFont.
2331 (mdraw__init): Initialize Mcommon.
2332 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
2334 * font.h (enum MFontType): Members completely changed.
2335 (enum MFontProperty): Move MFONT_SIZE to the tail.
2336 (enum MFontSource): New enum.
2337 (struct MFont): New members type, source, sizes, file, capability,
2339 (struct MRealizedFont): Type of member font changed. Members
2340 score, status, and encoding deleted.
2341 (MFontScore): New type.
2342 (MFontList): Member changed.
2343 (struct MFontDriver): New member has_char. Types of members
2345 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2346 (Mapple_roman): Extern them.
2347 (OTF_Tag): Typedefed if not HAVE_OTF.
2348 (enum MFontOpenTypeTable): New enum.
2349 (MFontCapability): New type.
2350 (mfont__ft_drive_otf): Prototype adjusted.
2351 (mfont__score): Extern deleted.
2352 (mfont__merge): Extern it.
2353 (mfont__has_char): Extern it.
2354 (mfont__encode_char): Prototype adjusted.
2355 (mfont__open): Extern it.
2356 (mfont__set_spec): Prototype adjusted.
2357 (mfont__get_capability): Extern it.
2359 * font.c: Include "fontset.h".
2360 (M_font_capability, M_font_list, M_font_list_len): New variables.
2361 (font_score_priority): Change order of initial elements.
2362 (font_score_shift_bits): Fix array size.
2363 (common_weight): Add "thin", "semibold", and "heavy".
2364 (common_stretch): Add "ultracondensed", "extracondensed",
2365 "extraexpanded", and "utltraexpand".
2366 (font_weight_regular, font_weight_normal, font_weight_medium): New
2368 (gen_font_name): This function deleted.
2369 (find_encoding): Set font->encoding.
2370 (OTF_tag): New function.
2371 (otf_script_list): New variable.
2372 (load_otf_script_list): New function.
2373 (find_script_from_otf_tag): New function.
2374 (xlfd_parse_name): Set font->type and font->source.
2375 (mfont__free_realized): Free chains rfonts.
2376 (font_score): Renamed from mfont__score.
2377 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2378 (Mapple_roman): New variables.
2379 (mfont__init): Initilize new variables. Initalize
2380 default_encoding.encoding_name and
2381 default_encoding.encoding_charset to Municode_full and
2382 mcharset__unicode. Use SAFE* macros for allocating filepath
2384 (mfont__fini): Free otf_script_list.
2385 (mfont__id): New function.
2386 (mfont__match_p): Check also capability member of MFont.
2387 (mfont__merge): New funciton.
2388 (mfont__set_spec_from_face): Set type and source members.
2389 (mfont__set_spec_from_plist): Set capability and type members.
2390 (mfont__select): Argument changed.
2391 (mfont__available): New function.
2392 (compare_font_score): New function.
2393 (mfont__list): New function.
2394 (mfont__open): Return a realized font.
2395 (mfont__resize): Adjusted for the change of MFont.
2396 (mfont__has_char): New function.
2397 (mfont__encode_char): Argument changed.
2398 (mfont__set_spec): Argument changed.
2399 (free_font_capability): New function.
2400 (mfont__get_capability): New function.
2401 (MFontfile): New variable.
2402 (mfont_get_prop): Adjusted for the change of MFont.
2403 (mfont_put_prop): Likewise.
2404 (mfont_set_selection_priority): Fix the way of setting
2405 font_score_priority[].
2406 (mfont_find): Use mfont__list instead of mfont__select.
2407 (mfont_resize_ratio): Adjusted for the change of MFont.
2408 (mfont_list): Use mfont__list.
2409 (mfont_check): New function.
2410 (font_score): Make it static.
2412 * fontset.h (mfont__realize_fontset): Prototype adjusted.
2413 (mfont__lookup_fontset): Likewise.
2415 * fontset.c (struct MFontset): Delete member font_spec_list.
2416 (struct MRealizedFontset): Type of member spec changed. New
2418 (load_font_group): Arg spec_list deleted.
2419 (load_fontset_contents): Adjusted for the change of fontset_def.
2420 (free_fontset): Fix the way of freeing fontset elements.
2421 (realize_fontset_elements): Argument changed.
2422 (get_per_script): New function.
2423 (free_realized_fontset_elements): Fix the way of feeing rfontset
2425 (update_fontset_elements): Fix args to realize_fontset_elements.
2426 (mfont__realize_fontset): New arg spec.
2427 (try_font_list): New function.
2428 (try_font_group): New arg request. Use try_font_list.
2429 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
2431 (mfontset): Adjusted for the change of MFontset.
2432 (mfontset_copy): Likewise. Don't share plists.
2433 (mfontset_modify_entry): Adjusted for the change of MFontset.
2434 (mfontset_lookup): Call get_per_script.
2435 (mdebug_dump_fontset): Print also the address of fonts.
2437 * input.c (shift_state): Don't reset ic_info->vars.
2438 (take_action_list): Call MDEBUG_PRINT fore calling
2441 * internal-gui.h (MFontDriver): Don't typedef it here.
2443 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
2444 (MXFont): This type deleted.
2446 (struct _MFontX): New struct.
2447 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
2448 (MDisplayInfo): Member base_font_list deleted.
2449 (DEFAULT_FONT): Definition changed.
2450 (FALLBACK_FONT): This maclr deleted.
2451 (free_display_info): Adjusted for the change of MDisplayInfo.
2452 (free_device): Argument to mfont__free_realized changed.
2453 (xfont_driver): Adjusted for the change of MFontDriver.
2454 (xfont_registry_list): Use MFontX instead of MXFont.
2455 (MRealizedFontX): Renamed from MXFontInfo.
2456 (xfont_select): Return the font found first.
2457 (close_xfont): Change MXFontInfo to MRealizedFontX.
2458 (xfont_open): Return the realized font.
2459 (xfont_find_metric): Get xfont from rfont->fontp.
2460 (xfont_has_char): New function.
2461 (xfont_encode_char): Adjusted for the argument change.
2462 (xfont_render): Get xfont from rfont->fontp.
2463 (xfont_list): Adjusted for the argument change.
2464 (MRealizedFontXft): Renamed from MXftFontInfo.
2465 (xft_driver): Ajusted for the change of MFontDriver.
2466 (close_xft): Change MXtfFontInfo to MRealizedFontXft
2467 (xft_open_font): Argument changed.
2468 (xft_open): Argument changed. Return the realized font.
2469 (xft_find_metric): Get xft_font from rfont->fontp.
2470 (xft_has_char, xft_encode_char): New functions.
2471 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
2472 font if not yet opened.
2473 (device_open): Don't set frame->font.
2475 * m17n-gd.c (gd_font_driver): Adjusted for the change of
2477 (gd_font_open): New function.
2478 (gd_render): Don't use the local variable ft_info.
2479 (device_init): Adjusted for the change of gd_font_driver.
2481 * textprop.c (mtext__prop_init): Initialize text_property_table.
2482 Call M17N_OBJECT_ADD_ARRAY.
2483 (mtext__prop_fini): Don't call mdebug__report_object.
2485 * plist.c (mplist__init): Initialize plist_table.
2486 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
2487 (mplist__fini): Don't call mdebug__report_object.
2489 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
2490 (mtext__fini): Don't call mdebug__report_object.
2491 (MTEXT_FORMAT_UTF_16): Correct type.
2492 (mtext_data): New function.
2493 (mtext_text): Fix calculation of limit and args to
2496 * language.c: Include "plist.h".
2497 (M_script_lang_list): New variable.
2498 (mlang__init): Read languages and their information from m17n
2500 (mlanguage__list): New function.
2501 (Miso639_1, Miso639_2): New variables.
2503 * language.h (mlanguage__list): Extern it.
2505 * database.c (get_database_stream): Use SAFE_* macros for
2506 allocating and freeing path.
2507 (mdatabase__init): Likewise.
2509 * symbol.c (msymbol__fini): Don't free symbols here.
2510 (msymbol__free_table): New function.
2511 (msymbol_is_managing_key): New function.
2513 * symbol.h (msymbol__free_table): Extern it.
2514 (msymbol__list): Extern it.
2516 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
2518 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
2519 (struct _M17NObjectArray): New member name and next.
2520 (mdebug__add_object_array): Extern it.
2521 (M17N_OBJECT_ADD_ARRAY): New macro.
2522 (mdebug__report_object): Don't extern it.
2524 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
2526 * m17n-gui.c (free_frame): Don't free frame->font.
2527 (null_device_fini): Fix code for freeing
2528 null_device.realized_font_list.
2529 (m17n_fini_win): Free interface.
2530 (mframe): Cast the return value of dlsym. Set frame->font here.
2531 (mframe_get_prop): Check frame->rface->rfont before accessing the
2534 * m17n-gui.h (Mfontfile): Extern it.
2535 (mfont_check): Extern it.
2536 (mface_equal): Extern it.
2538 * m17n-core.c: Include "symbol.h".
2539 (report_header_printed): This variable deleted.
2540 (object_array_root): New variable.
2541 (report_object_array): New function.
2542 (mdebug__report_object): This function deleted.
2543 (mdebug__add_object_array): New function.
2544 (m17n_init_core): Call mchartable_init () before mtext_init ().
2545 (m17n_fini_core): Call report_object_array (if necessary) and
2546 msymbol__free_atable at the end.
2548 * m17n-core.h (msymbol_is_managing_key): Extern it.
2549 (mtext_data): Extern it.
2550 (MTEXT_FORMAT_UTF_16): Correct type.
2551 (M17NLIB_MINOR_VERSION): Changed to 3.
2552 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
2554 * chartab.c (mchartable__init): Initalize chartable_table.count.
2555 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
2556 mdebug__report_object.
2558 2005-05-26 Kenichi Handa <handa@m17n.org>
2560 * m17n.h (Miso639_1, Miso639_2): Extern them.
2562 * symbol.h (msymbol__list): Extern it.
2564 * symbol.c (msymbol__list): New function.
2566 2005-05-19 Kenichi Handa <handa@m17n.org>
2568 * input-gui.c (minput__win_init): Don't change the value of
2571 2005-05-16 Kenichi Handa <handa@m17n.org>
2573 * m17n-core.c (m17n_object): Be sure to initialize all members.
2575 * font-ft.c (fc_decode_prop): Fix args to msymbol.
2577 2005-05-09 Kenichi Handa <handa@m17n.org>
2579 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
2581 2005-04-27 Kenichi Handa <handa@m17n.org>
2583 * language.c (mlang__init): Add "an" (Aragonese).
2585 * word-thai.c: Add support for libthai.
2586 (mtext__word_thai_init): Initialize wordseg library conditionaly.
2587 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
2589 * mtext.c: Include "word-thai.h" conditionaly.
2590 (mtext__init): Call mtext__word_thai_init conditionaly.
2591 (mtext__fini): Call mtext__word_thai_fini conditionaly.
2593 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
2594 not WORDCUT_LD_FLAGS.
2596 2005-04-19 Kenichi Handa <handa@m17n.org>
2598 * word-thai.c (wordseg_propertize): Always unref the attached
2600 (thai_wordseg): Don't unref the property.
2602 2005-04-18 Kenichi Handa <handa@m17n.org>
2604 * word-thai.c: Include stdlib.h.
2605 (wordseg_propertize): Add dummy function for the case that wordcut
2606 library doesn't exist.
2607 (wordseg_propertize): Fix for old wordcut library.
2609 2005-04-16 Kenichi Handa <handa@m17n.org>
2611 * word-thai.c: Include <stdio.h>.
2613 2005-04-15 Kenichi Handa <handa@m17n.org>
2615 * draw.c: Include mtext.h.
2616 (linebreak_table, M_break_at_space, M_break_at_word)
2617 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
2618 (compose_glyph_string): Check POS before getting Mface text
2620 (truncate_gstring): Give correct TO arg to line_break function.
2621 (GET_LB_TYPE): New macro.
2622 (find_break_backward, find_break_forward): New functions.
2623 (mdraw__init): Initialize the above new variables.
2624 (mdraw__fini): Free linebreak_table.
2625 (mdraw_default_line_break): Use find_break_backward and
2628 * word-thai.c: New file.
2630 * word-thai.h: New file.
2632 * mtext.c: Include word-thai.h.
2633 (wordseg_func_table): New variable.
2634 (mtext__init): Initialize wordseg_func_table and call
2635 mtext__word_thai_init.
2636 (mtext__fini): Call mtext__word_thai_fini, free
2638 (MTextWordsegFunc): New type.
2639 (mtext__word_segment): New function.
2641 * mtext.h (wordseg_func_table): Extern it.
2642 (mtext__word_segment): Extern it.
2644 * m17n.c (m17n_init): Fix typo (== -> =).
2646 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
2647 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
2649 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
2650 (MTEXTPROP_VAL): New macros.
2652 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
2654 2005-04-07 Kenichi Handa <handa@m17n.org>
2656 * database.c (load_chartable): Fix pursing of symbol name.
2658 2005-03-24 Kenichi Handa <handa@m17n.org>
2660 * m17n.c (m17n_init): Fix typo (== -> =).
2662 2005-03-11 Kenichi Handa <handa@m17n.org>
2664 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
2666 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
2668 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
2671 2005-03-09 handa <handa@m17n.org>
2673 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
2674 calling m17n_init ().
2676 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
2677 calling m17n_init_core ().
2679 2005-02-28 Kenichi Handa <handa@m17n.org>
2681 * font-flt.c (mfont__flt_run): Add resulting code sequence in
2684 2005-02-17 Kenichi Handa <handa@m17n.org>
2686 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
2687 (M_description, M_command, M_variable): New variables.
2688 (load_im_info_keys): New variables.
2689 (load_im_info, check_command_keyseq, get_description_advance)
2690 (parse_command_list, get_command_list, parse_variable_list)
2691 (get_variable_list, input_method_hook): New functions.
2692 (command_list, variable_list): New variables.
2693 (minput__init): Put input_method_hook to Minput_method.
2694 Initialize M_description, M_command, M_variable, Mdetail_text,
2695 load_im_info_keys, command_list, variable_list.
2696 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
2697 (Mdetail_text): New variable.
2698 (minput_get_description, minput_get_commands)
2699 (minput_assign_command_keys, minput_get_variables)
2700 (minput_set_variable): New functions.
2702 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
2703 (minput_assign_command_keys, minput_get_variables)
2704 (minput_set_variable): Extern them.
2706 * plist.c (UNGETC): Just decrement st->p.
2707 (read_mtext_element): New arg skip.
2708 (read_integer_element): Likewise.
2709 (read_symbol_element): Likewise.
2710 (read_element): New arg KEYS.
2711 (mplist__from_plist): Don't increment ref-count of NULL object.
2712 (mplist__from_file): New arg KEYS.
2713 (mplist_put): Don't increment ref-count of NULL object.
2714 (mplist_add): Likewise.
2715 (mplist_push): Likewise.
2716 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
2718 * plist.h (mplist__from_file): Prototype adjusted.
2720 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
2721 (get_database_stream): New function.
2722 (load_database): Use get_database_stream.
2723 (M_database_hook): New variable
2724 (mdatabase__init): Initialize M_database_hook.
2725 (mdatabase__load_for_keys): New function.
2726 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
2728 (mdatabase_define): Free mdb->extra_info if necessary.
2730 * database.h (mdatabase__dir_list, M_database_hook)
2731 (mdatabase__load_for_keys): Extern them.
2732 (MDatabaseHookFunc): New type.
2734 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
2736 2004-12-27 Kenichi Handa <handa@m17n.org>
2738 * Version 1.2.0 released.
2740 2004-12-27 Kenichi Handa <handa@m17n.org>
2742 * input.c (minput_filter): Don't reset ic->xxx_changed.
2744 * mtext.c (mtext_from_data): Fix documentation.
2746 2004-12-25 Kenichi Handa <handa@m17n.org>
2748 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
2749 (M17NLIB_VERSION_NAME): Update to "1.2.".
2751 2004-12-24 Kenichi Handa <handa@m17n.org>
2753 * input.c (reset_ic): Set key_unhandled to 0.
2755 2004-12-21 Kenichi Handa <handa@m17n.org>
2757 * m17n-gui.h (mfont_from_spec): Delete extern.
2759 * input-gui.c (win_callback): Handle Minput_reset.
2760 (minput__win_init): Register reset_ic as a callback for
2763 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
2764 changed. At first, shift to the initial state.
2765 (minput__init): Initialize Minput_reset. Register reset_ic as a
2766 callback for Minput_reset.
2767 (Minput_reset): New variable.
2768 (minput_filter): Always set ic->xxx_changed to 0.
2769 (minput_reset_ic): New function.
2770 (integer_value): Fix typo ('>' -> '<') and calculation of length
2773 * m17n-core.c (merror_code): Change type to `int'.
2775 * m17n-misc.h (merror_code): Adjust type.
2777 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
2779 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
2780 (mtext_change_prop): Delete extern.
2782 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
2783 to `int'. Move the documents to m17n-core.h.
2785 2004-12-13 Kenichi Handa <handa@m17n.org>
2787 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
2788 (MTextProperty): Document it.
2790 2004-12-09 Kenichi Handa <handa@m17n.org>
2792 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
2794 2004-12-03 Kenichi Handa <handa@m17n.org>
2796 * internal.h (m17n__core_initialized, m17n__shell_initialized,
2797 m17n__gui_initialized): New externs.
2799 * m17n-core.h (enum M17NStatus): New enum.
2800 (m17n_status): Extern it.
2802 * m17n-core.c (core_initialized): Delete this variable.
2803 (m17n__core_initialized, m17n__shell_initialized,
2804 m17n__gui_initialized): New variables.
2805 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
2806 instead of core_initialized.
2807 (m17n_status): New function.
2809 * m17n.c (shell_initialized): Delete this variable.
2810 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
2813 * m17n-gui.h (m17n_init_win): Adjust the prototype.
2815 * m17n-gui.c (win_initialized): Delete this variable.
2816 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
2817 instead of gui_initialized.
2819 2004-11-19 Kenichi Handa <handa@m17n.org>
2821 * input.c (reset_ic): Check if ic_info->state is NULL.
2822 (filter): If ic_info->state is NULL, return 0.
2823 (load_input_method): Don't unref `maps' it it's not created.
2825 2004-11-15 Kenichi Handa <handa@m17n.org>
2827 * input.c (find_candidates_group): If INDEX is -1, find the last
2829 (take_action_list): If the previous of the first candidate is
2830 requested, select the last candidate.
2832 2004-11-08 Kenichi Handa <handa@m17n.org>
2834 * m17n-X.c (device_open): Try at most 32 fonts to find a
2835 non-autoscaled font.
2837 * font.c (xlfd_parse_name): Fix previous change.
2839 2004-11-05 Kenichi Handa <handa@m17n.org>
2841 * font.c: (commont_style): Include dummy elements "slanted" and
2842 "rslanted" to prefer "o" to "r" if "i" is requested.
2844 * font-ft.c (ft_to_prop): Fix "oblique" entry.
2846 2004-10-29 Kenichi Handa <handa@m17n.org>
2848 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
2850 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
2851 New members smallest and larger.
2852 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
2853 (xfont_registry_list): Likewise.
2854 (xfont_select): Likewise.
2857 2004-10-28 Kenichi Handa <handa@m17n.org>
2859 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
2860 font name comparison.
2861 (xfont_select): Fix logic for selecting a larger size font.
2863 2004-10-25 Kenichi Handa <handa@m17n.org>
2865 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
2868 2004-10-22 Kenichi Handa <handa@m17n.org>
2870 * input.c (update_candidate): Renamed from udpate_candidate.
2871 (take_action_list): Show more debugging info on arithmetic commands.
2873 * m17n-X.c (device_open): Fix previous change.
2875 * draw.c (compose_glyph_string): Don't get face property at the
2878 2004-10-21 Kenichi Handa <handa@m17n.org>
2880 * draw.c (compose_glyph_string): Fix for the case of category
2883 2004-10-19 Kenichi Handa <handa@m17n.org>
2885 * input.c (mdebug_mask): New variable.
2886 (shift_state): Print debug information.
2887 (take_action_list): Likewise.
2888 (handle_key): Likewise.
2890 2004-10-14 Kenichi Handa <handa@m17n.org>
2892 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
2894 2004-10-13 Kenichi Handa <handa@m17n.org>
2896 * m17n-X.c (device_open): Be sure to register at least one font
2899 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
2900 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
2902 2004-10-12 Kenichi Handa <handa@m17n.org>
2904 * draw.c (alloc_gstring): Fix previous change.
2906 * font-ft.c (ft_list_generic): Fix for the case of not
2909 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
2911 * font.c (mfont_list): If no font is found, return NULL.
2912 (load_font_encoding_table): Put entries of nil registry first.
2913 (find_encoding): Adjust for the above change.
2915 2004-10-11 Kenichi Handa <handa@m17n.org>
2917 * m17n-gui.h (mfont_list): Adjust prototype.
2919 * m17n-X.c (xfont_list): New arg maxnum.
2921 * font.h (struct MFontDriver): Change prototype of <list>.
2923 * font-ft.c (fc_generic_family_list): Delete it.
2924 (Mserif, Msans_serif, Mmonospace): Delete them.
2925 (M_generic_family_info): New variable.
2926 (enum GenericFamilyType): New enum.
2927 (struct GenericFamilyInfo): New struct.
2928 (generic_family_table): New variable.
2929 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
2931 (add_font_info): Get style here.
2932 (ft_list_family): Don't initialize fc_config here. Don't list
2934 (ft_list_generic): New function.
2935 (ft_select): Pay attention to generic familes here.
2936 (ft_open): Fix calculation of ascent and descent.
2937 (ft_list): Pay attention to generic families.
2938 (mfont__ft_init): Initialize M_generic_family_info,
2939 generic_family_table, and fc_config..
2940 (mfont__ft_fini): Finalize generic_family_table.
2942 * draw.c (compose_glyph_string): Use more constant font for
2943 glyphs. Adjust for the member change in MGlyph.
2944 (layout_glyph_string): Adjust for the member change in MGlyph.
2945 (alloc_gstring): Intilize scracth_glyph to avoid
2946 compose_glyph_string on it.
2947 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
2948 (mdraw_coordinates_position): Fix previous change.
2950 * internal-gui.h (glyph_category): New enum.
2951 (MGlyph): Change type of <category> to enum glyph_category.
2953 * face.c (mface__realize): Delete args langauge and charset.
2954 (mface__for_chars): Fix for the case that glyphs have different
2956 (mface__update_frame_face): Adjust for mface__realize change.
2958 * face.h (mface__realize): Adjust prototype.
2960 2004-10-05 Kenichi Handa <handa@m17n.org>
2962 * language.c (mlang__init): Add Akan.
2964 2004-10-04 Kenichi Handa <handa@m17n.org>
2966 * font-ft.c (add_font_info): Add instead of push the element.
2967 (ft_list_family): For generic fonts, try all
2968 substituted. families.
2970 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
2971 (run_rule): Don't update cluster range here.
2972 (run_command): Update cluster range on appending a glyph.
2973 (run_otf): Update cluster range for glyphs generated by OTF.
2975 2004-10-02 Kenichi Handa <handa@m17n.org>
2977 * m17n-X.c (device_open): Handle Mfont key in PLIST.
2979 2004-09-30 Kenichi Handa <handa@m17n.org>
2981 * font-ft.c (ft_select): Ignore family on calling mfont__score.
2983 2004-09-30 Kenichi Handa <handa@m17n.org>
2985 * font.h: Include <fontconfig/fontconfig.h>.
2986 (MFTInfo): New member langset.
2987 (mfont__encoding_list): Extern it.
2989 * font.c (mfont__encoding_list): New function.
2990 (mdebug_dump_font_list): New function.
2992 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
2993 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
2995 (ft_family_list): New variable.
2996 (set_font_info): New arg basep. Callers changed.
2997 (fc_list): Check the return value of FcPatternGetString.
2998 (add_font_info): New arg plist. Callers changed. Update
3000 (ft_list_family): New function (merged fc_list and ft_list_all).
3001 (ft_select): Use ft_list_family.
3002 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
3004 (mfont__ft_init): Initialize above new variables.
3005 (mfont__ft_fini): Free ft_family_list.
3006 (STRDUP_LOWER): New macro.
3007 (set_font_info): Use STRDUP_LOWER.
3008 (ft_list_family): Avoid duplicate addition of font path. Use
3010 (fc_decode_prop): Fix typo.
3012 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
3013 (xfont_registry_list): Change argument disp_info to frame.
3015 (xfont_list_all): New function.
3016 (xfont_list): If FONT is not NULL, check all fonts.
3018 2004-09-28 Kenichi Handa <handa@m17n.org>
3020 * m17n-X.c (MXFont, MXFontList): New types.
3021 (MDisplayInfo): Delete members font_registry_list,
3022 iso8859_1_family_list, iso10646_1_family_list, new members
3023 font_list, base_font_list.
3024 (free_display_info): Adusted for the change of MDisplayInfo.
3025 (xfont_driver): Initialize with xfont_list.
3026 (font_compare): New function.
3027 (build_font_list): Deleted.
3028 (xfont_registry_list): New function.
3029 (xfont_select): Use xfont_registry_list.
3030 (xfont_list): New function.
3031 (device_open): Adusted for the change of MDisplayInfo.
3033 * font-ft.c (add_font_info): New arg languages. Callers changed.
3034 (fc_list): Get languages from fonts..
3035 (ft_list_all): Renamed from ft_list. Callers changed.
3036 (ft_list): New function.
3037 (mfont__ft_driver): Initalize with ft_list.
3039 * font.c (mfont_list): New function.
3041 * font.h (struct MFontDriver): New member `list'.
3042 (MFTInfo): New member languages.
3044 * m17n-gui.h (mfont_list): Extern it.
3046 2004-09-27 Kenichi Handa <handa@m17n.org>
3048 * internal-gui.h (struct MGlyphString): Delete members mt,
3049 sub_width, sub_lbrearing, sub_rbearing, and region.
3051 * draw.c (MSubTextExtents): New type.
3052 (layout_glyphs): New arg extents. Set its members.
3053 (layout_glyph_string): Adjusted for the above change.
3054 (alloc_gstring): Don't set gstring->mt.
3055 (truncate_gstring): Call line_break function with mt instead of
3058 2004-09-22 Kenichi Handa <handa@m17n.org>
3060 * mtext.c (count_utf_16_chars): Count each code of invalid
3063 2004-09-19 Kenichi Handa <handa@m17n.org>
3065 * mtext.c (default_utf_16, default_utf_32): Rename them to
3066 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
3069 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
3072 2004-09-13 Kenichi Handa <handa@m17n.org>
3074 * draw.c (Mlatin): Don't declare it here.
3075 (visual_order): Fix reordering of combining characters.
3076 (compose_glyph_string): Fix detection of script.
3077 (layout_glyphs): Don't fix reordering of combining characters
3079 (layout_glyph_string): Pay attention to
3080 control->disable_overlapping_adjustment.
3081 (truncate_gstring): Include at least on character in a line.
3082 (get_gstring): Always scan one full line.
3083 (mdraw__init): Don't initialize Mlatin here.
3084 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
3085 have a font, use ascent/descent of an ASCII font. Allow
3086 ink_array_return and logical_array_return to be NULL.
3087 (mdraw_coordinates_position): Fix iteration.
3089 * font-ft.c (MFTtoProp): Member completely changed.
3090 (ft_to_prop): Adjusted for the above change.
3091 (ft_to_prop_size): Likewise.
3092 (set_font_info): Adjusted for the change of MFTtoProp.
3093 (fc_generic_family_list): New variable.
3094 (fc_list): Add special handling of generic font names.
3095 (mfont__ft_init): Adjusted for the change of MFTtoProp.
3096 Initialize fc_generic_family_list.
3097 (mfont__ft_fini): Don't free ft_to_prop. Free
3098 fc_generic_family_list.
3099 (FC_vs_M17N_font_prop): New type.
3100 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
3101 (fc_decode_prop, fc_encode_prop): New functions.
3102 (mfont__ft_parse_name): Use fc_decode_prop.
3103 (mfont__ft_unparse_name): Use fc_encode_prop.
3105 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
3106 (MWDevice): Add member realized_font_list.
3107 (free_display_info): Don't free disp_info->realized_font_list.
3108 (free_device): Free device->realized_fontset_list.
3109 (xft_find_metric): Use gstring->frame instead of rfont->frame.
3110 (device_open): Don't initialize disp_info->realized_font_list.
3111 (device_open): Initialize device->realized_font_list and set it to
3112 frame->realized_font_list.
3114 * fontset.c (try_font_group): New function.
3115 (mfont__lookup_fontset): Use try_font_group.
3117 * font.c (common_weight): Change the order of "regular".
3119 * face.c (Mlatin): Don't make it static.
3120 (mface__realize): Be sure to set work_gstring.frame.
3121 (mface__for_chars): Likewise.
3123 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
3126 * internal-gui.h (Mlatin): Extern it.
3128 * m17n-gui.h (MDrawControl): New member
3129 disable_overlapping_adjustment.
3131 2004-09-06 Kenichi Handa <handa@m17n.org>
3133 * font-flt.c (run_otf): Fix typo ('}'->']').
3135 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
3136 (COMBINING_PRECOMPUTED_P): New macros.
3138 * draw.c (layout_glyphs): Handle precomputed combining code.
3140 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
3141 precomupted combining code.
3143 2004-09-03 Kenichi Handa <handa@m17n.org>
3145 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
3148 2004-08-27 Kenichi Handa <handa@m17n.org>
3150 * face.c (mface_put_prop): If the new value is the same as the
3151 current one, don't increment frame->tick.
3153 2004-08-25 Kenichi Handa <handa@m17n.org>
3155 * fontset.c (mfontset): Initialize font_spec_list member.
3156 (mfontset_copy): Load fontset if necessary.
3158 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
3159 'metrics' to for C++.
3161 * draw.c (mdraw_glyph_info): Adjusted for the member name change
3164 2004-08-16 Kenichi Handa <handa@m17n.org>
3166 * Version 1.1.0 released.
3168 2004-08-13 Kenichi Handa <handa@m17n.org>
3170 * language.c (mlang__init): Add Dhivehi.
3172 * m17n-gui.c (Mx, Mfreetype): Delete it.
3173 (m17n_init_win): Don't initialize Mx and Mfreetype here.
3175 * m17n-gui.h (Mfreetype, Mxft): Extern them.
3176 (mfont_resize_ratio): Extern it.
3177 (MDrawGlyphInfo): New member logical_width;
3178 (MDrawGlyph): New type.
3179 (mdraw_glyph_list): Prototype adjusted.
3181 * m17n-X.c (xfont_open): Set type and fontp members.
3182 (xft_open): Likewise.
3184 * internal-gui.h (Mx, Mfreetype): Delete extern.
3186 * font.h (struct MRealizedFont): New member type and fontp.
3188 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
3189 (Mx, Mfreetype): Declare here.
3190 (Mxft): New variable.
3191 (mfont_resize_ratio): New function.
3193 * font-ft.c (ft_open): Set type and fontp members.
3195 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
3198 2004-08-11 Kenichi Handa <handa@m17n.org>
3200 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
3203 2004-08-06 Kenichi Handa <handa@m17n.org>
3205 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
3208 * font-flt.c (run_otf): Print debugging information if necessary.
3210 2004-08-05 Kenichi Handa <handa@m17n.org>
3212 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
3213 positioning_type 5 and 6. Switch simplified.
3215 2004-08-04 Kenichi Handa <handa@m17n.org>
3217 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
3219 2004-08-02 Kenichi Handa <handa@m17n.org>
3221 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
3222 set val to 1 even if it is greater than 1.
3224 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
3226 2004-07-29 Kenichi Handa <handa@m17n.org>
3228 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
3229 debugging information.
3231 * internal.h (MDEBUG_PRINT5): New macro.
3233 * draw.c (layout_glyphs): Don't combine a zero width glyph with
3234 the previous one if the zero width glyph has left or right
3237 2004-07-26 Kenichi Handa <handa@m17n.org>
3239 * m17n-X.c (xft_render): Pay attention to members left_padding and
3240 right_padding of MGlyph.
3242 * draw.c (visual_order): Allocate one more elements for arrays as
3243 a workaround of fribidi bug.
3244 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
3245 instead of MGlyph->bidi_sensitive.
3246 (layout_glyph_string): Pay attentinon to
3247 control->orientation_reversed when padding at the head or tail.
3248 Fix adjustment of space glyph width.
3249 (get_gstring): If cursor_width or cursor_bidi is changed, don't
3252 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
3253 instead of MGlyph->bidi_sensitive.
3255 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
3257 2004-07-26 Kenichi Handa <handa@m17n.org>
3259 * draw.c (visual_order): Don't treat combined glyphs specially.
3260 (layout_glyphs): Don't get metrics glyphs that are already ready.
3261 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
3262 width with the previous one.
3263 (draw_background): Fix bar cursor position on a r2l glyph.
3265 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
3266 (run_rule): Fix place of updating cluster_begin_pos and
3267 cluster_end_pos here.
3268 (run_otf): Don't set left_padding.
3270 * font-ft.c (adjust_anchor): Type of argument `code' changed.
3272 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
3273 Fix handling of GPOS.
3274 (mfont__ft_drive_gpos): Delete this function.
3276 * font.h (mfont__ft_drive_otf): Renamed back from
3277 mfont__ft_drive_gsub.
3278 (mfont__ft_drive_gpos): Delete extern.
3280 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
3281 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
3283 2004-07-23 Kenichi Handa <handa@m17n.org>
3285 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
3286 the same bidi level.
3288 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
3290 2004-07-22 Kenichi Handa <handa@m17n.org>
3292 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
3294 2004-07-20 Kenichi Handa <handa@m17n.org>
3296 * draw.c (render_glyphs): Fix checking of g->code validity.
3298 * face.c (mface__realize): Set g.type.
3300 2004-07-18 Kenichi Handa <handa@m17n.org>
3302 * Makefile.am: Prepend ${top_srcdir} to all *.la in
3305 * m17n-gui.c (mframe): Print error message give by dlopen to
3308 2004-07-16 Kenichi Handa <handa@m17n.org>
3310 * draw.c (compose_glyph_string): Improve the way of deciding a
3311 script. For a character that doesn't have script property, use
3312 the last non-latin script.
3314 * font-ft.c (fc_list): Cancel previous change.
3315 (mfont__ft_init): Add more entries in ft_to_prop_name.
3317 2004-07-15 Kenichi Handa <handa@m17n.org>
3319 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
3320 previous or next character glyphs.
3322 2004-07-14 Kenichi Handa <handa@m17n.org>
3324 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
3325 of type GLYPH_SPACE.
3327 * fontset.c (mfont__lookup_fontset): If glyph type is
3328 GLYPH_SPACE, get codes for SPACE.
3330 * internal-gui.h (Mfont): Delete extern.
3332 * m17n-gui.h (Mfont): Delete duplicated extern.
3334 2004-07-13 Kenichi Handa <handa@m17n.org>
3336 * font-ft.c (DEVICE_DELTA): New macro.
3337 (adjust_anchor): New function.
3338 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
3340 (mfont__ft_drive_gpos): New function.
3342 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
3343 (FontLayoutContext): Delete member `rfont'.
3344 (run_otf): Set g->otf_cmd. Call
3345 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
3346 only whne HAVE_OTF is defined.
3348 * fontset.c: Include "config.h".
3350 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
3351 (MGlyph): New member otf_cmd.
3353 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
3354 (mfont__ft_drive_gpos): Extern it.
3356 * face.c: Include "config.h".
3358 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
3360 * input-gui.c: Include "config.h".
3362 * plist.c: Include "config.h".
3364 2004-07-06 Kenichi Handa <handa@m17n.org>
3366 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
3367 internal-gui.h: Cancel previous changes.
3369 * m17n-gd.h: Delete it.
3371 * Makefile.am (libm17n_core_la_LIBADD): New variable.
3372 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
3373 @XML2_LD_FLAGS@ to above.
3374 (libm17n_la_LIBADD): Add -ldl.
3375 (libm17n_la_LDFLAGS): Add -export-dynamic.
3376 (X_LD_FLAGS): Fix the order of linking.
3377 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
3378 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
3379 (libm17n_X_la_LDFLAGS): Add -module.
3380 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
3381 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3382 (libm17n_gd_la_LDFLAGS): Add -module.
3383 (include_HEADERS): Delete m17n-gd.h.
3385 2004-06-30 Kenichi Handa <handa@m17n.org>
3387 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
3388 (MDeviceLibraryInterface): Delete it.
3389 (register_device_library): Delete it.
3390 (m17n__device_library_list): Renamed from device_library_list.
3392 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
3393 (m17n_init_win): Adjust prototype.
3395 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
3396 (m17n_init_gd): New function.
3398 * m17n-gd.h: New file.
3400 * m17n-X.h: Include <m17n-gui.h>.
3401 (m17n_init_X): Extern it.
3402 (M17N_INIT): Redefine it.
3404 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
3405 (m17n_init_X): New function.
3407 * internal-gui.h (m17n__device_library_list): Extern it.
3408 (struct MDeviceDriver): New members initialized, init, and fini.
3410 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
3412 (libm17n_X_la_LIBADD): Delete aboves.
3413 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
3414 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3415 (libm17n_gd_la_LDFLAGS): Delete it.
3416 (include_HEADERS): Add m17n-gd.h.
3418 2004-06-25 Kenichi Handa <handa@m17n.org>
3420 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
3421 (libm17n_gd_la_LDFLAGS): Cancel previous change.
3423 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
3425 * font-ft.c (fc_list): If FcFontList finds no font, try
3428 * draw.c (compose_glyph_string): Terminate the last loop after
3429 doing default combining if necessary.
3431 2004-06-24 Kenichi Handa <handa@m17n.org>
3433 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
3435 * character.c (mchar_define_property): Add const to an arg.
3437 * charset.c (mchar_define_charset): Add const to an arg.
3439 * coding.c (MCodingSystem): Add const to an arg or decoder.
3440 (finish_decoding): Add const to an arg.
3441 (decode_coding_charset, decode_coding_utf_8)
3442 (decode_coding_utf_16, decode_coding_utf_32)
3443 (decode_coding_iso_2022, decode_coding_sjis)
3444 (mconv_define_coding): Likewise.
3446 * m17n-X.c (xft_find_metric): Delete unused variable.
3448 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
3451 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
3454 * mtext.c (count_utf_8_chars, count_utf_16_chars)
3455 (mtext__from_data, mtext_from_data): Add `const' to an arg.
3457 * mtext.h (mtext__from_data): Ajust prototype.
3459 2004-06-23 Kenichi Handa <handa@m17n.org>
3461 * draw.c (compose_glyph_string): Always get glyph codes by
3463 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
3464 (mdraw_glyph_list): New function.
3466 * font-flt.c (mfont__flt_run): Be sure to call
3467 rfont->driver->encode_char.
3469 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
3470 (ft_encode_char): Delete arg C.
3471 (ft_render): Don't call FT_Get_Char_Index.
3473 * font.c (mfont__encodable_p): Delete it.
3474 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
3476 * font.h (struct MFontDriver): Delete arg C of encode_char.
3477 (mfont__encodable_p): Delete extern.
3479 * m17n-X.c (xfont_encode_char): Delete arg C.
3480 (xft_find_metric): Don't cal FT_Get_Char_Index.
3481 (xft_render): Likewise.
3483 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
3485 (mdraw_glyph_list): Extern it.
3487 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
3489 2004-06-22 Kenichi Handa <handa@m17n.org>
3491 * m17n-gui.h (mfontset_lookup): Extern it.
3493 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
3495 * fontset.c (realize_fontset_elements)
3496 (free_realized_fontset_elements, update_fontset_elements): New
3498 (mfont__realize_fontset): Call realize_fontset_elements.
3499 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
3500 (mfont__lookup_fontset): If a fontset was modified, update
3501 the realized fontset.
3502 (mfontset_modify_entry): Increment fontset->tick.
3503 (mfontset_lookup): New function.
3505 2004-06-21 Kenichi Handa <handa@m17n.org>
3507 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
3509 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
3510 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
3511 length of source text 0.
3513 2004-06-21 Kenichi Handa <handa@m17n.org>
3515 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
3516 (compare): Pay attention to format other than utf-8.
3517 (copy): Delete this function.
3518 (count_by_utf_8, count_by_utf_16, insert): New functions.
3519 (count_utf_16_chars): Fix handling of a surrogate pair.
3520 (find_char_forward, find_char_backward): Likewise.
3521 (mtext__from_data): Delete unnecessary check. Fix number of
3523 (mtext_from_data): Don't count items.
3524 (mtext_ref_char): Optimize the code.
3525 (mtext_set_char): Pay attention to format other than utf-8.
3526 (mtext_cat_char): Likewise.
3527 (mtext_dup): Don't call copy, instead do allocation here.
3528 (mtext_cat): Call insert instead of copy.
3529 (mtext_ncat): Likewise.
3530 (mtext_cpy): Delete character at first and call insert instead of
3532 (mtext_ncpy): Likewise.
3533 (mtext_copy): Likewise.
3534 (mtext_duplicate): Call insert instead of copy.
3535 (mtext_del): Pay attention to format other than utf-8.
3536 (mtext_ins): Simply call insert.
3537 (mtext_ins_char): Pay attention to format other than utf-8.
3538 (mtext_tok): Call insert instead of copy.
3539 (mtext_text): Call UNIT_BYTES.
3541 * textprop.c (mtext__adjust_plist_for_change): New function.
3543 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
3544 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
3545 (CHAR_UNITS_AT): Fix typo.
3546 (CHAR_UNITS_BY_HEAD): Fix typo.
3547 (STRING_CHAR_AND_UNITS): Fix typo.
3549 * internal.h (MTEXT_READ_ONLY_P): New macro.
3551 * mtext.h (mtext__replace): Delete the extern.
3552 (mtext__adjust_foramt): Adjust prototype.
3554 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
3555 if possible. Otherwise make a copy of mmt.
3557 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
3560 2004-06-18 Kenichi Handa <handa@m17n.org>
3562 * character.h (CHAR_STRING_UTF16): Fix syntax.
3564 2004-06-16 Kenichi Handa <handa@m17n.org>
3566 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
3567 (libm17n_X_la_LIBADD): Delete it.
3568 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
3570 * m17n-X.c (device_open): Add parens in `if' condition.
3572 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
3573 (DEC_POSITION): Likewise.
3574 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
3576 2004-06-15 Kenichi Handa <handa@m17n.org>
3578 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
3581 * draw.c (compose_glyph_string): If langauge is specified, call
3582 mface__for_chars even if a text is all latin. Fix condition for
3583 setting non_ascii_found.
3585 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
3587 * m17n.h (minput_char_to_key): Delete extern.
3589 * m17n-gui.h (minput_event_to_key): Cancel previous change.
3591 * m17n-gui.c (null_device_open): Set several members of frame.
3593 2004-06-14 Kenichi Handa <handa@m17n.org>
3595 * m17n-gui.h (minput_event_to_key): Delete extern.
3597 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
3599 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
3601 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
3603 2004-06-08 Kenichi Handa <handa@m17n.org>
3605 * character.c (mchar_put_prop): Don't increment the ref-count of
3608 2004-06-04 Kenichi Handa <handa@m17n.org>
3610 * m17n-core.c (mdebug__register_object): New function.
3611 (mdebug__unregister_object): Likewise.
3613 * internal.h (mdebug__register_object, mdebug__unregister_object):
3615 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
3618 * charset.c (mcharset__load_from_database): Don't call
3619 mconv__register_charset_coding here.
3621 * coding.c (find_coding): Get a real name from an element of
3622 coding_definition_list.
3623 (mconv__register_charset_coding): Set the real name at the top of
3625 (mcoding__load_from_database): Likewise.
3626 (mconv_list_codings): Adjusted for the above change.
3628 2004-06-03 Kenichi Handa <handa@m17n.org>
3630 * coding.c (find_coding): Find by canonicalized name. Don't have
3631 to modify the element of coding_definition_list by
3633 (mconv__define_coding_from_charset): Delete it.
3634 (mconv__register_charset_coding): Canonicalize sym.
3635 (mcoding__load_from_database): Register plist modified by
3638 * coding.h (mconv__define_coding_from_charset): Don't extern it.
3640 * font-ft.c (ft_open): Fix setting of rfont->descent.
3642 2004-06-02 Kenichi Handa <handa@m17n.org>
3644 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
3645 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
3646 (xlfd_unparse_name): Renamed from xfont_build_name.
3647 (mfont__init): Initialized Mfontconfig.
3648 (mfont__free_realized): Unconditionally unref rfont->info.
3649 (mfont__select): Free `this' if it's not best.
3650 (mfont__open): Don't check frame->realized_font_list.
3651 (mfont__parse_name_into_font): New function.
3652 (Mfontconfig): New variable.
3653 (mfont_from_name): Call mfont_parse_name.
3654 (mfont_name): Call mfont_unparse_name.
3655 (mdebug_dump_font): Likewise.
3657 * font.h (struct MFontDriver): Delete members parse_name and
3659 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
3660 (mfont__parse_name_into_font): Extern it.
3662 * font-ft.c: Include "symbol.h".
3663 (close_ft): Unconditionally free filename and charmap_list of
3665 (ft_open): Duplicate base->filename. Increment ref-count of
3666 ft_info->charmap_list. Free ft_info->charmap_list and
3667 ft_info->filename on error.
3668 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
3670 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
3672 (enum xlfd_field_idx): Moved to font.c.
3673 (split_font_name, build_font_name): Likewise.
3674 (build_font_list): Call mfont__parse_name_info_font.
3675 (xfont_open): Call mfont__unparse_name. Free name.
3676 (xfont_parse_name, xfont_build_name): Moved to font.c
3677 (xft_select): Prototype deleted.
3678 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
3679 Call mfont_pase_name.
3681 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
3682 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
3685 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
3688 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
3690 2004-06-01 Kenichi Handa <handa@m17n.org>
3692 * fontset.c (mfontset_modify_entry): Pay attention to the case
3693 that fontset->font_spec_list is NULL.
3695 2004-05-31 Kenichi Handa <handa@m17n.org>
3697 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3699 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3701 * font.c (mfont__select): Print score the a font for debugging.
3703 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
3705 * coding.c (reset_coding_sjis): Check kanji and kana instead of
3706 kanji_sym and kana_sym.
3708 2004-05-28 Kenichi Handa <handa@m17n.org>
3710 * Makefile.am (VINFO): New variable.
3711 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
3712 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
3714 2004-05-27 Kenichi Handa <handa@m17n.org>
3716 The following chanages are to make device dependent functions
3717 accessible only from MDeviceDriver structure, and to add GD and
3718 null device drivers. Font drivers get also device dependent.
3720 * m17n.c (m17n_init): Increament shell_initialized.
3721 (m17n_fini): Decremented shell_initialized.
3723 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
3725 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
3726 (Mwidget, Mcolormap, Mx): Extern them.
3728 * m17n-gui.c: Include <dlfcn.h> and "config.h".
3729 (free_frame): Call frame->driver->close instead of
3731 (DLOPEN_SHLIB_EXT): New macro.
3732 (MDeviceLibraryInterface): New type.
3733 (device_library_list): New variable.
3734 (register_device_library): New function.
3735 (null_device): New variable.
3736 (null_device_close, null_device_get_prop)
3737 (null_device_realize_face, null_device_free_realized_face): New
3739 (null_driver): New variable.
3740 (null_device_init, null_device_fini, null_device_open): New
3742 (null_interface): New variable.
3743 (Mfreetype, Mdevice): Declare them.
3744 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
3745 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
3746 Mwin__Close_Device. Register drivers for Mx and Mgd.
3747 (m17n_fini_win): Decremented win_initialized. Call "fini"
3748 function of all opened devices. Don't call mwin__fini.
3749 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
3751 (mframe): Handle Mdevice key of PLIST.
3752 (mframe_get_prop): Call frame->device->get_prop instead of
3753 mwin__device_get_prop.
3755 * m17n-gd.c: New file.
3757 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
3758 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
3760 * m17n-core.c (m17n_init_core): Increate core_initialized.
3761 (m17n_fini_core): Decremented core_initialized.
3763 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
3764 (Mcolormap): Don't extern them here.
3766 * m17n-X.c (FRAME_DEVICE): New macro.
3767 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
3768 (free_display_info): Use MPLIST_DO.
3769 (free_device): Free rface->info.
3770 (xft_close): Delete it.
3771 (device_init): Renamed from mwin__init.
3772 (device_fini): Renamed from mwin__fini.
3773 (device_open): Renamed from mwin__open_device.
3774 (x_driver): New variable.
3775 (MXFontInfo): Delete member frame, add member display.
3776 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
3777 Don't declare them here.
3779 * internal-gui.h (MDeviceType): New enum.
3780 (MWDefice): Delete it.
3781 (struct MFrame): Change type of device to void *. New members
3782 device_type, driver, font_driver_list.
3783 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
3784 (MDeviceDriver): New type.
3785 (Mx, Mgd, Mfreetype): Extern them.
3786 (mwin__XXX): Delete all of them.
3788 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
3790 (win_destroy_ic): Likewise.
3791 (adjust_window_and_draw): Likewise.
3792 (win_callback): Likewise.
3793 (Mxim): Declare it here.
3794 (minput_event_to_key): Call M_CHECK_READABLE.
3796 * fontset.c (mfont__lookup_fontset): Delete local variable
3799 * font.h (struct MFontDriver): Delete member close, add members
3800 parse_name and build_name.
3801 (mfont__driver_list): Delete extern.
3802 (mfont__close): Delete extern.
3804 * font.c (mfont__init): Don't set mfont__driver_list.
3805 (mfont__fini): Don't unref mfont__driver_list.
3806 (mfont__select): Try font drivers in frame->font_driver_list. Set
3807 driver member of a realized font.
3808 (mfont__close): Delete it.
3809 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
3810 functions of the default frame.
3812 * font-ft.c (close_ft): Check ft_info->ft_face and work
3814 (add_font_info): Allocate ft_info by M17N_OBJECT.
3815 (ft_close): Delete it.
3816 (mfont__ft_driver): Don't set ft_close.
3817 (ft_select): Increment ref-count of best_font.
3818 (ft_open): Decremented ref-count of base. On error, call
3819 FT_Done_Face and free ft_info.
3820 (ft_find_metric): Always use XXX_MONO in load_flags.
3821 (ft_render): Fix setting of width. Call
3822 frame->driver->draw_points instead of mwin__draw_points.
3823 (ft_to_prop): Don't set mfont__driver_list.
3824 (mfont__ft_fini): Just unref ft_info.
3826 * face.c (mface__init): Exchange foreground and background of
3827 mface__default. Call mface_put_prop to set hline of
3829 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
3830 (mface__free_realized): Don't call mwin__free_realized_face.
3832 * draw.c (Mdepth): Don't declare it here.
3833 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
3834 (render_glyphs, render_glyph_string): Likewise.
3835 (mdraw__init): Don't set Mdepth.
3836 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
3838 (mdraw_text_per_char_extents): Return 0 on success and -1 on
3840 (mdraw_text_items): Check FRAME is writable.
3841 (mdraw_per_char_extents): Implement body.
3843 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
3845 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
3846 (GUI_SOURCES): Delete it.
3847 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
3848 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
3849 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
3850 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
3851 (linkgui_LDADD): Set to libm17n-gui.la
3852 (linkgui_LDFLAGS): New target.
3853 (SRC): Include ${libm17n_gui_la_SOURCES} and
3854 ${libm17n_gd_la_SOURCES}.
3856 2004-05-24 Kenichi Handa <handa@m17n.org>
3858 * draw.c (draw_background): Don't draw background even if
3859 rface->face.property[MFACE_BACKGROUND] is not Mnil.
3861 2004-05-22 Kenichi Handa <handa@m17n.org>
3863 * m17n-X.c (xft_open_font): Fix anti_alias setting.
3865 2004-05-20 Kenichi Handa <handa@m17n.org>
3867 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
3869 * m17n-gui.c: Include "plist.h".
3870 (mframe): If PLIST is NULL, initialize it to emply plist.
3872 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
3873 (xft_driver): New variable.
3874 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
3875 (xft_find_metric, xft_render): New function.
3876 (mwin__init): Adjusted for the new mfont__driver_list.
3877 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
3878 generated face to PARAM.
3879 (mwin__realize_face): Fix setting of box colors. Don't call hook
3881 (mwin__draw_hline): New function.
3882 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
3883 (mwin__xft_render): Delete these function.
3885 * internal-gui.h (struct MFrame): New member tick.
3886 (struct MGlyphString): New member tick.
3887 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
3888 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
3889 (mwin__xft_render): Delete extern.
3891 * fontset.c (mfont__lookup_fontset): Make the code simpler.
3892 (mfontset): Always increment the reference count of returned
3895 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
3896 (MFTInfo): Moved to font.h.
3897 (ft_iso8859_1_font_list): Delete this variable.
3898 (set_font_info): Don't set font->property[MFONT_TYPE].
3899 (set_font_info): Don't udpate ft_iso8859_1_font_list.
3900 (add_font_info): Change type to void.
3901 (fc_list): Change anme from xft_list. Caller changed. Include
3902 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
3903 (mfont__ft_driver): Change name from ft_driver. Caller changed.
3904 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
3905 (close_ft): Don't call mwin__xft_close. Unref
3906 ft_info->extra_info.
3907 (ft_open): Don't setup ft_info->fontname. Don't call
3909 (ft_find_metric): Don't call mwin__xft_get_metric.
3910 (ft_encode_char): Call rfont->driver->open instead of ft_open.
3911 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
3912 (mfont__ft_init): Adjusted for new mfont__driver_list.
3913 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
3915 * font.c (mfont__driver_list): Make it MPlist.
3916 (mfont__init): Adjust initialization of mfont__driver_list.
3917 (mfont__fini): Free mfont__driver_list.
3918 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
3919 (mfont__select): Adjusted for the new mfont__driver_list.
3921 * font.h (enum MFontProperty): Delete MFONT_TYPE.
3922 (mfont__drirver_list): Adjust prototype.
3923 (MFTInfo): Move to here from fron.c. Deleve member fontname.
3925 * face.h (struct MFace): Delete member realized_face_list, add
3927 (struct MRealizedFace): Delete member need_update
3928 andnofont_rface, add member non_ascii_list.
3929 (mface__update_frame_face): Extern it.
3931 * face.c (hline_prop_list, box_prop_list, noop_hook): New
3933 (get_hline_create, get_box_create): New functions.
3934 (find_realized_face): Cancel previous change. Arg RFONT deleted.
3936 (free_face): Cancep previous change. Free face->frame_list.
3937 (serialize_hline): Do nothing if hline->width is zero.
3938 (serialize_box): Do nothing if box->width is zero.
3939 (mface__init): Setup all properties of mface__default.
3940 (mface__fini): Free hline_prop_list and box_prop_list.
3941 (mface__realize): Cancel previous change. Update
3942 face->frame_list. Setup rface->non_ascii_list.
3943 (mface__for_chars): Update rface->non_ascii_list.
3944 (mface__free_realized): Free rface->non_ascii_list.
3945 (mface__update_frame_face): New function.
3946 (mface): Initialize face->frame_list.
3947 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
3949 (mface_merge): Likewise.
3950 (mface_put_prop): If key is Mhline or Mbox, get value by
3951 get_hline_create or get_box_create respectively.
3952 (mface_put_prop): Update frame->tick and call
3953 mface__update_frame_face if necessary.
3954 (mface_update): Do nothing if func is noop_hook.
3956 * draw.c (render_glyphs): If a font is not found, use
3957 mwin__draw_empty_boxes.
3958 (alloc_gstring): Initialize gstring->tick.
3959 (get_gstring): Check gstring->tick.
3961 2004-05-17 Kenichi Handa <handa@m17n.org>
3963 * face.c (find_realized_face): Return value changed. If RFONT is
3964 NULL, avoid unnecessary checking.
3965 (free_face): Free face->realized_face_list.
3966 (mface__realize): Adjusted for the change of find_realized_face.
3967 If it returns a realized face that needs update, free it and
3968 realize a new one. Push a new realized face to
3969 frame->realized_face_list instead of appending.
3970 (mface__for_chars): Adjusted for the change of find_realized_face.
3971 Short cut if the required font is in rface->ascii_rface.
3972 (mface_put_prop): Free old value if necessary. Set need_update
3973 member of realized faces to 1.
3975 * face.h (struct MFace): Delete member tick, add member
3977 (struct MRealizedFace): Delete member tick, add member
3980 2004-05-13 Kenichi Handa <handa@m17n.org>
3982 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
3984 2004-05-12 Kenichi Handa <handa@m17n.org>
3986 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
3988 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
3989 parse it XftNameParse.
3991 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
3992 (all_fonts_scaned): New variable.
3993 (set_font_info): FAMILY may be Mnil.
3994 (add_font_info): Argument changed.
3995 (xft_list): Call add_font_info in it.
3996 (ft_list): Likewise.
3997 (ft_select): Make it work in the case family is Mnil.
3998 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
3999 (mfont__ft_fini): Set all_fonts_scaned to 0.
4001 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
4002 that is failed to open.
4004 2004-05-10 Kenichi Handa <handa@m17n.org>
4006 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
4007 device's depth is 1 (i.e. monochrome).
4009 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
4010 to work around the problem of libtool.
4012 * font-ft.c: Include <freetype/ftbdf.h>.
4013 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
4015 (mfont__ft_init): Initialize them.
4016 (ft_iso8859_1_font_list): New variable.
4017 (set_font_info): Detect a font containing iso8859-1 glyphs and
4018 register it in ft_iso8859_1_font_list. If the font is not
4019 scalable, assume it as BDF or PCF font and setup SIZE and RESY
4020 properties of the font from its properties.
4021 (add_font_list): If the font is not scalable, check if it is BDF
4022 or PCF font. If not, ignore it.
4023 (ft_select): If FAMILY is Mnil, return NULL only if the requested
4024 registry is not iso8859-1.
4025 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
4026 ft_iso8859_1_font_list.
4027 (ft_find_metric): If the font is not scalable, assume it as BDF
4028 or PCF, and get a metric from its properties.
4029 (mfont__ft_fini): Free ft_iso8859_1_font_list.
4031 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
4033 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
4034 (libm17n_la_LDFLAGS): Delete it.
4035 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
4036 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
4038 2004-05-06 Kenichi Handa <handa@m17n.org>
4040 * draw.c (compose_glyph_string): Fix previous change.
4042 2004-04-30 Kenichi Handa <handa@m17n.org>
4044 * font-ft.c (ft_list): Delete unused variable `result'.
4045 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
4047 2004-04-27 Kenichi Handa <handa@m17n.org>
4049 * m17n-X.c: Include config.h
4050 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
4051 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
4052 (MWDevice) [HAVE_XFT2]: New member xft_draw.
4053 (FRAME_CMAP, FRAME_VISUAL): New macros.
4054 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
4055 (xfont_driver): Make it static.
4056 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
4057 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
4058 info->xft_color_back.
4059 (MXftFontInfo) [HAVE_XFT2]: New type.
4060 (mwin__xft_close) [HAVE_XFT2]: New function.
4061 (mwin__xft_open) [HAVE_XFT2]: New function.
4062 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
4063 (mwin__xft_render) [HAVE_XFT2]: New function.
4065 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4066 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
4067 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
4070 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4072 * font-ft.c: Don't include FT_FREETYPE_H here.
4073 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
4074 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
4075 (MFTInfo): New member charmap_index.
4076 (MFTInfo) [HAVE_XFT2]: New member xft_info.
4077 (check_otf_filename): Renamed from check_filename. Return value
4079 (ft_set_property): This function deleted.
4080 (set_font_info): New function.
4081 (add_font_list): Argument changed. Add multiple fonts.
4082 (xft_list) [HAVE_XFT2]: New function.
4083 (ft_list) [not HAVE_XFT2]: New function.
4084 (ft_select): Add code for Xft.
4085 (close_ft): Likewise.
4086 (ft_open): Likewise.
4087 (ft_find_metric): Likewise.
4088 (ft_encode_char): Likewise.
4089 (ft_render): Likewise.
4091 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
4093 2004-04-26 Kenichi Handa <handa@m17n.org>
4095 * textprop.c (mtext_attach_property): Declare the return type as
4098 2004-04-21 Kenichi Handa <handa@m17n.org>
4100 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
4102 2004-04-09 Kenichi Handa <handa@m17n.org>
4104 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
4106 (load_command): Setup above members.
4108 2004-04-05 Kenichi Handa <handa@m17n.org>
4110 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
4112 2004-03-30 Kenichi Handa <handa@m17n.org>
4114 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
4117 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
4118 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
4120 2004-03-29 Kenichi Handa <handa@m17n.org>
4122 * Version 1.0 Patch Level 2 released.
4124 2004-03-29 Kenichi Handa <handa@m17n.org>
4126 * charset.c (make_charset): Set charset->fully_loaded and
4127 charset->simple correctly. Don't try to get charset->min_char and
4128 charset->max_char for a charset of method subset and superset.
4129 Don't load a mapping file here.
4130 (mcharset__init): Set unified_max.
4131 (mcharset__load_from_database): Free a working plist.
4133 * coding.c (mcoding__fini): Free all malloced data.
4135 * input-gui.c (win_create_ic): Set control.as_image for preediting
4138 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
4139 `count') to initialize the array.
4141 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
4144 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
4146 (mwin__create_window): Fix bug of setting a background pixel of a
4148 (mwin__adjust_window): Clear the window before drawing.
4150 * m17n-core.c (mdebug__report_object): Free array->objectes if
4152 (m17n_init_core): Don't set report_header_printed to 0 here.
4153 Fix debugging information.
4154 (m17n_fini_core): Set report_header_printed to 0 here.
4156 * m17n-core.h (mplist_deserialize): Extern it.
4158 * m17n-gui.c (m17n_fini_win): Fix debugging information.
4160 * m17n.c (m17n_fini): Fix debugging information.
4162 * mtext.c (mtext__adjust_foramt): New function.
4164 * mtext.h (mtext__adjust_foramt): Extern it.
4166 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
4168 * plist.h (mplist__deserialize): Don't extern it.
4170 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
4171 elements of symbol_table to NULL. Report about created and freed
4172 symbols if MDEBUG_FINI is set.
4174 2004-03-22 Kenichi Handa <handa@m17n.org>
4176 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
4178 * m17n.c (m17n_init): Fix the way of checking merror_code.
4180 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
4182 2004-03-22 Kenichi Handa <handa@m17n.org>
4184 * fontset.c (realize_font_group): Adjust the font size by
4185 mfont__resize before selecting a font.
4187 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
4189 2004-03-19 Kenichi Handa <handa@m17n.org>
4191 * Version 1.0 Patch Level 1 released.
4193 2004-03-19 Kenichi Handa <handa@m17n.org>
4195 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
4197 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
4199 2004-03-19 Kenichi Handa <handa@m17n.org>
4201 Re-apply the changes forgotten in the released version.
4203 * charset.c (mcharset__load_from_database): Call
4204 mchar_define_charset.
4206 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
4207 (mconv_encode_range): Put Mcoding text property.
4209 2004-03-18 Kenichi Handa <handa@m17n.org>
4211 * draw.c (Mdepth): New variable.
4212 (visual_order): Delete unused local var `pos'.
4213 (compose_glyph_string): Fix for the case that gstring->glyphs is
4214 realloced. Stop generating glyphs at TO. Fix handling of
4216 (layout_glyphs): Get metrics of all glyphs in advance. Set
4217 lbearing and rbearing of base of composition glyph correctly.
4218 Handle left-overhang glyphs correctly.
4219 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
4221 (dump_combining_code): Change the defualt off_x character to ".".
4222 (mdraw__init): Initialize Mdepth.
4224 * face.c (work_gstring): New variable
4225 (mface__init): Initialize work_gstring.
4226 (mface__fini): Free work_gstring.glyphs.
4227 (mface__realize): Don't handle videomode property here. Adjusted
4228 for the change of mfont__get_metric.
4229 (mface__for_chars): Adjusted for the change of mfont__get_metric.
4231 * face.h (enum face_gc): Moved to m17n-X.c.
4233 * font.h (struct MFontDriver): Arguments of find_metric changed.
4234 (mfont__select): Prototype adjusted.
4235 (mfont__get_metric): Likewise.
4236 (mfont__ft_drive_otf): Likewise.
4237 (mfont__flt_run): Likewise.
4239 * font.c (mfont__select): New argument layouter. If layouter is
4240 different in the registered font, make a new copy of realized
4242 (mfont__get_metric): Argument changed. Get metrics of multiple
4244 (mfont_find): Call mfont__select with layouter as Mnil.
4246 * font-flt.c (FontLayoutContext): New member rfont.
4247 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
4248 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
4250 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
4252 (NUM_POINTS): New macro.
4253 (MPointTable): New type.
4254 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
4255 (mfont__ft_drive_otf): New argument rfont.
4257 * fontset.c (realize_font_group): Adjusted for the changed of
4259 (check_fontset_element): This function deleted.
4261 * input-gui.c (adjust_window_and_draw): Locate a preedit window
4262 off the parent window if the preedit text is zero length.
4264 * internal-gui.h (struct MFrame): New members foreground,
4265 background, videomode, font.
4266 (struct MGlyphString): New member anti_alias.
4267 (MDrawPoint): New type.
4268 (mwin__draw_bitmap): Prototype deleted.
4269 (mwin__draw_points): Prototype added.
4271 * m17n-gui.h (MDrawControl): New member anti_alias.
4273 * m17n-gui.c (free_frame): Free frame->font.
4274 (mframe): Set the fontset of frame->face to the default fontset.
4276 * m17n-X.c (RGB_GC): New type.
4277 (enum gc_index): Renamed from enum face_gc. Member names changed.
4279 (struct MWDevice): Members foreground and background deleted. New
4280 member scratch_gc, gc_list.
4281 (DEFAULT_FONT, FALLBACK_FONT): New macros.
4282 (free_device): Free GCs in device->gc_list.
4283 (get_rgb_gc): New function.
4284 (get_gc): Renamed and argument changed from get_color.
4285 (get_gc_for_anti_alias): New function.
4286 (xfont_find_metric): Arguments changed. Get metrics of multiple
4288 (set_region): Argument changed. Caller changed.
4289 (xfont_render): Allways set a font in gc.
4290 (x_error_handler, x_io_error_handler): Define only if
4291 X_SET_ERROR_HANDLER is defined.
4292 (mwin__open_device): Create device->scratch_gc. Set members
4293 foreground, background, and videomode of frame. Call
4294 XSetErrorHandler and XSetIOErrorHandler only if
4295 X_SET_ERROR_HANDLER is defined.
4296 (struct gc_list): Deleted.
4297 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
4298 (mwin__realize_face): Adjusted for the change of the format of
4299 rface->info and the charge of set_region.
4300 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
4301 (mwin__draw_box): Likewise.
4302 (mwin__draw_bitmap): This function deleted.
4303 (mwin__draw_points): New function.
4304 (mwin__verify_region): Adjusted for the change of the format of
4305 rface->info and the charge of set_region.
4306 (mwin__create_window): Inherit backgound pixel from parent.
4307 (mwin__dump_gc): Adjusted for the change of the format of
4310 2004-03-16 Kenichi Handa <handa@m17n.org>
4312 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
4314 * input.c (M_key_alias): New variable.
4315 (handle_key): Try M_key_alias property of a key too.
4316 (minput__init): Initialize M_key_alias. Give that property to
4317 symbols in one_char_symbol. Fix bug of initializing
4320 * draw.c (compose_glyph_string): Don't handle
4321 ignore_formatting_char here. Include formatting characters in the
4322 range processed by a FTL.
4323 (layout_glyph_string): Handle ignore_formatting_char here.
4325 2004-03-12 Kenichi Handa <handa@m17n.org>
4327 * input-gui.c (win_create_ic): Enable bidi in status control.
4329 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
4331 2004-03-09 Kenichi Handa <handa@m17n.org>
4333 * input.c (load_input_method): If title is not specified, use the
4334 input method name as title.
4336 * m17n-X.c (get_color): Make it static.
4337 (xim_create_ic, xim_destroy_ic, x_error_handler)
4338 (x_io_error_handler): Likewise.
4340 2004-03-01 Kenichi Handa <handa@m17n.org>
4342 * Version 1.0 released.
4345 Copyright (C) 2003, 2004
4346 National Institute of Advanced Industrial Science and Technology (AIST)
4347 Registration Number H15PRO112
4349 This file is part of the m17n library.
4351 The m17n library is free software; you can redistribute it and/or
4352 modify it under the terms of the GNU Lesser General Public License
4353 as published by the Free Software Foundation; either version 2.1 of
4354 the License, or (at your option) any later version.
4356 The m17n library is distributed in the hope that it will be useful,
4357 but WITHOUT ANY WARRANTY; without even the implied warranty of
4358 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4359 Lesser General Public License for more details.
4361 You should have received a copy of the GNU Lesser General Public
4362 License along with the m17n library; if not, write to the Free
4363 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
4364 Boston, MA 02110-1301, USA.