1 2007-11-12 Kenichi Handa <handa@ni.aist.go.jp>
3 * font-ft.c (ft_check_otf): Fix arg to OTF_check_features.
5 * m17n-flt.c (Mcombining): New variable.
6 (Mfont_facility): Renamed from Mfont_has. Referrer changed.
7 (enum FontLayoutCmdRuleSrcType): Delete SRC_EXIST, add
8 SRC_HAS_GLYPH and SRC_OTF_SPEC.
9 (FontLayoutCmdRule): Delete src.exist, add src.supported_glyph and
11 (load_command): Adjusted for the above changes.
13 (combining_code_from_class): Delete it.
14 (mflt_get): Check flt->name against Mcombining, not Mt.
16 * internal-flt.h (Mcombining): Extern it.
18 * draw.c (compose_glyph_string): Call run_flt with Mcombining for
21 2007-11-09 Kenichi Handa <handa@ni.aist.go.jp>
23 * face.c (mface__realize): Reset measured flag before calling
26 * m17n-flt.c (run_stages): Fix handing of off_x and off_y.
27 (setup_combining_coverage): New function.
28 (setup_combining_flt): New function.
29 (mflt_get): If flt is not found, return NULL. If name if Mt,
30 call setup_combining_flt.
31 (mflt_run): For debugging, print font family name.
33 * font-ft.c (ft_render): Fix handling of baseline_offset.
34 (ft_encapsulate): Set metrics in 26.6 fixed pixel.
35 (ft_render): Check pixel_mode to determine anti_alias.
37 * m17n-X.c (xfont_find_metric): Delete invalid "continue" line.
38 (xfont_find_metric): Set metrics in 26.6 fixed pixel.
39 (xfont_render): Set baseline_offset in pixel.
40 (xft_render): Fix handling of baseline_offset.
42 * draw.c (run_flt): Set font.font.family.
43 (compose_glyph_string): Fix handling of combining characters.
45 * fontset.c (try_font_list): Check if the named flt is surely
48 2007-11-07 Kenichi Handa <handa@ni.aist.go.jp>
50 * draw.c (analyse_bidi_level): New function.
51 (visual_order): Do reordering using the already decided
53 (compose_glyph_string): Decide bidi-level before calling flt.
55 * m17n-flt.c (mflt_run): Fix typo.
57 * font-ft.c (ft_drive_otf): Fix indexing gstring->glyphs.
59 2007-11-06 Kenichi Handa <handa@ni.aist.go.jp>
61 * draw.c (visual_order): Don't rely on the width of glyphs.
62 (run_flt): Fix culculation of g->g.to.
64 * m17n-flt.c (run_rule): Don't set error code here.
66 (run_otf): Fix culculation of xoff and yoff.
67 (run_command): Don't set error code here.
71 * m17n-X.c (xfont_open): Keep rfont's metrics in 26.6 fixed pixels.
72 (xfont_find_metric): Set glyph's yadv to 0.
73 (xft_find_metric): Likewise.
75 * font-ft.c (ft_open): Keep rfont's metrics in 26.6 fixed pixels.
76 (ft_find_metric): Adjust glyph's metrics.
77 (ft_encapsulate): Keep rfont's metrics in 26.6 fixed pixels.
78 (ft_drive_otf): Set mark glyph's xadv to 0.
80 * face.c (mface__for_chars): Adjusts the unit of face's ascent and
83 2007-10-29 Kenichi Handa <handa@m17n.org>
85 * m17n-flt.h (struct _MFLTOtfSpec): Adjusted for the new FLT handling.
86 (mflt_get): Adjusted for the argument change.
87 (mflt_name): Adjusted for the return value change.
89 * m17n-flt.c (Mgenerator, Mend): New variables.
90 (flt_min_coverage, flt_max_coverage): New variables.
93 (Mfont_has): Renamed from Mexist. Referrers chagned.
94 (gen_otf_tag): Handle the trailing whitespaces.
95 (otf_count_features, otf_store_features): Fix for negative features.
96 (parse_otf_command): Adjusted for the change of MFLTOtfSpec.
97 (load_otf_command): Likewise.
98 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
99 (load_flt): Argument changed. Caller changed.
100 (free_flt_list): New function.
101 (run_rule): Adjusted for the change of FontLayoutContext.
102 (mflt_run): Adjusted for the change of FontLayoutContext.
104 * m17n-gui.c (m17n_init_win): Call m17n_init_flt.
105 (m17n_fini_win): Call m17n_fini_flt.
107 * m17n-gui.h: Include m17n-flt.h.
109 * m17n-gd.c: Adusted for the change of MGlyph.
111 * m17n-X.c: Adusted for the change of MGlyph.
112 (xft_check_otf, xft_drive_otf): New functions.
114 * internal-gui.h (MGlyph): Modified for new FLT handling.
116 * fontset.c (try_font_list): Adusted for the change of MGlyph.
118 * font-ft.c: Adjusted for the change of MGlyph.
119 (ft_check_cap_otf): Renamed from ft_check_otf. Callers changed.
120 (get_glyph_metric): Deleted.
121 (ft_check_otf): New function.
122 (ft_drive_otf): New fucntion.
124 * font.c: Adjusted for the change of MGlyph.
125 (mfont__init): Don't call mfont__flt_init.
126 (mfont__fini): Don't call mfont__flt_fini.
127 (mfont__get_glyph_id, mfont__get_metrics): New functions.
129 * font.h (struct MRealizedFont): New members x_ppem and y_ppem.
130 (MFLTFontForRealized): New struct.
131 (struct MFontDriver): New members check_otf and drive_otf.
132 (mfont__get_glyph_id, mfont__get_metrics): Extern them.
134 * face.c: Adjusted for the change of MGlyph.
136 * draw.c: Adjusted for the change of MGlyph.
138 * m17n.c (m17n_init): Don't call mchar_init.
140 * m17n-core.c (m17n_init_core): Call mchar_init.
142 * m17n-core.h (mchartable_min_char, mchartable_max_char): Extern them.
144 * input.c: Include "m17n.h" instead of "m17n-gui.h".
146 * chartab.c (mchartable): Initialize table->min_char to -1.
147 (mchartable_min_char): New function.
148 (mchartable_max_char): New function.
150 * Makefile.am (GUI_SOURCES): Delete font-flt.c.
151 (libm17n_gui_la_LIBADD): Add ${top_builddir}/src/libm17n-flt.la.
153 2007-10-12 Kenichi Handa <handa@m17n.org>
155 * m17n-core.h (Mcharset): Extern it.
156 Move detabase related declarations from m17n.h.
158 * m17n-flt.h: Include m17n-core.h instead of m17n.h.
159 (struct _MFLTOtfFeatures): New struct.
160 (struct _MFLTOtfSpec): Delete gsub, gpos, etc, add gsub_gpos.
161 (struct _MFLTFont): Delete otf, add check_otf.
162 (MCHAR_INVALID_CODE): Define it.
164 * plist.c (read_mtext_element): Simplify the code.
166 * m17n.h: Move database related declarations to m17n-core.h
167 (Mharset): Don't extern it.
169 * m17n.c (m17n_init): Don't call mdatabase__init.
171 * m17n-gd.c (read_rgb_txt): Check also /etc/X11/rgb.txt. Downcase
174 * m17n-flt.c: Include m17n-core.h instead of m17n.h.
175 (Mexist): New variable.
176 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
177 (FontLayoutCmdRule): New member src.exist.
178 (parse_otf_command): Handle gsub_count and gpos_count separately.
179 (load_otf_command): Adjusted for the change of MFLTOtfSpec.
180 (load_command): Handle the command "exist".
181 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
182 (run_rule): Handle the case SRC_EXIST.
183 (run_otf): Adjusted for the change of MFLTOtfSpec.
184 (run_command): Check the range of FROM.
185 (check_otf_spec): Delete it.
186 (m17n_init_flt): Call m17n_init_core instead of m17n_init.
188 (m17n_fini_flt): Call m17n_fini_core instead of m17n_fiini.
189 (mflt_find): Call font->check_otf instead of check_otf_spec.
190 (mflt_run): Keep the metrics in 26.6 fixed point.
192 * m17n-core.c (mdatabase__finder, mdatabase__loader): Delete them.
193 (m17n_init_core): Call mdatabase__init.
195 * m17n-X.c (device_open): Use mplist_add, not mplist_push.
197 * internal.h (mdatabase__finder, mdatabase__loader): Delete externs
200 * font-flt.c (Mexist): New variable.
201 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
202 (FontLayoutCmdRule): New member src.exist.
203 (load_category_table): Use isalnum, not isalpha.
204 (load_command): Check the command "exist".
205 (run_rule): Hande the case SRC_EXIST.
206 (run_command): Check the range of FROM.
207 (mfont__flt_init): Initialize Mexist.
209 * draw.c (layout_glyphs): Fix calculation of off_x and off_y.
211 * database.h (mdatabase__load_charset_func): Extern it.
213 * database.c: Include m17n-core.h instead of m17n.h.
214 (load_chartable): Use mtext__from_data.
215 (load_charset): Moved to charset.c
216 (load_database): Call mdatabase__load_charset_func instead of
218 (mdatabase__load_charset_func): New variable.
219 (mdatabase__init): Initialize mdatabase__load_charset_func and
220 Mcharset. Don't set mdatabase__finder and mdatabase__loader.
221 (mdatabase__save): Use fwrite, not mconv_encode_stream.
222 (Mcharset): Declare it here.
224 * charset.c: Include "database.h.".
225 (load_charset): Moved from database.c.
226 (mcharset__init): Initialize mdatabase__load_charset_func, don't
229 * character.c (mchar_define_property): Call mdatabase_find directly.
230 (mchar_get_prop): Call mdatabase_add directly.
231 (mchar_put_prop): Call mdatabase_load directly.
232 (mchar_get_prop_table): Likewise.
234 * Makefile.am (libm17n_core_la_SOURCES): Add database.[ch].
235 (libm17n_la_SOURCES): Remove database.[ch].
236 (libm17n_flt_la_LIBADD): Delete libm17n.la, add libm17n-core.la.
238 2007-09-18 Kenichi Handa <handa@m17n.org>
240 * face.c (mface__realize): Try Freetype based font at first.
242 * font.c: Include <ctype.h>
244 2007-09-16 Kenichi Handa <handa@m17n.org>
246 * m17n-flt.c (load_flt): New arg full. If full is zero, load only
248 (run_otf): Call font->get_metrics, not font->get_metric.
249 (run_stages): Likewise.
250 (CHECK_FLT_COVERAGE): New macro.
251 (CHECK_FLT_STAGES): Call load_flt with the second arg 1.
252 (check_otf_spec): New function.
253 (m17n_fini_flt): Unref flt->coverage.
254 (mflt_find): Argument changed.
255 (mflt_name): New function.
256 (mflt_coverage): Use CHECK_FLT_COVERAGE.
258 * m17n-flt.h (MFLTFont): Member get_metrics renamed from get_metric.
259 (mflt_find): Prototype adjusted.
260 (mflt_name): Extern it.
262 2007-09-14 Kenichi Handa <handa@m17n.org>
264 * m17n-flt.h (struct _MFLTGlyph): Change signedness of members.
266 * font-flt.c (run_otf): Make debug info printing comaptible with
268 (run_command): Likewise.
269 (mfont__flt_run): Likewise.
271 * m17n-flt.c (UPDATE_CLUSTER_RANGE): ctx->cluster_begin_idx is
272 invalid only when it's negative.
274 (run_command): Likewise.
275 (mflt_run): Initialize ctx.cluster_begin_idx to -1.
277 2007-09-10 Kenichi Handa <handa@m17n.org>
279 * m17n-flt.h (struct _MFLTGlyph): New member encoded and measured.
280 (struct _MFLTFont): Prototype of get_glyph_id changed.
282 * m17n-flt.c (enum GlyphInfoMask): Delete EncodedMask and
284 (GAPPEND): Delete this macro.
285 (GET_ENCODED, SET_ENCODED, GET_MEASURED, SET_MEASURED): Adjusted
286 for the change of MFLTGlyph. Caller changed.
287 (run_otf): Simply calls font->get_glyph_id.
288 (run_command): Reset g->encoded and g->measured for direct code.
289 (positioning): Delete this function.
290 (run_stages): Simply calls font->get_glyph_id and font->get_metric.
292 2007-09-07 Kenichi Handa <handa@m17n.org>
294 * draw.c (compose_glyph_string): Improve script detection.
296 2007-09-06 Kenichi Handa <handa@m17n.org>
298 * m17n-flt.h (mflt_get): Extern it.
300 * m17n-flt.c (run_stages): Call positioning only if
301 font->get_metric is non-NULL.
302 (CHECK_FLT_STAGES): Fix typo.
303 (mflt_get): New function.
305 * font-flt.c (mfont__flt_run): Improve debug info printing.
307 2007-09-04 Kenichi Handa <handa@m17n.org>
309 * m17n-flt.c (MFontLayoutTable): Delete this type.
310 (struct _MFLT): New member mdb and coverage.
311 (list_flt): Set flt->mdb.
312 (load_generator): Argument and return value changed. Caller
314 (get_font_layout_table): Delete this function.
315 (run_stages): Argument changed. Caller changed.
316 (CHECK_FLT_STAGES): New macro.
317 (mfont__flt_encode_char): Argument changed.
318 (mflt_find): Likewise.
319 (mflt_coverage): New function.
320 (mflt_run): Argument changed.
321 (mdebug_dump_flt): Likewise.
323 * m17n-flt.h (mflt_coverage): Extern it.
324 (mflt_find): Prototype adjusted.
326 2007-09-03 Kenichi Handa <handa@m17n.org>
328 * internal.h (MTABLE_CALLOC_SAFE, MSTRUCT_CALLOC_SAFE): New macros.
330 * database.c (mdatabase__props): New function.
332 * database.h (mdatabase__props): Extern it.
334 * m17n-flt.h (struct _MFLTGlyphString): Delete user_data, add
336 (struct _MFLTFont): Add suitable_p.
337 (mflt_find): Extern it.
339 * m17n-flt.c: Include "database.h".
340 (struct _MFLT): New struct.
341 (list_flt): New function.
342 (load_flt): Don't update flt_list.
343 (get_font_layout_table): Use flt_list.
344 (m17n_init_flt): Don't initialize flt_list.
345 (m17n_fini_flt): Adjusted for the change of flt_list.
346 (mflt_find): New function.
347 (mflt_run): Fix debug printing.
349 2007-08-23 Kenichi Handa <handa@m17n.org>
351 * m17n-flt.c (run_otf): Remove #ifdef HAVE_OTF and #endi.
352 (run_stages): Print separator in encoded string as "|".
354 2007-08-23 Kenichi Handa <handa@m17n.org>
356 * font-flt.c (mfont__flt_run): Don't calculate a glyph metric if
357 the glyph is already handled by OTF.
359 2007-08-21 Kenichi Handa <handa@m17n.org>
361 * font-ft.c (ft_check_capability): Check cap->script_tag at first.
363 2007-08-20 Kenichi Handa <handa@m17n.org>
365 * font-flt.c (mfont__flt_run): Get glyph metrics before printing
368 2007-08-17 Kenichi Handa <handa@m17n.org>
370 * m17n-flt.h (struct _MFLTGlyphString): Member pointer renamed to
372 (MFLTOtfSpec): Renamed from MFLT_OTF_Spec.
373 (MFLTFont): Prototype of the member drive_otf adjusted.
375 * m17n-flt.c (run_stages): Fix handling of padding.
377 * font-ft.c (get_glyph_metric): New function.
378 (DEVICE_DELTA): Return 26.6 fixed point value.
379 (adjust_anchor): Likewise.
380 (mfont__ft_drive_otf): Use get_glyph_metric.
382 * font-flt.c (mfont__flt_run): Pay attention to padding on
385 2007-08-16 Kenichi Handa <handa@m17n.org>
387 * m17n-flt.c (run_stages): Fix typo.
389 * font-ft.c (adjust_anchor): Argument changed. Calculte based on
391 (mfont__ft_drive_otf): Don't call OTF_check_features for GPOS.
392 Adjusted for the argument change of adjust_anchor. Calculte based
395 2007-08-15 Kenichi Handa <handa@m17n.org>
397 * charset.c (mcharset__load_from_database): Set mdebug_flag
398 instead of mdebug_mask.
400 * coding.c (mcoding__load_from_database): Set mdebug_flag instead
403 * database.c (load_database): Set mdebug_flag instead of
405 (mdatabase__load_for_keys): Likewise.
407 * draw.c: Include "internal-flt.h".
408 (dump_combining_code): Don't subtract 128 from combining code
411 * font-flt.c: Include "internal-flt.h". Set mdebug_flag instead
413 (run_rule): Print debug info only when MDEBUG_FLAG is greater than
415 (run_cond): Likewise.
417 (run_command): Likewise.
418 (mfont__flt_run): Change format of debug info.
420 * font-ft.c: Include "internal-flt.h".
421 Set mdebug_flag instead of mdebug_mask.
422 (mfont__ft_drive_otf): Fix arg to OTF_check_features.
424 * input.c: Set mdebug_flag instead of mdebug_mask.
425 (shift_state): New MDEBUG_FLAG macro.
426 (preedit_commit): Likewise.
429 * internal-flt.h: New file.
431 * internal-gui.h (MAKE_COMBINING_CODE, COMBINING_CODE_OFF_Y)
432 (COMBINING_CODE_OFF_X, COMBINING_CODE_BASE_X)
433 (COMBINING_CODE_BASE_Y, COMBINING_CODE_ADD_X)
434 (COMBINING_CODE_ADD_Y, MAKE_COMBINING_CODE_BY_CLASS)
435 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
436 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P): Move
437 these macros to internal-flt.h.
439 * internal.h (M17N_OBJECT_ADD_ARRAY): Adjusted for the change of
441 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Likewise.
442 (enum MDebugMaskBit): Delete this enum.
443 (enum MDebugFlag): New enum.
444 (mdebug__flag): Don't extern it.
445 (mdebug__flags): Extern it.
446 (MDEBUG_FLAG): New macro.
447 (MDEBUG_PRINT0): Use the macro MDEBUG_FLAG.
448 (MDEBUG_DUMP, MDEBUG_PUSH_TIME, MDEBUG_POP_TIME)
449 (MDEBUG_PRINT_TIME): Likewise.
451 * m17n-X.c (xfont_open): Set mdebug_flag instead of mdebug_mask.
452 (xfont_list): Likewise.
454 * m17n-core.c (mdebug__flag): Delete this variable.
455 (mdebug__flags): New variable.
456 (SET_DEBUG_FLAG): Make it a function.
457 (m17n_init_core): Set mdebug_flag instead of mdebug_mask.
458 (m17n_fini_core): Likewise.
460 * m17n-gui.c (m17n_init_win): Set mdebug_flag instead of mdebug_mask.
461 (m17n_fini_win): Likewise.
463 * m17n-misc.h (enum MErrorCode): Add MERROR_FLT.
465 * m17n.c (m17n_init): Set mdebug_flag instead of mdebug_mask.
466 (m17n_fini): Likewise.
468 * symbol.c (msymbol__free_table): Adjusted for the change of
471 * Makefile.am (BASICBUILDS): Add libm17n-flt.la.
472 (BASICHEADERS): Add m17n-flt.h.
473 (FLT_SOURCES): New variable.
474 (libm17n_flt_la_SOURCES, libm17n_flt_la_LIBADD)
475 (libm17n_flt_la_LDFLAGS): Likewise.
477 * m17n-flt.h: New file.
479 * m17n-flt.c: New file created by modifying font-flt.c.
481 2007-07-13 Kenichi Handa <handa@m17n.org>
483 * Version 1.4.0 released.
485 2007-07-12 Kenichi Handa <handa@m17n.org>
487 * input.c: Fix doxygen @ref commands.
489 2007-07-10 Kenichi Handa <handa@m17n.org>
491 * m17n-core.h (M17NFunc): Fix typo of Doxygen directive.
493 2007-07-09 Kenichi Handa <handa@m17n.org>
495 * m17n-core.h (M17N_BEGIN_HEADER, M17N_END_HEADER): New macros.
497 * m17n.h: Include m17n-core.h if not yet done. Use macros
498 M17N_BEGIN_HEADER and M17N_END_HEADER.
500 * m17n-gui.h: Likewise.
502 * m17n-misc.h: Likewise.
504 2007-06-13 Kenichi Handa <handa@m17n.org>
506 * font-flt.c (load_command): Prepend "^" in the regular expression.
508 2007-06-11 Kenichi Handa <handa@m17n.org>
510 * language.c (mlanguage_name_list): Fix previous change.
512 * coding.c (mcoding__load_from_database): Add aliases in
513 coding_definition_list.
515 2007-06-10 Kenichi Handa <handa@m17n.org>
517 * language.c (mlanguage_name_list): Fix previous change.
519 2007-06-08 Kenichi Handa <handa@m17n.org>
521 * input.c (update_candidate): Copy candidate_list earlier.
522 (re_init_ic): Provide pseudo initialize state if none.
524 2007-06-05 Kenichi Handa <handa@m17n.org>
526 * input.c (preedit_insert): Print debug information.
528 * database.c (expand_wildcard_database): New function.
529 (mdatabase_list): Fix handling of wildcard database.
531 * language.c (load_lang_name): New function.
532 (mlang__fini): Cancel the last two changes.
533 (mlanguage_name_list): New arg script and territories. Use
536 * m17n.h (mlangauge_name_list): Adjusted.
538 2007-06-04 Kenichi Handa <handa@m17n.org>
540 * input.c (open_im): Check if the input method has at least one
543 2007-06-01 Kenichi Handa <handa@m17n.org>
545 * input.c (shift_state): Change the format of debug print.
546 (preedit_commit): New arg need_prefix. Caller changed.
547 (update_candidate): Copy candidate_list.
548 (take_action_list): Likewise.
549 (handle_key): Change the format of debug print.
551 * font-flt.c (load_flt): Ignore unknown directives.
553 2007-05-25 Kenichi Handa <handa@m17n.org>
555 * m17n-core.c (mdebug__unregister_object): Small optimization.
557 * database.c (find_file): Merged into get_database_file.
558 (get_database_file): New arg result. Caller changed.
559 (mdatabase__check): Fix the logic.
561 2007-05-24 Kenichi Handa <handa@m17n.org>
563 * database.c (find_database): If unprocessed wildcard database is
564 found, register database filed and recursively call find_database.
565 (free_db_info): Unref db_info->properties.
566 (register_database): New arg properties. Delete code for
567 initializing mdatabase__list.
568 (register_databases_in_files): Argument changed. Caller changed.
569 (mdatabase__update): Don't list files by glob here.
570 (mdatabase_list): If unprocessed wildcard database is found,
571 register database filed and recursively call mdatabase_list.
573 * database.h (enum MDatabaseStatus): New enum
574 MDB_STATUS_AUTO_WILDCARD.
576 * input.c (load_branch): Fix previous change.
577 (update_global_info): If the global database is not found, return -1.
579 2007-05-23 Kenichi Handa <handa@m17n.org>
581 * database.c (Mversion): New variable.
582 (mdatabase__init): Initialize it.
583 (register_database): New arg properties. Caller changed.
584 (register_databases_in_files): Don't check version here.
585 (mdatabase__update): Likewise.
587 * database.h (MDatabaseInfo): New member properties.
589 2007-05-21 Kenichi Handa <handa@m17n.org>
591 * language.c: Include <ctype.h>
592 (mlanguage__info): Use strncasecmp (not memcmp).
593 (mlanguage_name): Downcase language name for backward
596 * input.c (filter): Don't check Mlanguage property of
599 2007-05-18 Kenichi Handa <handa@m17n.org>
601 * language.c (mlanguage_name): Fix it to handle M-text English
604 * input.c (config_command): Set NAME before using it.
605 (load_branch): Try to resolve a map name by variables.
607 2007-05-17 Kenichi Handa <handa@m17n.org>
609 * language.c (mlang__fini): Fix previous change.
611 2007-05-16 Kenichi Handa <handa@m17n.org>
613 * plist.c (free_plist): Cancel the last change.
614 (write_element): Check if PLIST is nested.
615 (mplist__from_plist): Label a plist as nested if appropriate.
616 (mplist__from_alist): Label a plist as nested.
617 (mplist__conc): Check the value of PL before referring it. Label
618 a plist as nested if appropriate.
619 (mplist_copy): Label a plist as nested if appropriate.
620 (mplist_put_func): Return Mnil if KEY is a managing key.
621 (mplist_push): Label a plist as nested if appropriate.
623 * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
626 * language.c (mlang__fini): Unref each element of langname_list.
628 2007-05-14 Kenichi Handa <handa@m17n.org>
630 * language.c: Include <string.h> and <locale.h>.
631 (langname_list): New variable.
632 (load_lang_script_list): Exclude invalid list elements.
633 (mlang__init): Initialize langname_list.
634 (mlang__fini): Unref langname_list.
635 (mlanguage__info): Adjusted for the change of English
636 name (symbol->M-text).
637 (mlanguage_name): Label it as obsolete.
638 (mlanguage_name_list): New function.
640 * m17n.h (mlanguage_name_list): Extern it.
642 * locale.c (make_locale): Fix setting of members of locale.
644 * plist.c (free_plist): Unref also nested plist.
646 2007-05-11 Kenichi Handa <handa@m17n.org>
648 * coding.c (mconv_reset_converter): Set internal->used to 0.
650 2007-05-08 Kenichi Handa <handa@m17n.org>
652 * input.c (check_description): Force copying the translated text.
654 2007-05-02 Kenichi Handa <handa@m17n.org>
656 * input.c (minput_save_config): Unref unnecessary plist. Use
657 free_im_list to free im_config_list.
659 2007-04-20 Kenichi Handa <handa@m17n.org>
661 * input.c (config_command): Fix previous change again.
662 (config_variable): Likewise.
663 (minput_config_command): Fix for the case of setting back to
665 (minput_config_variable): Likewise.
666 (minput_save_config): Include nil as documentation of customized
669 2007-04-05 Kenichi Handa <handa@m17n.org>
671 * input.c (config_command): Fix previous change.
672 (config_variable): Likewise.
674 * plist.c (mplist_get_func): Fix for backward compatiblity.
676 2007-04-04 Kenichi Handa <handa@m17n.org>
678 * input.c (minput_get_command, minput_config_command): Fix example
681 2007-03-29 Kenichi Handa <handa@m17n.org>
683 These changes are to avoid unsafe casting of a function pointer.
685 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
686 (struct MFace): New member hook.
688 * face.c (serialize_face): Adjusted for the change of MFace.
689 (deserialize_face): Likewise.
690 (mface__init): Likewise. Use msymbol_put_func.
691 (mface__realize): Adjusted for the change of MFace. Avoid
693 (mface_get_prop): Adjusted for the change of MFace.
694 (mface_put_prop): Likewise.
695 (mface_get_hook): New function.
696 (mface_put_hook): New function.
697 (mface_update): Adjusted for the change of MFace.
699 * input-gui.c (win_callback): Use mplsit_get_func.
700 (minput__win_init): Use mplsit_put_func.
702 * input.c (take_action_list): Use mplist_get_func.
703 (init_ic_info): Likewise.
704 (fini_ic_info): Likewise.
705 (minput_callback): Likewise.
706 (minput__init): Use mplist_put_func.
708 * language.c (mlang__init): Use msymbol_put_func.
710 * m17n-core.h (M17NFunc): New function type.
711 (M17N_FUNC): New macro.
712 (msymbol_put_func, msymbol_get_func): Extern them.
713 (mplist_put_func, mplist_get_func): Extern them.
715 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
717 * m17n-gui.c (mframe): Add a proper casting.
719 * plist.h (struct MPlist): Make the member val a union.
720 (MPLIST_VAL): Adjusted for the above change.
721 (MPLIST_FUNC): New macro.
722 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
724 * plist.c (mplist_put_func, mplist_get_func): New functions.
726 * symbol.c (msymbol__fini): Use MPLIST_VAL.
727 (msymbol_put_func, msymbol_get_func): New functions.
729 * textprop.c (mtext_serialize): Use msymbol_get_func.
730 (mtext_deserialize): Likewise.
732 2007-03-28 Kenichi Handa <handa@m17n.org>
734 * input.c (get_candidate_list): Avoid unnecessary unref.
736 2007-03-23 Kenichi Handa <handa@m17n.org>
738 * database.c (mdatabase__update): Unref plist at the tail.
740 2007-03-21 Kenichi Handa <handa@m17n.org>
742 * input.c (update_custom_info): Fix for the case "name == Mnil &&
744 (config_command): Fix for the case that configuration is
746 (config_variable): Likewise.
747 (minput_config_command): If keyseqlist is an empty list, cancel
749 (minput_config_variable) If value is an empty list, cancel the
751 (minput_save_config): Handle cancellation of config and customize
754 2007-03-15 Kenichi Handa <handa@m17n.org>
756 * input.c (minput_config_variable): Check custom->vars (not
759 2007-03-01 Kenichi Handa <handa@m17n.org>
761 * input.c (reload_im_info): Setup cmds, vars, and title of
763 (check_variable_value): Fix the return value.
765 * database.c (mdatabase__check): If necessary, update database and
768 2007-02-28 Kenichi Handa <handa@m17n.org>
770 * database.c (get_dir_info): Set dir_info->status to
772 (check_version): New function.
773 (register_database): Don't call find_database.
774 (register_databases_in_files): Don't register a database of
776 (mdatabase__update): Likewise. Avoid unnecessary scanning.
778 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
779 and MDB_STATUS_OUTDATED.
781 * font.h (struct MFont): Types of members type, source, and
782 spacing changed to unsigned.
784 * internal-gui.h (struct): Types of members category and type
787 * internal.h (struct MText): Types of members format and coverage
790 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
791 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
793 2007-02-23 Kenichi Handa <handa@m17n.org>
795 * input.c (Mpop): New variable.
796 (fully_initialize): Initialize Mpop.
797 (parse_action_list): Handle Mpop.
798 (take_action_list): Likewise.
799 (handle_key): When a key is unhandled, shift to the initial state
800 only if the current state has no branch action.
802 2007-02-12 Kenichi Handa <handa@m17n.org>
804 * input.c (get_preceding_char): Unref mt if necessary.
805 (get_following_char): Likewise.
806 (parse_action_list): Fix handling of `insert' action as
808 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
809 (take_action_list): Check invalid candidate list.
811 2007-02-06 Kenichi Handa <handa@m17n.org>
813 * input.c (integer_value): Check also ic->produced for @-N.
815 2007-01-26 Kenichi Handa <handa@m17n.org>
817 * database.c (mdatabase__update): Check mdatabase__dir_list from
820 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
822 2007-01-12 Kenichi Handa <handa@m17n.org>
824 * input.c (handle_key): Handle a branch action of the initial
827 2007-01-10 Kenichi Handa <handa@m17n.org>
829 * m17n-gd.c (gd_render): Delete superfluous line.
831 2006-12-26 Kenichi Handa <handa@m17n.org>
833 * m17n.h (minput_callback): Extern it.
835 * input.h (minput__callback): Delte extern.
837 * input.c (get_surrounding_text): Adjusted for the change of
838 minput__callback to minput_callback.
839 (delete_surrounding_text): Likewise.
840 (minput_create_ic): Likewise.
841 (minput_destroy_ic): Likewise.
842 (minput_filter): Likewise.
843 (minput_set_spot): Likewise.
844 (minput_toggle): Likewise.
845 (minput_reset_ic): Likewise.
847 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
848 and ic->candidate_to to 0.
849 (minput_callback): Renamed from minput__callback.
851 * input-gui.c (win_callback): Adjusted for the change of
852 minput__callback to minput_callback.
854 2006-12-15 Kenichi Handa <handa@m17n.org>
856 * font-ft.c (ft_add_font): Fix typo.
858 2006-12-06 Kenichi Handa <handa@m17n.org>
860 * Version 1.3.4 released.
862 2006-11-16 Kenichi Handa <handa@m17n.org>
864 * input.c (parse_action_list): Allow (undo 0).
865 (adjust_markers): New function.
866 (preedit_insert, preedit_delete): Call adjust_markers.
867 (preedit_replace): New function.
868 (update_candidate): Call preedit_replace instead of preedit_insert
870 (filter): When ic_info->commit_key_head is nonzero, shift input
871 event keys even if there's no committed text.
873 2006-11-10 Kenichi Handa <handa@m17n.org>
875 * input.h (MInputContextInfo): New member commit_key_head.
877 * input.c (preedit_commit): Update ic_info->commit_key_head.
878 (take_action_list): Reset ic_info->commit_key_head on Mundo.
879 (filter): When committed, shift keys by ic_info->commit_key_head.
881 2006-10-30 Kenichi Handa <handa@m17n.org>
883 * input.c (preedit_delete): Fix typo.
884 (take_action_list): Print more debugging information. Allow
885 variable in arg of 'select' and `pushback'.
887 * database.c (gen_database_name): Don't put extra space.
888 (load_database): Print debugging information.
889 (register_databases_in_files): New arg headlen. Callers changed.
890 (mdatabase__load_for_keys): Shorten debugging information.
891 (mdatabase_load): Don't print debugging information here.
893 2006-10-27 Kenichi Handa <handa@m17n.org>
895 * input.c (marker_code): New arg surrounding. Callers changed.
896 (surrounding_pos): Check if name[0] == '@'.
897 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
898 (take_action_list): Likewise.
899 (get_preceding_char): If POS is zero, always call
900 get_surrounding_text.
902 2006-10-19 Kenichi Handa <handa@m17n.org>
904 * input.c (load_variables): Fix setting of `global'.
906 2006-10-16 Kenichi Handa <handa@m17n.org>
908 * draw.c (draw_background): Be sure to set *to_x.
909 (render_glyph_string): If from == to, just return.
911 2006-10-18 Kenichi Handa <handa@m17n.org>
913 * database.c (get_dir_info): Return NULL if the directory name is
915 (register_databases_in_files): Call register_database with
917 (mdatabase__update): Fix logic. Call register_database with
919 (mdatabase_define): Call register_database with
922 * input.c (delete_surrounding_text): Be sure to set members
923 preceding_text and following_text to NULL.
924 (shift_state): Save variable values in ic_info->vars_saved.
925 (preedit_commit): Don't print debug information here. Don't
926 change ic_info->keys here.
927 (get_candidate_list): Don't ref plist.
928 (take_action_list): Don't unref return value of
929 get_candidate_list. For undo, reset ic->produced and recover
930 ic_info->vars. Be sure to set ic->candidate_list to NULL after
932 (init_ic_info): Set ic_info->vars_saved.
933 (fini_ic_info): Unref ic_info->vars_saved.
934 (re_init_ic): Be sure to set ic->candidate_list to NULL after
936 (filter): Be sure to set members preceding_text and following_text
937 to NULL. Print debug information about produced text. Delete
938 processed keys from ic_info->keys.
940 * input.h (MInputContextInfo): New member vars_saved.
942 2006-10-16 Kenichi Handa <handa@m17n.org>
944 * database.c (mdatabase__update): Fix the way to get db_info.
946 2006-10-02 Kenichi Handa <handa@m17n.org>
948 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
949 `size' changed to 24.
951 * font.c (xlfd_unparse_name): Adjusted for the change of
953 (font_score): Likewise.
954 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
956 * m17n-X.c (MFontX, _MFontX): Deleted.
957 (SET_SIZE, HAVE_SIZE): Deleted.
958 (free_display_info): Adjusted for the change of
959 disp_info->font_list format.
960 (xfont_registry_list): Likewise.
961 (xfont_open): Likewise.
962 (xfont_list): Likewise.
963 (xfont_encode_char): Ignore size to find a realized font.
964 (MRealizedFontXft): Change the order of members to make it
965 compatible with MRealizedFontFT.
967 2006-09-27 Kenichi Handa <handa@m17n.org>
969 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
970 (mfont_close): Add comments.
972 * mtext-lbrk.c (mtext_line_break): Add comment.
974 2006-09-26 Kenichi Handa <handa@m17n.org>
976 * input.c (minput_get_description): Handle description about
977 inclusion-only input methods.
979 2006-09-21 Kenichi Handa <handa@m17n.org>
981 * input.c (M_gettext): New variable.
982 (fully_initialize): Initialize M_gettext.
983 (check_description): New function.
984 (load_commands): Call check_description.
985 (config_all_commands): Be sure to unref pl.
986 (load_variables): Call check_description.
987 (config_all_variables): Be sure to unref pl.
988 (load_im_info): Call check_description.
990 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
992 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
993 and bind_textdomain_codeset.
995 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
997 2006-09-15 Kenichi Handa <handa@m17n.org>
999 * input.c (reload_im_info): Update custom and global info.
1000 (init_ic_info): Fix previous change.
1002 2006-09-14 Kenichi Handa <handa@m17n.org>
1004 * database.c: Include <libgen.h>.
1005 (mdatabase__lock): Make a directory if necessary.
1007 * input.c (resolve_command): Adjusted for the format change of
1008 configured_cmds member.
1009 (load_commands, load_variables): Fix for errornous data handling.
1010 (config_command, config_variable): New function.
1011 (config_all_commands, config_all_variables): Renamed from
1012 config_commands and config_variables. Utilize the above function.
1013 (check_variable_value): Argument changed. Callers changed.
1014 (load_im_info): Call config_all_commands and config_all_variables.
1015 (init_ic_info): Adjusted for the format change of configured_vars
1017 (minput__init): Initialize Mcustomized, Mconfigured, and
1019 (Mcustomized, Mconfigured, Minherited): New variables.
1020 (minput_get_command): Be sure to return NULL if an input method
1021 use no local command.
1022 (minput_get_variable): Be sure to return NULL if an input method
1023 use no local variable.
1024 (minput_config_command, minput_config_variable)
1025 (minput_save_config): Adjusted for the format change of
1026 configured_cmds and configured_vars members.
1028 * plist.c (write_element): Delete superfluous ':'.
1030 2006-09-13 Kenichi Handa <handa@m17n.org>
1032 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
1033 (minput_config_file): Extern it.
1035 * draw.c (Minherited): Declaration moved to input.c.
1036 (mdraw__init): Don't initialize Minherited here.
1038 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
1040 2006-09-07 Kenichi Handa <handa@m17n.org>
1042 * textprop.c (mtext_serialize): Call mplist__serialize with the
1045 * plist.h (mplist__serialize): Prototype adjusted.
1046 (mplist__assq): Extern it.
1048 * plist.c: Include <ctype.h>
1049 (PUTC, PUTS): New macros.
1050 (write_symbol): New function.
1051 (write_element): New arg indent.
1052 (dump_string, dump_plist_element): Delete them.
1053 (mplist__from_string): New arg pretty.
1054 (mplist__assq): New function.
1055 (mdebug_dump_plist): Use write_element.
1057 * mtext.c (mtext_cat_char): Allocate more memory.
1058 (mdebug_dump_mtext): Don't escal a newline character.
1060 * m17n.h (minput_get_command, minput_get_variable)
1061 (minput_config_command, minput_config_variable)
1062 (minput_save_config): Extern them.
1064 * m17n-core.c: Include <string.h>.
1065 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
1066 use the stream stdout instead of a file of that name.
1068 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
1071 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
1072 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1073 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
1074 (MDEBUG_DUMP): Flush the stream.
1076 * input.h (struct _MInputMethodInfo): Delete member im. New
1077 members mdb, language, name, extra, cmds, configured_cmds,
1078 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
1079 (MInputContextInfo): New member tick.
1081 * input.c: Big change to improve user-side input method
1082 customization. Here, list just public API changes.
1083 (minput_get_commands, minput_get_variables)
1084 (minput_assign_command_keys, minput_set_variable): Label them
1086 (minput_get_command, minput_get_variable)
1087 (minput_config_command, minput_config_variable)
1088 (minput_save_config): New functions.
1090 * database.h (PATH_MAX): Define it if not yet defined.
1091 (PATH_SEPARATOR): Likewise.
1092 (enum MDatabaseStatus): New enum.
1093 (struct MDatabaseInfo): Moved from database.c. New members status,
1094 time, lock_file, and uniq_file.
1095 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
1096 (mdatabase__unlock): Extern them.
1098 * database.c: Include <time.h>.
1099 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
1100 (GEN_PATH): Args changed. Callers changed.
1101 (struct MDatabaseInfo): Moved to database.h.
1102 (struct MDatabase, mdb_list): Deleted.
1103 (mdatabase__list): New var.
1104 (get_database_filename): Deleted. Callers changed to use
1106 (find_file, get_database_file): New files.
1107 (get_dir_info): Initialize new members of MDatabaseInfo.
1108 (find_database): Arg chagnded. Callers changed.
1109 (free_db_info, register_database, register_databases_in_files):
1111 (update_database_list): Deleted.
1112 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
1113 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
1114 (mdatabase__update): New function.
1115 (mdatabase__check): Return value changed.
1116 (mdatabase__file, mdatabase__lock, mdatabase__save)
1117 (mdatabase__unlock): New functions.
1119 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
1121 * input.c (get_surrounding_text): Return -2 when surrounding text
1123 (get_following_char): Likewise.
1124 (get_preceding_char): Likewise.
1125 (minput__callback): Return 0 if there is a callback function,
1128 2006-08-17 Kenichi Handa <handa@m17n.org>
1130 * input.c (reset_ic): Use shift_state to setup the current state.
1132 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
1134 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
1135 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
1136 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
1138 2006-08-02 Kenichi Handa <handa@m17n.org>
1140 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
1142 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
1144 * font-ft.c (ft_encapsulate): Add code for debugging.
1145 (mfont__ft_drive_otf): Be sure to encode character before getting
1148 2006-07-21 Kenichi Handa <handa@m17n.org>
1150 * draw.c (mdraw_text_extents): Fix previous typo.
1152 2006-07-19 Kenichi Handa <handa@m17n.org>
1154 * draw.c (gstring_width): New arg lbearing.
1155 (render_glyph_string): Adjusted for the change of gstring_width.
1156 (mdraw_text_extents): Fix lbearing of ink and line metrics.
1158 * m17n-core.h (Mlanguage): Extern it.
1160 * m17n.h (Mlanguage): Extern deleted.
1162 * mtext.c (mtext__init): Initialize Mlanguage.
1163 (Mlanguage): Declaration moved from locale.c
1165 * locale.c (mlocale__init): Don't initialize Mlanguage here.
1166 (Mlanguage): Declaration moved to mtext.c.
1168 * language.c (mlang__init): Don't initialize Mlanguage here.
1170 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
1172 2006-07-14 Kenichi Handa <handa@m17n.org>
1174 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
1175 (MRealizedFontFT): New member face_encapsulated.
1176 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
1177 (ft_gen_font): New function.
1178 (ft_add_font): Use ft_gen_font.
1179 (ft_list_script): Store lists in ft_script_list.
1180 (ft_check_otf): New arg ft_face. Caller changed.
1181 (ft_check_language): Likewise.
1182 (ft_check_script): Likewise.
1183 (ft_encapsulate, ft_close): New functions.
1184 (mfont__ft_driver): Initialize members encapsulate and close.
1185 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
1187 * font.h (struct MRealizedFont): New member encapsulating.
1188 (struct MFontDriver): New members encapsulate and close.
1190 * font.c (mfont__match_p): If FONT is realized, check capability
1191 by font drivers's check_capability method.
1192 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
1195 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
1196 declarations of foundry and fam local vars.
1197 (xft_driver): Make it static.
1199 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
1200 (mfont_close): Extern them.
1202 * m17n-gd.c (device_open): Don't specify foundry and family of the
1205 2006-07-11 Kenichi Handa <handa@m17n.org>
1207 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
1209 2006-07-13 Kenichi Handa <handa@m17n.org>
1211 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
1213 (ft_check_script): Delete unused var.
1214 (ft_list_capability): Likewise.
1216 * font.c (mfont__get_capability): Setup cap->otf.
1217 (Motf): Make it global.
1218 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
1220 * font.h (MFontCapability): New member otf.
1222 * language.c (mlang__fini): Delete unused vars.
1224 * m17n-gui.h (Motf): Extern it.
1226 * database.c (update_database_list): Delete unused vars.
1228 2006-07-07 Kenichi Handa <handa@m17n.org>
1230 * font-ft.c (DEVICE_DELTA): Fix typo.
1232 2006-07-06 Kenichi Handa <handa@m17n.org>
1234 * fontset.c (mfont__lookup_fontset): Don't ignore family and
1237 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1239 * database.c: Update comments.
1241 2006-07-05 Kenichi Handa <handa@m17n.org>
1243 * database.c (PATH_MAX): Define it if not yet defined.
1244 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
1246 (get_database_filename): Use GEN_PATH.
1247 (get_dir_info): Don't include the last '/' in directory name.
1248 (register_database): New function.
1249 (update_database_list): Use register_database. Search all
1250 directories in mdatabase__dir_list for wildcard databases.
1251 (mdatabase__init): Check "~/.m17n.d".
1253 2006-07-03 Kenichi Handa <handa@m17n.org>
1255 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
1256 push reverse property.
1258 * plist.c (dump_plist_element): Fix previous change.
1260 2006-06-28 Kenichi Handa <handa@m17n.org>
1262 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
1265 * draw.c (MbidiNSM): New variable.
1266 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
1267 attention to bidi type NSM.
1268 (mdraw__init): Initialize MbibiNSM.
1270 * language.c (mscript__char_list): Fix finding a char-list element.
1272 * plist.c (dump_string): Return number of printed characters.
1273 (dump_plist_element): Print elements more compactly.
1275 2006-06-23 Kenichi Handa <handa@m17n.org>
1277 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
1278 (include_HEADERS): Likewise.
1280 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
1282 * language.c: Update documentation.
1284 2006-06-23 Kenichi Handa <handa@m17n.org>
1286 * font-ft.c (struct MFontFT): Delete member lang.
1287 (free_ft_info): Don't unref member lang. Destroy members langset
1289 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
1290 changed. Set members langset and charset.
1291 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
1293 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
1295 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
1296 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
1297 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
1298 characters at first. If it fails, try listing by language names.
1299 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
1300 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
1301 change of MFontCapability.
1302 (ft_list_capability): Likewise. Try listing by languages, then by
1303 scripts. Check OTF at last.
1304 (ft_check_script): New function.
1305 (ft_select): Adjusted for the check of MFontCapability.
1306 (ft_list_family_names): New function.
1307 (ft_check_capability): If cap->script is not Mnil, call
1309 (mfont__ft_driver): Initialize with ft_list_family_names.
1311 * font.h (struct MFontDriver): New member list_fmaily_names.
1312 (struct): Change member "MSymbol *lang" to "MSymbol language".
1314 * font.c: Include "language.h".
1315 (Motf): New variable.
1316 (otf_script_list, load_otf_script_list): Delete it.
1317 (find_script_from_otf_tag): Delete it.
1318 (merge_capability): New function.
1319 (mfont__init): Init Motf.
1320 (mfont__fini): Don't unref otf_script_list.
1321 (free_font_capability): Check cap->script_tag to determine if
1322 OTF-related capability is set.
1323 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
1324 the change of type MFontCapability.
1325 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
1326 and Motf properties.
1327 (mfont_list): Call merge_capability for LANGUAGE arg.
1328 (mfont_list_family_names): New function.
1330 * input-gui.c: Typo in comments fixed.
1332 * input.c: Typo in comments fixed.
1334 * language.h (mlanguage__list): Delete it.
1335 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
1338 * language.c: Include "mtext.h".
1339 (M_script_lang_list): Delete it.
1340 (language_list, script_list): New variables.
1341 (load_lang_script_list, init_language_list, init_script_list): New
1343 (mlang__init): Don't load language database here.
1344 (mlang__fini): Unref language_list and script_list if not NULL.
1345 (mlanguage__list): Delete it.
1346 (mlanguage__info, mscript__info, mscript__char_list)
1347 (mscript__otf_tag, mscript__from_otf_tag): New functions.
1348 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
1349 (mscript_list, mscript_language_list): New functions.
1351 * m17n-gui.h (mfont_list_family_names): Extern it.
1353 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
1354 (mlanguage_text, mscript_list, mscript_language_list): Extern
1357 2006-06-21 Kenichi Handa <handa@m17n.org>
1359 * m17n-X.c (xfont_driver): Initialize with
1360 xfont_list_family_names.
1361 (xfont_list_family_names): New function.
1362 (xft_driver): Initialize with NULL for list_family_names member.
1363 (device_init): Set list_family_names member of xft_driver to that
1364 of mfont__ft_driver.
1366 2006-06-06 Kenichi Handa <handa@m17n.org>
1368 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
1370 2006-03-24 Kenichi Handa <handa@m17n.org>
1372 * font-ft.c (ft_open): Improve debug message.
1374 * fontset.c (mfontset__get_font): Fix for the case that no font in
1375 per_script list is available.
1377 2006-02-06 Kenichi Handa <handa@m17n.org>
1379 * Version 1.3.3 released.
1381 2006-02-22 Kenichi Handa <handa@m17n.org>
1383 * textprop.c: Fix some typos in documentation.
1385 * plist.c: Fix some typos in documentation.
1387 * m17n-core.h: Fix some typos in documentation.
1388 (M17NLIB_PATCH_LEVEL): Updated to 3.
1389 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
1391 * symbol.c: Fix some typos in documentation.
1393 * mtext.c: Fix some typos in documentation.
1395 * input.c: Fix several typos in documentation.
1397 2006-02-06 Kenichi Handa <handa@m17n.org>
1399 * Version 1.3.2 released.
1401 2006-02-03 Kenichi Handa <handa@m17n.org>
1403 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
1404 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
1406 * font.c (xlfd_parse_name): Fix handling of the name "nil".
1408 * draw.c (layout_glyphs): Fix handling left_padding of
1411 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
1413 2006-02-02 Kenichi Handa <handa@m17n.org>
1415 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
1416 if WITH_GUI is true.
1418 2006-01-25 Kenichi Handa <handa@m17n.org>
1420 * input.c (resolve_expression): If the value of PLIST is a plist,
1421 but the first element is not symbol, return 0.
1423 2006-01-17 Kenichi Handa <handa@m17n.org>
1425 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
1426 HAVE_GD is 2 or the greater.
1428 2006-01-16 Kenichi Handa <handa@m17n.org>
1430 * Version 1.3.1 released.
1432 2006-01-16 Kenichi Handa <handa@m17n.org>
1434 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
1435 simulating anti-aliasing.
1437 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
1438 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
1440 2006-01-12 Kenichi Handa <handa@m17n.org>
1442 * input.c (get_surrounding_text): Always pop ic->plist.
1443 (reset_ic): Don't reset ic->plist.
1445 2006-01-10 Kenichi Handa <handa@m17n.org>
1447 * input.c (preedit_commit): For debugging, print only commiting
1448 charactes. Don't set ic->candidate_show to 0.
1449 (handle_key): Don't run branch-actions just by shifting to the
1451 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
1452 Reset vars and plist.
1454 2006-01-07 Kenichi Handa <handa@m17n.org>
1456 * input.c (load_branch): Confirm that maps is not NULL.
1458 2006-01-05 Kenichi Handa <handa@m17n.org>
1460 * input-gui.c (win_filter): Try to convert arg to key only when
1463 * plist.c (read_integer_element): If '#' and '-' are followed by
1464 non-integer-constituent, read them as a part of a symbol.
1465 (read_symbol_element): New arg C.
1466 (read_element): Adjust args to read_symbol_element.
1468 * input.c (load_macros): On overwriting a macro, free the old
1470 (minput__init): Store Mmap in load_im_info_keys.
1471 (minput_get_title_icon): If the input method has no title, be sure
1473 (minput_get_description): If the input method has no description,
1474 be sure to return NULL.
1475 (minput_get_variables): Fix documentation.
1476 (handle_key): Pay attention to the case that key is Mnil.
1477 (filter): Likewise. Fix handling of such symbol as S-A.
1479 2005-12-22 Kenichi Handa <handa@m17n.org>
1481 * Version 1.3.0 released.
1483 2005-12-22 Kenichi Handa <handa@m17n.org>
1485 * font-ft.c (ft_list): If the specified font has no property,
1488 2005-12-20 Kenichi Handa <handa@m17n.org>
1490 * character.c (mchar_get_prop): Check char_prop_list.
1491 (mchar_put_prop, mchar_get_prop_table): Likewise.
1493 2005-12-18 Kenichi Handa <handa@m17n.org>
1495 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
1496 file name sans language.
1498 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
1500 * input.c: Fix typo in comments.
1502 2005-12-14 Kenichi Handa <handa@m17n.org>
1504 * input.c (minput_get_title_icon): Check the default icon for the
1507 2005-12-13 Kenichi Handa <handa@m17n.org>
1509 * input.c (Mless_equal, Mgreater_equal): New variables.
1510 (parse_expression, resolve_expression, parse_action_list)
1511 (take_action_list): Handle the aboves.
1512 (filter): Treat key S-X as X.
1513 (minput__init): Initialize Mless_equal and Mgreater_equal.
1514 (minput_get_title_icon): New function.
1516 * m17n.h (minput_get_title_icon): Extern it.
1518 * database.c (get_database_filename): Return a filename instead of
1520 (load_database): Adjusted for the above change.
1521 (mdatabase__load_for_keys): Likewise.
1522 (mdatabase__find_file): New function.
1524 * database.h (mdatabase__find_file): Extern it.
1526 * font.h (mfont__resize): Delete extern.
1528 * font.c (mfont__list): Check resize ratio.
1529 (mfont__resize): Delete it.
1530 (mfont_resize_ratio): Include the code of mfont__resize.
1532 * font-ft.c (ft_open): Check resize ratio.
1534 * m17n-X.c (xfont_open): Check resize ratio.
1535 (xft_open): Likewise.
1537 2005-12-07 Kenichi Handa <handa@m17n.org>
1539 * input.c (take_action_list): If take_action_list return -1,
1541 (handle_key): Likewise.
1543 * face.c (mface__for_chars): When font is specified and layouter
1544 is found for it, if the layouter doesn't support one of a
1545 character, use a face sans layouter for it.
1547 2005-12-06 Kenichi Handa <handa@m17n.org>
1549 * fontset.c (mfont__lookup_fontset): If only a fallback font is
1550 found, don't use it for more than one character.
1552 2005-12-05 Kenichi Handa <handa@m17n.org>
1554 * face.c (mface__realize): Set rfont->layouter to Mnil.
1555 (mface__for_chars): Fix handling of layouter.
1557 * character.h (mchar__define_prop): Extern it.
1559 * database.c (update_database_list): Call mchar__define_prop if
1562 * character.c (mchar__init): Don't call mchar_define_property.
1563 Instead just initialize property keys.
1564 (mchar__fini): Free char_prop_list only if it's not NULL.
1565 (mchar__define_prop): New function.
1566 (mchar_define_property): Call mchar__define_prop.
1568 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
1571 2005-12-02 Kenichi Handa <handa@m17n.org>
1573 * language.c (mlang__init): Handle extra chars.
1575 * m17n-gui.h (mfont_check): Adjust prototype.
1577 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
1578 (xfont_check_capability): New function.
1579 (xft_driver): Specify xft_check_capability.
1580 (xft_check_capability): New function.
1582 * font-ft.c (M0_3): Delete it.
1584 (ft_get_charmaps): Refer to M0.
1585 (fc_parse_pattern): Fix previous change.
1586 (ft_list_language): Check also extra chars.
1587 (ft_check_otf): Define it even if HAVE_OTF is undef.
1588 (ft_check_lang): Check the result of FcLangSetHasLang against
1589 FcLangDifferentLang. Check also extra chars.
1590 (ft_list_capability): Delete ifdef HAVE_OTF.
1591 (ft_select): Likewise.
1592 (ft_open): Improve debug information.
1593 (ft_check_capability): New function.
1594 (mfont__ft_driver): Specify ft_check_capability.
1595 (mfont__ft_init): Initialize M0.
1597 * fontset.c (get_font_from_group): New function.
1598 (mfontset__get_font): New function.
1600 * fontset.h (mfontset__get_font): Extern it.
1602 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
1603 (mfont__fini): Delete ifdef HAVE_OTF.
1604 (free_font_capability): Likewise.
1605 (mfont__get_capability): Likewise.
1606 (mfont__check_capability): New function.
1607 (mfont_check): Change the order of arguments. Use
1610 * font.h (struct MFontDriver): New member check_capability.
1611 (MFontCapability): Delete ifdef HAVE_OTF.
1612 (mfont__check_capability): Extern it.
1614 * face.c (mface__realize): Fix handling of FONT arg.
1615 (mface__for_chars): Fix handling of explicitly specified font.
1617 2005-11-25 Kenichi Handa <handa@m17n.org>
1619 * font-flt.c (run_command): Print debug info for
1622 * draw.c (layout_glyphs): Fix handling of left/right_padding.
1624 * face.c (mface__for_chars): Check rfont before accessing the
1627 2005-11-21 Kenichi Handa <handa@m17n.org>
1629 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
1632 * fontset.c (fontset_table): New variable.
1633 (free_fontset): Call M17N_OBJECT_UNREGISTER.
1634 (mfont__fontset_init): Add fontset_table as an object array.
1635 (mfont__realize_fontset): Ref FONTSET.
1636 (mfont__free_realized_fontset): Unref REALIZED->fontset.
1637 (mfontset): Call M17N_OBJECT_REGISTER.
1638 (mfontset_copy): Likewise.
1640 * input.c (handle_key): For debugging, print information about
1642 (filter): Add an alias for Meta and Alt modifiers.
1643 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
1645 (minput__init): Initialize them.
1646 (parse_expression): New function.
1647 (resolve_expression): New function.
1648 (parse_action_list): Handle expressions by parse_expression.
1649 (take_action_list): Handle expressions by resolve_expression.
1650 (parse_nested_list_value): Fix previous change.
1651 (resolve_command): Fix handling of the return value of
1654 2005-11-18 Kenichi Handa <handa@m17n.org>
1656 * font-ft.c (ft_check_otf, otf_script_list): Define only when
1657 HAVE_OTF is defined.
1658 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
1660 (ft_select): Likewise.
1662 * font.c (mfont_list): Fix for the case that FONT is NULL.
1663 (OTF_tag): Delete it.
1664 (load_otf_script_list): Define only when HAVE_OTF is defined.
1665 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
1668 * draw.c (truncate_gstring): Be sure to truncate at
1669 glapheme-cluster boundary.
1671 2005-11-11 Kenichi Handa <handa@m17n.org>
1673 * input.c (delete_surrounding_text): Clear cache if necessary.
1675 2005-11-09 Kenichi Handa <handa@m17n.org>
1677 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
1678 glyph prev is also supported by the current flt.
1680 2005-11-08 Kenichi Handa <handa@m17n.org>
1682 * m17n-X.c (xft_render): Cancel previous change.
1684 2005-11-07 Kenichi Handa <handa@m17n.org>
1686 * input.c: Include <stdlib.h>.
1687 (get_surrounding_text, delete_surrounding_text)
1688 (get_preceding_char, get_following_char): New functions.
1689 (integer_value): New arg surrounding. If it is nonzero, try to
1690 get a surrounding character. Callers changed.
1691 (take_action_list): Check `value' before setting an element.
1692 (destroy_ic): Unref ic_info->preceding_text and
1693 ic_info->following_text.
1694 (minput__init): Initialize Minput_get_surrounding_text and
1695 Minput_delete_surrounding_text.
1696 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
1698 (filter): Unref ic_info->preceding_text and
1699 ic_info->following_text.
1701 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
1704 * input.h (MInputContextInfo): New members preceding_text and
1707 2005-11-04 Kenichi Handa <handa@m17n.org>
1709 * input.c (parse_nested_list_value): Fix handling of the global
1711 (get_nested_list): Get global definitions by load_partial_im_info.
1712 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
1713 MInputCandidatesChanged.
1714 (take_action_list): Likewise.
1715 (reset_ic): Likewise.
1716 (create_ic): Don't pay special attention to
1717 Mcandidates_group_size.
1718 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
1719 (minput_set_variable): Get a definition of varible by
1720 mplist_find_by_value, not mplist_get.
1722 * m17n.h (enum MInputCandidatesChanged): New enum.
1724 2005-11-01 Kenichi Handa <handa@m17n.org>
1726 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
1728 (mwin__destroy_window): If xft_draw's drawable is win, change it
1729 to device->drawable before destroying win.
1731 2005-10-31 Kenichi Handa <handa@m17n.org>
1733 * input.c (load_im_info): Fix adding of state.
1735 * m17n-core.c (m17n_fini_core): Fix reporting of module
1738 * m17n.c (m17n_fini): Fix reporting of module finalization.
1740 * m17n-gui.c (m17n_init_win): Fix reporting of module
1743 2005-10-29 Kenichi Handa <handa@m17n.org>
1745 * input.c (get_candidate_list): Fix the timing of referring plist.
1747 2005-10-28 Kenichi Handa <handa@m17n.org>
1749 * input.c (load_branch): Ignore an undefined map name.
1750 (load_im_info): Set im_info->title from `name' only if it's not
1752 (shift_state): Always update ic->status.
1753 (adjust_candidates): Renamed from adjust_candidate_command.
1754 Argument changed. Caller changed.
1755 (get_candidate_list, regularize_action): New functions.
1756 (take_action_list): Use them. On handling Munhandle, don't set
1758 (handle_key): If KEY is not handled by MAP, and MAP has
1759 branch_actions, perform them.
1761 * database.c (mdatabase__fini): Free dir_info->filename;
1763 2005-10-20 Kenichi Handa <handa@m17n.org>
1765 * input.c (marker_code): Accept '@@'.
1766 (integer_value): Handle '@@'.
1767 (parse_action_list): Accept a symbol argument.
1768 (take_action_list): Resolve the symbol argument. Handle the
1771 2005-10-18 Kenichi Handa <handa@m17n.org>
1773 * input.c: Include "charset.h".
1774 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
1776 (MIMState): New member (M17NObject control).
1777 (lookup_nested_list, set_nested_list, parse_nested_list_value)
1778 (get_nested_list, resolve_variable): New functions.
1779 (integer_value): New arg (MPlist **value). Set it to the plist
1780 element containing the value.
1781 (resolve_command): New function.
1782 (load_translation): New arg (MPlist *map_actions).
1783 (load_branch): New args language and name. If `keylist' is a
1784 symbol, resolved that as a command name.
1785 (free_map): New arg top. Free map->map_actions only if top is
1787 (free_state): New function.
1788 (load_state): New arg name.
1789 (im_info_list): New variable.
1790 (free_im_info, get_im_info_by_tags): New functions.
1791 (load_im_info): Arg key changed to plist. Handle `include'.
1792 Return (MInputMethodInfo *).
1793 (preedit_commit): Ref ic->candidate_list.
1794 (get_select_charset, adjust_candidate_command): New functions.
1795 (take_action_list): Handle `include'. Adjust candidate action
1796 properly. Handle control variables `candidates-charset' and
1797 `candidates-group-size'.
1798 (open_im): Use get_im_info.
1799 (create_ic): Get global variables.
1800 (load_partial_im_info): New function.
1801 (get_im_info): New function.
1802 (check_command_keyseq, check_command_list, check_variable_list):
1804 (minput__init): Don't handle M_database_hook and Mdetail_text.
1805 Initialize M_candidates, Mcandidates_group_size,
1806 Mcandidates_charset.
1807 (parse_variable_list, get_variable_list, parse_command_list)
1808 (get_command_list): Delete them.
1809 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
1810 (minput__fini): Simply unref command_list and variable_list.
1811 (minput_get_description): Adjusted for the new form of description.
1812 (minput_get_commands): Use get_nested_list.
1813 (minput_assign_command_keys): Likewise.
1814 (minput_get_variables, minput_set_variable): Likewise.
1816 * input.h (MInputMethodInfo): New members im and maps.
1818 * database.h (M_database_hook): Delete extern.
1819 (MDatabaseHookFunc): Delete extern.
1820 (mdatabase__check): Extern it.
1822 * database.c: Include <glob.h>.
1823 (MAX_TIME): New macro.
1824 (Masterisk): New variable.
1825 (get_database_stream): Argument changed to (MDatabaseInfo *).
1827 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
1828 (find_database): New function.
1829 (update_database_list): New function.
1830 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
1831 calling update_database_list.
1832 (mdatabase__check): New function.
1833 (mdatabase_find): Use update_database and find_database. Don't
1834 handle MDatabaseHookFunc.
1835 (mdatabase_list): Call update_database at first.
1836 (mdatabase_define): Adjusted for the change of mdb->extra_info.
1837 (MDatabaseList): New type.
1839 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
1841 * m17n.h (Mdetail_text): Delete extern.
1843 * m17n-core.h (mplist_conc): Delete extern.
1845 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
1847 (mplist_conc): Renamed to mplist__conc.
1848 (mplist__pop_unref): New function.
1850 2005-10-14 Kenichi Handa <handa@m17n.org>
1852 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
1854 (read_element): If keys is an empty plist, return any element
1856 (dump_plist_element): Check if plist is nested.
1857 (mplist_conc): Always ref tail.
1858 (mplist_set): If key is a managing key, ref val in advance.
1860 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
1861 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
1862 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
1865 * fontset.c (free_fontset): Unref fontset_list if necessary.
1866 (mfont__fontset_fini): Don't free fontset_list. Unref
1868 (mfont__realize_fontset): Initialize request.
1869 (mfontset): Ref default_fontset or fontset only if necessary.
1870 (mfontset_copy): Don't ref copy.
1872 * draw.c (render_glyphs): Check gend->type before checking
1875 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
1876 unrefed plists to NULL.
1878 2005-10-04 Kenichi Handa <handa@m17n.org>
1880 * textprop.c (mtext_serialize): Be sure to make mt
1881 MTEXT_FORMAT_UTF_8 and NULL terminated.
1883 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
1885 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
1887 2005-10-03 Kenichi Handa <handa@m17n.org>
1889 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
1890 is not at the beginning of line.
1892 2005-09-22 Kenichi Handa <handa@m17n.org>
1894 * input.c: Include <sys/stat.h> and <unistd.h>.
1895 (Minclude, Mcommit, Munhandle): New variables.
1896 (minput__init): Initialize them. Push only Mstate to
1897 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
1898 (parse_action_list): Allow integer arg for undo. Handle Mcommit
1900 (load_input_method): Handle "include" directive. If no states are
1902 (shift_state): If state_name is Mt, shift back to the previous
1903 state. Call preedit_commit to commit preedit text.
1904 (preedit_commit): New function.
1905 (take_action_list): Improve debug printing. Handle commit and
1907 (handle_key): Check the return value of take_action_list. Don't
1908 take branch_actions just after changing to the root map.
1909 (reset_ic): Reset all ic_info members.
1910 (filter): When a key is not handled, just move ic_info->keys
1911 instead fo calling reset_ic.
1912 (load_im_info): If key is not Mstate, push Mmap to
1914 (MDatabaseStatList): New type.
1915 (imdir_stat_list): New variable.
1916 (input_method_hook): Don't cancel the hook. Check the
1917 modification time of directories.
1918 (minput__fini): Free imdir_stat_list;
1920 * input.h (MInputContextInfo): New member prev_state.
1922 * m17n-core.h (mplist_conc): Extern it.
1924 * plist.c (mplist_conc): New function.
1926 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
1928 * font.h (MRealizedFont): New member average_width.
1930 * font-ft.c (ft_open): Set rface->average_width.
1932 * font.c (xlfd_unparse_name): Print '*' before registry name.
1934 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
1935 (xfont_open): Set rfont->average_width.
1936 (xft_open): Likewise.
1937 (device_open): Initialize disp_info->AVERAGE_WIDTH.
1939 * internal-gui.h (struct MFrame): New member average_width.
1941 * m17n-gui.c (mframe): Fix setting of frame->rfont.
1942 (mframe_get_prop): Return the average_width of a font.
1944 * face.c (mface__realize): Set rface->average_width.
1945 (mface__update_frame_face): Set frame->average_width.
1947 * face.h (MRealizedFace): New member average_width.
1949 2005-09-19 Kenichi Handa <handa@m17n.org>
1951 * font.c (xlfd_unparse_name): New arg full_xlfd.
1952 (mfont__encode_char): Use shortcut only for X core fonts.
1953 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
1954 (mfont_put_prop): Handle `language' property.
1955 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
1956 Print file can capability info too.
1958 * m17n-core.c (mdebug__output): New variable.
1959 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
1960 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
1961 (m17n_fini_core): Close mdebug__output if it's not stderr.
1963 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
1964 (xfont_open): Handle baseline_offset.
1965 (xfont_find_metric): Likewise.
1966 (xfont_render): Likewise.
1967 (xft_open): Likewise.
1968 (xft_render): Likewise.
1970 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
1971 (mdebug__output): Extern it.
1972 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1973 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
1974 (MDEBUG_DUMP): New macro.
1975 (MDEBUG_PRINT_TIME): Print to medebug__output.
1977 * font.h (MRealizedFont): New member baseline_offset.
1979 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
1981 (fc_weight_table): Add FC_WEIGHT_REGULAR.
1982 (ft_list_family): Check alias.
1983 (ft_list_language): If language is "en", don't try to the second
1985 (ft_default_list): New variable.
1986 (ft_list_default): New function.
1987 (ft_select): If family is not specified, try only the default
1988 fonts. Treat the weights normal and medium same.
1989 (ft_open): Fix debug message. If registry is not specified, try
1990 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
1991 (ft_find_metric): Likewise.
1992 (ft_render): Likewise.
1993 (ft_list): Fix debug message. Accept the registring iso8859-1.
1994 If family is not specified, try only the default fonts.
1996 * face.c (mface__realize): Fix logic of opening a font.
1998 2005-09-16 Kenichi Handa <handa@m17n.org>
2000 * face.c (mface__realize):
2002 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
2005 * input.c (shift_state): Fix the condition of taking init actions.
2006 (take_action_list): Fix handling of pushback action.
2007 (handle_key): Don't change key while checking its alias.
2008 (minput__init): Initialize new variables.
2009 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
2012 2005-09-12 Kenichi Handa <handa@m17n.org>
2014 * mtext.c (mtext__uppercase): Add proper open/close parens.
2015 (mtext_titlecase): Add proper casting.
2017 * input.c (parse_action_list): Handle the case that the arg is a
2018 key sequence (MText or MPlist).
2019 (take_action_list): Likewise.
2020 (shift_state): Shorter debug message.
2021 (handle_key): Terminate a debug message by "\n".
2022 (reset_ic): Don't take initial actions here.
2023 (minput_open_im): Print a debug message.
2024 (minput_close_im): Likewise.
2025 (minput_create_ic): Likewise.
2026 (minput_destroy_ic): Likewise.
2028 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
2030 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
2033 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
2034 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
2037 * character.c: Add Japanese documentation for
2038 mchar_get_prop_table ().
2040 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
2042 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
2043 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
2044 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
2046 (init_case_conversion): New function.
2047 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
2048 (uppercase_precheck, lowercase_precheck, final_sigma)
2049 (after_soft_dotted, more_above, before_dot, after_i)
2050 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
2052 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
2054 * plist.c (read_mtext_element): Fix previous change.
2056 2005-09-05 Kenichi Handa <handa@m17n.org>
2058 * plist.c (read_mtext_element): Handle \uXXXX notation.
2060 * internal.h (MTABLE_MALLOC): Don't use a local variable.
2061 (MTABLE_ALLOCA): Change the name of local variable.
2063 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
2064 HAVE_FREETYPE are defined.
2066 * m17n-X.c: Check HAVE_X11.
2068 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
2069 directory listing libraries.
2070 (noinst_PROGRAMS): Define it only in maintainer mode.
2072 2005-09-02 Kenichi Handa <handa@m17n.org>
2074 * m17n-gui.h (mdraw_line_break_option): Extern it.
2076 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
2077 end of the first glyph.
2078 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
2080 (mdraw_line_break_option): New variable.
2081 (mdraw_default_line_break): Use mtext_line_break.
2083 * mtext.h (wordseg_func_table): Don't extern it.
2084 (mtext__wseg_fini): Extern it.
2086 * mtext.c: Don't include word-thai.h.
2087 (wordseg_func_table): Delete this variable.
2088 (mtext__init): Don't initialize above. Don't call
2089 mtext__word_thai_init.
2090 (mtext__fini): Don't free wordseg_func_table. Call
2091 mtext__wseg_fini instead fo mtext__word_thai_fini.
2092 (MTextWordsegFunc): Don't typedef it.
2093 (mtext__word_segment): Moved to mtext-wseg.c.
2095 * m17n-core.h (enum MTextLineBreakOption): New enum.
2096 (mtext_line_break): Extern it.
2098 * mtext-wseg.c: New file.
2100 * mtext-lbrk.c: New file.
2102 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
2103 add mtext-lbrk.c and mtext-wseg.c.
2105 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
2106 the case that head is NULL.
2108 2005-09-01 Kenichi Handa <handa@m17n.org>
2110 * word-thai.c (wordseg_propertize): If the property value is nil,
2111 don't make the property no-merge.
2112 (thai_wordseg): Don't require *from and *to are set a priori. Pay
2113 attention to the case that they are NULL.
2114 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
2117 * character.c (mchar_get_prop_table): New function.
2119 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
2121 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
2122 (mchar_get_prop_table): Extern it.
2124 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
2125 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
2127 * internal.h (enum MTextCoverage): New enum.
2128 (MText): New member coverage.
2130 * mtext.c (FORMAT_COVERAGE): New macro.
2131 (insert): Copy mt2->coverage.
2132 (mtext__from_data): Initialize mt->coverage.
2133 (mtext__adjust_format): Update mt->coverage.
2134 (mtext): Initialize mt->coverage.
2135 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
2136 Update mt->coverage if necessary.
2137 (mtext_duplicate): Copy mt->coverage.
2138 (mtext_insert, mtext_replace): New functions.
2139 (mtext_dup): Use mtext_duplicate.
2140 (mtext__word_segment): Don't set *from and *to if a word
2141 segmentation funcion is not found.
2142 (mtext_ins_char): Fix typo.
2144 2005-08-25 Kenichi Handa <handa@m17n.org>
2146 * font.h (MFont): New member for_full_width.
2148 * font.c (compare_font_score): Prefer a font of not
2151 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
2152 registry charset of a font is one of CJK charsets.
2154 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
2155 supports some of CJK.
2157 2005-08-24 Kenichi Handa <handa@m17n.org>
2159 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
2161 * m17n-gui.c (null_device_open): Check Mresolution param and set
2164 * m17n-gd.c (device_open): Check Mresolution param and set
2167 * m17n-X.c (MWDevice): New member resy.
2168 (xfont_open): Set ascent, descent, and max_advance members of
2170 (xft_open): Likewise.
2171 (device_open): Compare also screen_num to find a device. Set
2172 device->resy and frame->dpi.
2174 * internal-gui.h (MFrame): New member dpi.
2176 * font.h (MRealizedFont): New member max_advance.
2178 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
2179 (mfont__init): Don't initialize Mascent, Mdescent.
2180 (Mascent, Mdescent): Delete these variables.
2181 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
2182 Mfont_descent instead of Mascent and Mdescent.
2183 (mfont_put_prop): Allow negative size.
2184 (mfont_find): Handle the case of spec->size < 0. Fix previous
2186 (mfont_list): Handle the case of spec->size < 0.
2187 (mfont_check): Likewise.
2189 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
2190 (fc_get_pattern): Handle the case of font->size < 0.
2191 (ft_open): Set ascent, descent, and max_advance members of rfont.
2192 (ft_find_metric): Improve rounding.
2193 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
2196 * face.c (mface__realize): Handle the case of font->size < 0.
2198 2005-08-22 Kenichi Handa <handa@m17n.org>
2200 * coding.c (MConverterStatus): Change the member buf to union.
2201 (mconv_buffer_converter): Add const to the arg buf.
2202 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2203 (mconv_decode): Adjusted for the change of MConverterStatus.
2204 (mconv_encode_range): Likewise.
2206 * m17n.h (mconv_buffer_converter): Prototype adjusted.
2207 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2209 2005-08-20 Kenichi Handa <handa@m17n.org>
2211 * m17n-gui.h (mfont_from_name): Prototype adjusted.
2212 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
2214 * m17n-X.c (xfont_open): Set members ascent, descent, and
2215 max_advance of rfont.
2216 (xft_open): Likewise.
2218 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
2220 (mfont__ft_parse_name): Add const to the arg name.
2222 * font.c (xlfd_parse_name): Add const to the arg name. Call
2223 mfont__set_property instead of mfont_set_spec. Set font->spacing.
2224 (xlfd_unparse_name): Handle spacing.
2225 (mfont__init): Initialize new variables.
2226 (mfont__id): Handle spacing.
2227 (mfont__merge): Likewise.
2228 (mfont__set_spec): This function deleted.
2229 (mfont__parse_name_into_font): Add const to the arg name. Fix the
2230 condition of calling mfont__ft_parse_name.
2231 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
2232 (mfont_get_prop): Handle properties spacing, ascent, descent,
2234 (mfont_find): Return a realized font.
2235 (mfont_from_name): Add const to the arg name.
2237 * font.h (enum MFontProperty): New member MFONT_SPACING.
2238 (enum MFontSpacing): New enum.
2239 (MFont): New members spacing and max_advance.
2240 (mfont__ft_parse_name): Prototype adjusted.
2241 (mfont__set_spec): Extern deleted.
2242 (mfont__parse_name_into_font): Prototype adjusted.
2244 2005-08-19 Kenichi Handa <handa@m17n.org>
2246 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
2248 * font.c (mfont_list): If FONT is null, use a temporary font.
2249 (mfont_parse_name): Add const to the arg name.
2251 2005-08-18 Kenichi Handa <handa@m17n.org>
2253 * word-thai.c: Surround code by #ifdef and #endif to escape from
2256 * font-ft.c: Mostly re-written.
2258 * font-flt.c (FontLayoutCmdOTF): This type deleted.
2259 (FontLayoutCmd): Type of the member otf changed..
2260 (load_otf_command): Adjusted for the format change of otf command.
2261 (load_command): Likewise.
2262 (free_flt_command): Unref cmd->body.otf.
2263 (run_otf): Ajusted for the type change of otf_cmd.
2264 (run_command): Ajusted for the type change of otf_cmd. On
2265 debugging, print ctx->combining_code.
2266 (mfont__flt_run): Initialize ctx's members code_offset,
2267 combining_code, and left_padding to 0.
2269 * face.h (struct MRealizedFace): New member font.
2270 (mface__realize): Prototype adjusted.
2272 * face.c (find_realized_face): New arg font.
2273 (find_realized_face): Adjusted for the change of MFont.
2274 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
2275 (mface__fini): Don't call mdebug__report_object.
2276 (mface__realize): New arg font.
2277 (mface__for_chars): Adjusted for the change of mfont__encode_char.
2278 Optimize the latin case.
2279 (mface__free_realized): Free rface->font.
2280 (mface__update_frame_face): Adjusted for the change of mface__realize.
2281 (mface_equal): New function.
2283 * draw.c (Mcommon): New variable.
2284 (visual_order): Args to mfont__encode_char changed.
2285 (compose_glyph_string): Handle Mfont text property.
2286 (layout_glyphs): Adjusted for the change of MFont.
2287 (mdraw__init): Initialize Mcommon.
2288 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
2290 * font.h (enum MFontType): Members completely changed.
2291 (enum MFontProperty): Move MFONT_SIZE to the tail.
2292 (enum MFontSource): New enum.
2293 (struct MFont): New members type, source, sizes, file, capability,
2295 (struct MRealizedFont): Type of member font changed. Members
2296 score, status, and encoding deleted.
2297 (MFontScore): New type.
2298 (MFontList): Member changed.
2299 (struct MFontDriver): New member has_char. Types of members
2301 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2302 (Mapple_roman): Extern them.
2303 (OTF_Tag): Typedefed if not HAVE_OTF.
2304 (enum MFontOpenTypeTable): New enum.
2305 (MFontCapability): New type.
2306 (mfont__ft_drive_otf): Prototype adjusted.
2307 (mfont__score): Extern deleted.
2308 (mfont__merge): Extern it.
2309 (mfont__has_char): Extern it.
2310 (mfont__encode_char): Prototype adjusted.
2311 (mfont__open): Extern it.
2312 (mfont__set_spec): Prototype adjusted.
2313 (mfont__get_capability): Extern it.
2315 * font.c: Include "fontset.h".
2316 (M_font_capability, M_font_list, M_font_list_len): New variables.
2317 (font_score_priority): Change order of initial elements.
2318 (font_score_shift_bits): Fix array size.
2319 (common_weight): Add "thin", "semibold", and "heavy".
2320 (common_stretch): Add "ultracondensed", "extracondensed",
2321 "extraexpanded", and "utltraexpand".
2322 (font_weight_regular, font_weight_normal, font_weight_medium): New
2324 (gen_font_name): This function deleted.
2325 (find_encoding): Set font->encoding.
2326 (OTF_tag): New function.
2327 (otf_script_list): New variable.
2328 (load_otf_script_list): New function.
2329 (find_script_from_otf_tag): New function.
2330 (xlfd_parse_name): Set font->type and font->source.
2331 (mfont__free_realized): Free chains rfonts.
2332 (font_score): Renamed from mfont__score.
2333 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2334 (Mapple_roman): New variables.
2335 (mfont__init): Initilize new variables. Initalize
2336 default_encoding.encoding_name and
2337 default_encoding.encoding_charset to Municode_full and
2338 mcharset__unicode. Use SAFE* macros for allocating filepath
2340 (mfont__fini): Free otf_script_list.
2341 (mfont__id): New function.
2342 (mfont__match_p): Check also capability member of MFont.
2343 (mfont__merge): New funciton.
2344 (mfont__set_spec_from_face): Set type and source members.
2345 (mfont__set_spec_from_plist): Set capability and type members.
2346 (mfont__select): Argument changed.
2347 (mfont__available): New function.
2348 (compare_font_score): New function.
2349 (mfont__list): New function.
2350 (mfont__open): Return a realized font.
2351 (mfont__resize): Adjusted for the change of MFont.
2352 (mfont__has_char): New function.
2353 (mfont__encode_char): Argument changed.
2354 (mfont__set_spec): Argument changed.
2355 (free_font_capability): New function.
2356 (mfont__get_capability): New function.
2357 (MFontfile): New variable.
2358 (mfont_get_prop): Adjusted for the change of MFont.
2359 (mfont_put_prop): Likewise.
2360 (mfont_set_selection_priority): Fix the way of setting
2361 font_score_priority[].
2362 (mfont_find): Use mfont__list instead of mfont__select.
2363 (mfont_resize_ratio): Adjusted for the change of MFont.
2364 (mfont_list): Use mfont__list.
2365 (mfont_check): New function.
2366 (font_score): Make it static.
2368 * fontset.h (mfont__realize_fontset): Prototype adjusted.
2369 (mfont__lookup_fontset): Likewise.
2371 * fontset.c (struct MFontset): Delete member font_spec_list.
2372 (struct MRealizedFontset): Type of member spec changed. New
2374 (load_font_group): Arg spec_list deleted.
2375 (load_fontset_contents): Adjusted for the change of fontset_def.
2376 (free_fontset): Fix the way of freeing fontset elements.
2377 (realize_fontset_elements): Argument changed.
2378 (get_per_script): New function.
2379 (free_realized_fontset_elements): Fix the way of feeing rfontset
2381 (update_fontset_elements): Fix args to realize_fontset_elements.
2382 (mfont__realize_fontset): New arg spec.
2383 (try_font_list): New function.
2384 (try_font_group): New arg request. Use try_font_list.
2385 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
2387 (mfontset): Adjusted for the change of MFontset.
2388 (mfontset_copy): Likewise. Don't share plists.
2389 (mfontset_modify_entry): Adjusted for the change of MFontset.
2390 (mfontset_lookup): Call get_per_script.
2391 (mdebug_dump_fontset): Print also the address of fonts.
2393 * input.c (shift_state): Don't reset ic_info->vars.
2394 (take_action_list): Call MDEBUG_PRINT fore calling
2397 * internal-gui.h (MFontDriver): Don't typedef it here.
2399 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
2400 (MXFont): This type deleted.
2402 (struct _MFontX): New struct.
2403 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
2404 (MDisplayInfo): Member base_font_list deleted.
2405 (DEFAULT_FONT): Definition changed.
2406 (FALLBACK_FONT): This maclr deleted.
2407 (free_display_info): Adjusted for the change of MDisplayInfo.
2408 (free_device): Argument to mfont__free_realized changed.
2409 (xfont_driver): Adjusted for the change of MFontDriver.
2410 (xfont_registry_list): Use MFontX instead of MXFont.
2411 (MRealizedFontX): Renamed from MXFontInfo.
2412 (xfont_select): Return the font found first.
2413 (close_xfont): Change MXFontInfo to MRealizedFontX.
2414 (xfont_open): Return the realized font.
2415 (xfont_find_metric): Get xfont from rfont->fontp.
2416 (xfont_has_char): New function.
2417 (xfont_encode_char): Adjusted for the argument change.
2418 (xfont_render): Get xfont from rfont->fontp.
2419 (xfont_list): Adjusted for the argument change.
2420 (MRealizedFontXft): Renamed from MXftFontInfo.
2421 (xft_driver): Ajusted for the change of MFontDriver.
2422 (close_xft): Change MXtfFontInfo to MRealizedFontXft
2423 (xft_open_font): Argument changed.
2424 (xft_open): Argument changed. Return the realized font.
2425 (xft_find_metric): Get xft_font from rfont->fontp.
2426 (xft_has_char, xft_encode_char): New functions.
2427 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
2428 font if not yet opened.
2429 (device_open): Don't set frame->font.
2431 * m17n-gd.c (gd_font_driver): Adjusted for the change of
2433 (gd_font_open): New function.
2434 (gd_render): Don't use the local variable ft_info.
2435 (device_init): Adjusted for the change of gd_font_driver.
2437 * textprop.c (mtext__prop_init): Initialize text_property_table.
2438 Call M17N_OBJECT_ADD_ARRAY.
2439 (mtext__prop_fini): Don't call mdebug__report_object.
2441 * plist.c (mplist__init): Initialize plist_table.
2442 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
2443 (mplist__fini): Don't call mdebug__report_object.
2445 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
2446 (mtext__fini): Don't call mdebug__report_object.
2447 (MTEXT_FORMAT_UTF_16): Correct type.
2448 (mtext_data): New function.
2449 (mtext_text): Fix calculation of limit and args to
2452 * language.c: Include "plist.h".
2453 (M_script_lang_list): New variable.
2454 (mlang__init): Read languages and their information from m17n
2456 (mlanguage__list): New function.
2457 (Miso639_1, Miso639_2): New variables.
2459 * language.h (mlanguage__list): Extern it.
2461 * database.c (get_database_stream): Use SAFE_* macros for
2462 allocating and freeing path.
2463 (mdatabase__init): Likewise.
2465 * symbol.c (msymbol__fini): Don't free symbols here.
2466 (msymbol__free_table): New function.
2467 (msymbol_is_managing_key): New function.
2469 * symbol.h (msymbol__free_table): Extern it.
2470 (msymbol__list): Extern it.
2472 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
2474 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
2475 (struct _M17NObjectArray): New member name and next.
2476 (mdebug__add_object_array): Extern it.
2477 (M17N_OBJECT_ADD_ARRAY): New macro.
2478 (mdebug__report_object): Don't extern it.
2480 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
2482 * m17n-gui.c (free_frame): Don't free frame->font.
2483 (null_device_fini): Fix code for freeing
2484 null_device.realized_font_list.
2485 (m17n_fini_win): Free interface.
2486 (mframe): Cast the return value of dlsym. Set frame->font here.
2487 (mframe_get_prop): Check frame->rface->rfont before accessing the
2490 * m17n-gui.h (Mfontfile): Extern it.
2491 (mfont_check): Extern it.
2492 (mface_equal): Extern it.
2494 * m17n-core.c: Include "symbol.h".
2495 (report_header_printed): This variable deleted.
2496 (object_array_root): New variable.
2497 (report_object_array): New function.
2498 (mdebug__report_object): This function deleted.
2499 (mdebug__add_object_array): New function.
2500 (m17n_init_core): Call mchartable_init () before mtext_init ().
2501 (m17n_fini_core): Call report_object_array (if necessary) and
2502 msymbol__free_atable at the end.
2504 * m17n-core.h (msymbol_is_managing_key): Extern it.
2505 (mtext_data): Extern it.
2506 (MTEXT_FORMAT_UTF_16): Correct type.
2507 (M17NLIB_MINOR_VERSION): Changed to 3.
2508 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
2510 * chartab.c (mchartable__init): Initalize chartable_table.count.
2511 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
2512 mdebug__report_object.
2514 2005-05-26 Kenichi Handa <handa@m17n.org>
2516 * m17n.h (Miso639_1, Miso639_2): Extern them.
2518 * symbol.h (msymbol__list): Extern it.
2520 * symbol.c (msymbol__list): New function.
2522 2005-05-19 Kenichi Handa <handa@m17n.org>
2524 * input-gui.c (minput__win_init): Don't change the value of
2527 2005-05-16 Kenichi Handa <handa@m17n.org>
2529 * m17n-core.c (m17n_object): Be sure to initialize all members.
2531 * font-ft.c (fc_decode_prop): Fix args to msymbol.
2533 2005-05-09 Kenichi Handa <handa@m17n.org>
2535 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
2537 2005-04-27 Kenichi Handa <handa@m17n.org>
2539 * language.c (mlang__init): Add "an" (Aragonese).
2541 * word-thai.c: Add support for libthai.
2542 (mtext__word_thai_init): Initialize wordseg library conditionaly.
2543 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
2545 * mtext.c: Include "word-thai.h" conditionaly.
2546 (mtext__init): Call mtext__word_thai_init conditionaly.
2547 (mtext__fini): Call mtext__word_thai_fini conditionaly.
2549 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
2550 not WORDCUT_LD_FLAGS.
2552 2005-04-19 Kenichi Handa <handa@m17n.org>
2554 * word-thai.c (wordseg_propertize): Always unref the attached
2556 (thai_wordseg): Don't unref the property.
2558 2005-04-18 Kenichi Handa <handa@m17n.org>
2560 * word-thai.c: Include stdlib.h.
2561 (wordseg_propertize): Add dummy function for the case that wordcut
2562 library doesn't exist.
2563 (wordseg_propertize): Fix for old wordcut library.
2565 2005-04-16 Kenichi Handa <handa@m17n.org>
2567 * word-thai.c: Include <stdio.h>.
2569 2005-04-15 Kenichi Handa <handa@m17n.org>
2571 * draw.c: Include mtext.h.
2572 (linebreak_table, M_break_at_space, M_break_at_word)
2573 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
2574 (compose_glyph_string): Check POS before getting Mface text
2576 (truncate_gstring): Give correct TO arg to line_break function.
2577 (GET_LB_TYPE): New macro.
2578 (find_break_backward, find_break_forward): New functions.
2579 (mdraw__init): Initialize the above new variables.
2580 (mdraw__fini): Free linebreak_table.
2581 (mdraw_default_line_break): Use find_break_backward and
2584 * word-thai.c: New file.
2586 * word-thai.h: New file.
2588 * mtext.c: Include word-thai.h.
2589 (wordseg_func_table): New variable.
2590 (mtext__init): Initialize wordseg_func_table and call
2591 mtext__word_thai_init.
2592 (mtext__fini): Call mtext__word_thai_fini, free
2594 (MTextWordsegFunc): New type.
2595 (mtext__word_segment): New function.
2597 * mtext.h (wordseg_func_table): Extern it.
2598 (mtext__word_segment): Extern it.
2600 * m17n.c (m17n_init): Fix typo (== -> =).
2602 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
2603 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
2605 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
2606 (MTEXTPROP_VAL): New macros.
2608 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
2610 2005-04-07 Kenichi Handa <handa@m17n.org>
2612 * database.c (load_chartable): Fix pursing of symbol name.
2614 2005-03-24 Kenichi Handa <handa@m17n.org>
2616 * m17n.c (m17n_init): Fix typo (== -> =).
2618 2005-03-11 Kenichi Handa <handa@m17n.org>
2620 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
2622 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
2624 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
2627 2005-03-09 handa <handa@m17n.org>
2629 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
2630 calling m17n_init ().
2632 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
2633 calling m17n_init_core ().
2635 2005-02-28 Kenichi Handa <handa@m17n.org>
2637 * font-flt.c (mfont__flt_run): Add resulting code sequence in
2640 2005-02-17 Kenichi Handa <handa@m17n.org>
2642 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
2643 (M_description, M_command, M_variable): New variables.
2644 (load_im_info_keys): New variables.
2645 (load_im_info, check_command_keyseq, get_description_advance)
2646 (parse_command_list, get_command_list, parse_variable_list)
2647 (get_variable_list, input_method_hook): New functions.
2648 (command_list, variable_list): New variables.
2649 (minput__init): Put input_method_hook to Minput_method.
2650 Initialize M_description, M_command, M_variable, Mdetail_text,
2651 load_im_info_keys, command_list, variable_list.
2652 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
2653 (Mdetail_text): New variable.
2654 (minput_get_description, minput_get_commands)
2655 (minput_assign_command_keys, minput_get_variables)
2656 (minput_set_variable): New functions.
2658 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
2659 (minput_assign_command_keys, minput_get_variables)
2660 (minput_set_variable): Extern them.
2662 * plist.c (UNGETC): Just decrement st->p.
2663 (read_mtext_element): New arg skip.
2664 (read_integer_element): Likewise.
2665 (read_symbol_element): Likewise.
2666 (read_element): New arg KEYS.
2667 (mplist__from_plist): Don't increment ref-count of NULL object.
2668 (mplist__from_file): New arg KEYS.
2669 (mplist_put): Don't increment ref-count of NULL object.
2670 (mplist_add): Likewise.
2671 (mplist_push): Likewise.
2672 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
2674 * plist.h (mplist__from_file): Prototype adjusted.
2676 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
2677 (get_database_stream): New function.
2678 (load_database): Use get_database_stream.
2679 (M_database_hook): New variable
2680 (mdatabase__init): Initialize M_database_hook.
2681 (mdatabase__load_for_keys): New function.
2682 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
2684 (mdatabase_define): Free mdb->extra_info if necessary.
2686 * database.h (mdatabase__dir_list, M_database_hook)
2687 (mdatabase__load_for_keys): Extern them.
2688 (MDatabaseHookFunc): New type.
2690 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
2692 2004-12-27 Kenichi Handa <handa@m17n.org>
2694 * Version 1.2.0 released.
2696 2004-12-27 Kenichi Handa <handa@m17n.org>
2698 * input.c (minput_filter): Don't reset ic->xxx_changed.
2700 * mtext.c (mtext_from_data): Fix documentation.
2702 2004-12-25 Kenichi Handa <handa@m17n.org>
2704 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
2705 (M17NLIB_VERSION_NAME): Update to "1.2.".
2707 2004-12-24 Kenichi Handa <handa@m17n.org>
2709 * input.c (reset_ic): Set key_unhandled to 0.
2711 2004-12-21 Kenichi Handa <handa@m17n.org>
2713 * m17n-gui.h (mfont_from_spec): Delete extern.
2715 * input-gui.c (win_callback): Handle Minput_reset.
2716 (minput__win_init): Register reset_ic as a callback for
2719 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
2720 changed. At first, shift to the initial state.
2721 (minput__init): Initialize Minput_reset. Register reset_ic as a
2722 callback for Minput_reset.
2723 (Minput_reset): New variable.
2724 (minput_filter): Always set ic->xxx_changed to 0.
2725 (minput_reset_ic): New function.
2726 (integer_value): Fix typo ('>' -> '<') and calculation of length
2729 * m17n-core.c (merror_code): Change type to `int'.
2731 * m17n-misc.h (merror_code): Adjust type.
2733 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
2735 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
2736 (mtext_change_prop): Delete extern.
2738 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
2739 to `int'. Move the documents to m17n-core.h.
2741 2004-12-13 Kenichi Handa <handa@m17n.org>
2743 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
2744 (MTextProperty): Document it.
2746 2004-12-09 Kenichi Handa <handa@m17n.org>
2748 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
2750 2004-12-03 Kenichi Handa <handa@m17n.org>
2752 * internal.h (m17n__core_initialized, m17n__shell_initialized,
2753 m17n__gui_initialized): New externs.
2755 * m17n-core.h (enum M17NStatus): New enum.
2756 (m17n_status): Extern it.
2758 * m17n-core.c (core_initialized): Delete this variable.
2759 (m17n__core_initialized, m17n__shell_initialized,
2760 m17n__gui_initialized): New variables.
2761 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
2762 instead of core_initialized.
2763 (m17n_status): New function.
2765 * m17n.c (shell_initialized): Delete this variable.
2766 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
2769 * m17n-gui.h (m17n_init_win): Adjust the prototype.
2771 * m17n-gui.c (win_initialized): Delete this variable.
2772 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
2773 instead of gui_initialized.
2775 2004-11-19 Kenichi Handa <handa@m17n.org>
2777 * input.c (reset_ic): Check if ic_info->state is NULL.
2778 (filter): If ic_info->state is NULL, return 0.
2779 (load_input_method): Don't unref `maps' it it's not created.
2781 2004-11-15 Kenichi Handa <handa@m17n.org>
2783 * input.c (find_candidates_group): If INDEX is -1, find the last
2785 (take_action_list): If the previous of the first candidate is
2786 requested, select the last candidate.
2788 2004-11-08 Kenichi Handa <handa@m17n.org>
2790 * m17n-X.c (device_open): Try at most 32 fonts to find a
2791 non-autoscaled font.
2793 * font.c (xlfd_parse_name): Fix previous change.
2795 2004-11-05 Kenichi Handa <handa@m17n.org>
2797 * font.c: (commont_style): Include dummy elements "slanted" and
2798 "rslanted" to prefer "o" to "r" if "i" is requested.
2800 * font-ft.c (ft_to_prop): Fix "oblique" entry.
2802 2004-10-29 Kenichi Handa <handa@m17n.org>
2804 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
2806 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
2807 New members smallest and larger.
2808 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
2809 (xfont_registry_list): Likewise.
2810 (xfont_select): Likewise.
2813 2004-10-28 Kenichi Handa <handa@m17n.org>
2815 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
2816 font name comparison.
2817 (xfont_select): Fix logic for selecting a larger size font.
2819 2004-10-25 Kenichi Handa <handa@m17n.org>
2821 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
2824 2004-10-22 Kenichi Handa <handa@m17n.org>
2826 * input.c (update_candidate): Renamed from udpate_candidate.
2827 (take_action_list): Show more debugging info on arithmetic commands.
2829 * m17n-X.c (device_open): Fix previous change.
2831 * draw.c (compose_glyph_string): Don't get face property at the
2834 2004-10-21 Kenichi Handa <handa@m17n.org>
2836 * draw.c (compose_glyph_string): Fix for the case of category
2839 2004-10-19 Kenichi Handa <handa@m17n.org>
2841 * input.c (mdebug_mask): New variable.
2842 (shift_state): Print debug information.
2843 (take_action_list): Likewise.
2844 (handle_key): Likewise.
2846 2004-10-14 Kenichi Handa <handa@m17n.org>
2848 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
2850 2004-10-13 Kenichi Handa <handa@m17n.org>
2852 * m17n-X.c (device_open): Be sure to register at least one font
2855 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
2856 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
2858 2004-10-12 Kenichi Handa <handa@m17n.org>
2860 * draw.c (alloc_gstring): Fix previous change.
2862 * font-ft.c (ft_list_generic): Fix for the case of not
2865 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
2867 * font.c (mfont_list): If no font is found, return NULL.
2868 (load_font_encoding_table): Put entries of nil registry first.
2869 (find_encoding): Adjust for the above change.
2871 2004-10-11 Kenichi Handa <handa@m17n.org>
2873 * m17n-gui.h (mfont_list): Adjust prototype.
2875 * m17n-X.c (xfont_list): New arg maxnum.
2877 * font.h (struct MFontDriver): Change prototype of <list>.
2879 * font-ft.c (fc_generic_family_list): Delete it.
2880 (Mserif, Msans_serif, Mmonospace): Delete them.
2881 (M_generic_family_info): New variable.
2882 (enum GenericFamilyType): New enum.
2883 (struct GenericFamilyInfo): New struct.
2884 (generic_family_table): New variable.
2885 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
2887 (add_font_info): Get style here.
2888 (ft_list_family): Don't initialize fc_config here. Don't list
2890 (ft_list_generic): New function.
2891 (ft_select): Pay attention to generic familes here.
2892 (ft_open): Fix calculation of ascent and descent.
2893 (ft_list): Pay attention to generic families.
2894 (mfont__ft_init): Initialize M_generic_family_info,
2895 generic_family_table, and fc_config..
2896 (mfont__ft_fini): Finalize generic_family_table.
2898 * draw.c (compose_glyph_string): Use more constant font for
2899 glyphs. Adjust for the member change in MGlyph.
2900 (layout_glyph_string): Adjust for the member change in MGlyph.
2901 (alloc_gstring): Intilize scracth_glyph to avoid
2902 compose_glyph_string on it.
2903 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
2904 (mdraw_coordinates_position): Fix previous change.
2906 * internal-gui.h (glyph_category): New enum.
2907 (MGlyph): Change type of <category> to enum glyph_category.
2909 * face.c (mface__realize): Delete args langauge and charset.
2910 (mface__for_chars): Fix for the case that glyphs have different
2912 (mface__update_frame_face): Adjust for mface__realize change.
2914 * face.h (mface__realize): Adjust prototype.
2916 2004-10-05 Kenichi Handa <handa@m17n.org>
2918 * language.c (mlang__init): Add Akan.
2920 2004-10-04 Kenichi Handa <handa@m17n.org>
2922 * font-ft.c (add_font_info): Add instead of push the element.
2923 (ft_list_family): For generic fonts, try all
2924 substituted. families.
2926 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
2927 (run_rule): Don't update cluster range here.
2928 (run_command): Update cluster range on appending a glyph.
2929 (run_otf): Update cluster range for glyphs generated by OTF.
2931 2004-10-02 Kenichi Handa <handa@m17n.org>
2933 * m17n-X.c (device_open): Handle Mfont key in PLIST.
2935 2004-09-30 Kenichi Handa <handa@m17n.org>
2937 * font-ft.c (ft_select): Ignore family on calling mfont__score.
2939 2004-09-30 Kenichi Handa <handa@m17n.org>
2941 * font.h: Include <fontconfig/fontconfig.h>.
2942 (MFTInfo): New member langset.
2943 (mfont__encoding_list): Extern it.
2945 * font.c (mfont__encoding_list): New function.
2946 (mdebug_dump_font_list): New function.
2948 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
2949 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
2951 (ft_family_list): New variable.
2952 (set_font_info): New arg basep. Callers changed.
2953 (fc_list): Check the return value of FcPatternGetString.
2954 (add_font_info): New arg plist. Callers changed. Update
2956 (ft_list_family): New function (merged fc_list and ft_list_all).
2957 (ft_select): Use ft_list_family.
2958 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
2960 (mfont__ft_init): Initialize above new variables.
2961 (mfont__ft_fini): Free ft_family_list.
2962 (STRDUP_LOWER): New macro.
2963 (set_font_info): Use STRDUP_LOWER.
2964 (ft_list_family): Avoid duplicate addition of font path. Use
2966 (fc_decode_prop): Fix typo.
2968 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
2969 (xfont_registry_list): Change argument disp_info to frame.
2971 (xfont_list_all): New function.
2972 (xfont_list): If FONT is not NULL, check all fonts.
2974 2004-09-28 Kenichi Handa <handa@m17n.org>
2976 * m17n-X.c (MXFont, MXFontList): New types.
2977 (MDisplayInfo): Delete members font_registry_list,
2978 iso8859_1_family_list, iso10646_1_family_list, new members
2979 font_list, base_font_list.
2980 (free_display_info): Adusted for the change of MDisplayInfo.
2981 (xfont_driver): Initialize with xfont_list.
2982 (font_compare): New function.
2983 (build_font_list): Deleted.
2984 (xfont_registry_list): New function.
2985 (xfont_select): Use xfont_registry_list.
2986 (xfont_list): New function.
2987 (device_open): Adusted for the change of MDisplayInfo.
2989 * font-ft.c (add_font_info): New arg languages. Callers changed.
2990 (fc_list): Get languages from fonts..
2991 (ft_list_all): Renamed from ft_list. Callers changed.
2992 (ft_list): New function.
2993 (mfont__ft_driver): Initalize with ft_list.
2995 * font.c (mfont_list): New function.
2997 * font.h (struct MFontDriver): New member `list'.
2998 (MFTInfo): New member languages.
3000 * m17n-gui.h (mfont_list): Extern it.
3002 2004-09-27 Kenichi Handa <handa@m17n.org>
3004 * internal-gui.h (struct MGlyphString): Delete members mt,
3005 sub_width, sub_lbrearing, sub_rbearing, and region.
3007 * draw.c (MSubTextExtents): New type.
3008 (layout_glyphs): New arg extents. Set its members.
3009 (layout_glyph_string): Adjusted for the above change.
3010 (alloc_gstring): Don't set gstring->mt.
3011 (truncate_gstring): Call line_break function with mt instead of
3014 2004-09-22 Kenichi Handa <handa@m17n.org>
3016 * mtext.c (count_utf_16_chars): Count each code of invalid
3019 2004-09-19 Kenichi Handa <handa@m17n.org>
3021 * mtext.c (default_utf_16, default_utf_32): Rename them to
3022 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
3025 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
3028 2004-09-13 Kenichi Handa <handa@m17n.org>
3030 * draw.c (Mlatin): Don't declare it here.
3031 (visual_order): Fix reordering of combining characters.
3032 (compose_glyph_string): Fix detection of script.
3033 (layout_glyphs): Don't fix reordering of combining characters
3035 (layout_glyph_string): Pay attention to
3036 control->disable_overlapping_adjustment.
3037 (truncate_gstring): Include at least on character in a line.
3038 (get_gstring): Always scan one full line.
3039 (mdraw__init): Don't initialize Mlatin here.
3040 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
3041 have a font, use ascent/descent of an ASCII font. Allow
3042 ink_array_return and logical_array_return to be NULL.
3043 (mdraw_coordinates_position): Fix iteration.
3045 * font-ft.c (MFTtoProp): Member completely changed.
3046 (ft_to_prop): Adjusted for the above change.
3047 (ft_to_prop_size): Likewise.
3048 (set_font_info): Adjusted for the change of MFTtoProp.
3049 (fc_generic_family_list): New variable.
3050 (fc_list): Add special handling of generic font names.
3051 (mfont__ft_init): Adjusted for the change of MFTtoProp.
3052 Initialize fc_generic_family_list.
3053 (mfont__ft_fini): Don't free ft_to_prop. Free
3054 fc_generic_family_list.
3055 (FC_vs_M17N_font_prop): New type.
3056 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
3057 (fc_decode_prop, fc_encode_prop): New functions.
3058 (mfont__ft_parse_name): Use fc_decode_prop.
3059 (mfont__ft_unparse_name): Use fc_encode_prop.
3061 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
3062 (MWDevice): Add member realized_font_list.
3063 (free_display_info): Don't free disp_info->realized_font_list.
3064 (free_device): Free device->realized_fontset_list.
3065 (xft_find_metric): Use gstring->frame instead of rfont->frame.
3066 (device_open): Don't initialize disp_info->realized_font_list.
3067 (device_open): Initialize device->realized_font_list and set it to
3068 frame->realized_font_list.
3070 * fontset.c (try_font_group): New function.
3071 (mfont__lookup_fontset): Use try_font_group.
3073 * font.c (common_weight): Change the order of "regular".
3075 * face.c (Mlatin): Don't make it static.
3076 (mface__realize): Be sure to set work_gstring.frame.
3077 (mface__for_chars): Likewise.
3079 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
3082 * internal-gui.h (Mlatin): Extern it.
3084 * m17n-gui.h (MDrawControl): New member
3085 disable_overlapping_adjustment.
3087 2004-09-06 Kenichi Handa <handa@m17n.org>
3089 * font-flt.c (run_otf): Fix typo ('}'->']').
3091 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
3092 (COMBINING_PRECOMPUTED_P): New macros.
3094 * draw.c (layout_glyphs): Handle precomputed combining code.
3096 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
3097 precomupted combining code.
3099 2004-09-03 Kenichi Handa <handa@m17n.org>
3101 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
3104 2004-08-27 Kenichi Handa <handa@m17n.org>
3106 * face.c (mface_put_prop): If the new value is the same as the
3107 current one, don't increment frame->tick.
3109 2004-08-25 Kenichi Handa <handa@m17n.org>
3111 * fontset.c (mfontset): Initialize font_spec_list member.
3112 (mfontset_copy): Load fontset if necessary.
3114 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
3115 'metrics' to for C++.
3117 * draw.c (mdraw_glyph_info): Adjusted for the member name change
3120 2004-08-16 Kenichi Handa <handa@m17n.org>
3122 * Version 1.1.0 released.
3124 2004-08-13 Kenichi Handa <handa@m17n.org>
3126 * language.c (mlang__init): Add Dhivehi.
3128 * m17n-gui.c (Mx, Mfreetype): Delete it.
3129 (m17n_init_win): Don't initialize Mx and Mfreetype here.
3131 * m17n-gui.h (Mfreetype, Mxft): Extern them.
3132 (mfont_resize_ratio): Extern it.
3133 (MDrawGlyphInfo): New member logical_width;
3134 (MDrawGlyph): New type.
3135 (mdraw_glyph_list): Prototype adjusted.
3137 * m17n-X.c (xfont_open): Set type and fontp members.
3138 (xft_open): Likewise.
3140 * internal-gui.h (Mx, Mfreetype): Delete extern.
3142 * font.h (struct MRealizedFont): New member type and fontp.
3144 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
3145 (Mx, Mfreetype): Declare here.
3146 (Mxft): New variable.
3147 (mfont_resize_ratio): New function.
3149 * font-ft.c (ft_open): Set type and fontp members.
3151 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
3154 2004-08-11 Kenichi Handa <handa@m17n.org>
3156 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
3159 2004-08-06 Kenichi Handa <handa@m17n.org>
3161 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
3164 * font-flt.c (run_otf): Print debugging information if necessary.
3166 2004-08-05 Kenichi Handa <handa@m17n.org>
3168 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
3169 positioning_type 5 and 6. Switch simplified.
3171 2004-08-04 Kenichi Handa <handa@m17n.org>
3173 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
3175 2004-08-02 Kenichi Handa <handa@m17n.org>
3177 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
3178 set val to 1 even if it is greater than 1.
3180 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
3182 2004-07-29 Kenichi Handa <handa@m17n.org>
3184 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
3185 debugging information.
3187 * internal.h (MDEBUG_PRINT5): New macro.
3189 * draw.c (layout_glyphs): Don't combine a zero width glyph with
3190 the previous one if the zero width glyph has left or right
3193 2004-07-26 Kenichi Handa <handa@m17n.org>
3195 * m17n-X.c (xft_render): Pay attention to members left_padding and
3196 right_padding of MGlyph.
3198 * draw.c (visual_order): Allocate one more elements for arrays as
3199 a workaround of fribidi bug.
3200 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
3201 instead of MGlyph->bidi_sensitive.
3202 (layout_glyph_string): Pay attentinon to
3203 control->orientation_reversed when padding at the head or tail.
3204 Fix adjustment of space glyph width.
3205 (get_gstring): If cursor_width or cursor_bidi is changed, don't
3208 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
3209 instead of MGlyph->bidi_sensitive.
3211 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
3213 2004-07-26 Kenichi Handa <handa@m17n.org>
3215 * draw.c (visual_order): Don't treat combined glyphs specially.
3216 (layout_glyphs): Don't get metrics glyphs that are already ready.
3217 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
3218 width with the previous one.
3219 (draw_background): Fix bar cursor position on a r2l glyph.
3221 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
3222 (run_rule): Fix place of updating cluster_begin_pos and
3223 cluster_end_pos here.
3224 (run_otf): Don't set left_padding.
3226 * font-ft.c (adjust_anchor): Type of argument `code' changed.
3228 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
3229 Fix handling of GPOS.
3230 (mfont__ft_drive_gpos): Delete this function.
3232 * font.h (mfont__ft_drive_otf): Renamed back from
3233 mfont__ft_drive_gsub.
3234 (mfont__ft_drive_gpos): Delete extern.
3236 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
3237 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
3239 2004-07-23 Kenichi Handa <handa@m17n.org>
3241 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
3242 the same bidi level.
3244 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
3246 2004-07-22 Kenichi Handa <handa@m17n.org>
3248 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
3250 2004-07-20 Kenichi Handa <handa@m17n.org>
3252 * draw.c (render_glyphs): Fix checking of g->code validity.
3254 * face.c (mface__realize): Set g.type.
3256 2004-07-18 Kenichi Handa <handa@m17n.org>
3258 * Makefile.am: Prepend ${top_srcdir} to all *.la in
3261 * m17n-gui.c (mframe): Print error message give by dlopen to
3264 2004-07-16 Kenichi Handa <handa@m17n.org>
3266 * draw.c (compose_glyph_string): Improve the way of deciding a
3267 script. For a character that doesn't have script property, use
3268 the last non-latin script.
3270 * font-ft.c (fc_list): Cancel previous change.
3271 (mfont__ft_init): Add more entries in ft_to_prop_name.
3273 2004-07-15 Kenichi Handa <handa@m17n.org>
3275 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
3276 previous or next character glyphs.
3278 2004-07-14 Kenichi Handa <handa@m17n.org>
3280 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
3281 of type GLYPH_SPACE.
3283 * fontset.c (mfont__lookup_fontset): If glyph type is
3284 GLYPH_SPACE, get codes for SPACE.
3286 * internal-gui.h (Mfont): Delete extern.
3288 * m17n-gui.h (Mfont): Delete duplicated extern.
3290 2004-07-13 Kenichi Handa <handa@m17n.org>
3292 * font-ft.c (DEVICE_DELTA): New macro.
3293 (adjust_anchor): New function.
3294 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
3296 (mfont__ft_drive_gpos): New function.
3298 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
3299 (FontLayoutContext): Delete member `rfont'.
3300 (run_otf): Set g->otf_cmd. Call
3301 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
3302 only whne HAVE_OTF is defined.
3304 * fontset.c: Include "config.h".
3306 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
3307 (MGlyph): New member otf_cmd.
3309 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
3310 (mfont__ft_drive_gpos): Extern it.
3312 * face.c: Include "config.h".
3314 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
3316 * input-gui.c: Include "config.h".
3318 * plist.c: Include "config.h".
3320 2004-07-06 Kenichi Handa <handa@m17n.org>
3322 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
3323 internal-gui.h: Cancel previous changes.
3325 * m17n-gd.h: Delete it.
3327 * Makefile.am (libm17n_core_la_LIBADD): New variable.
3328 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
3329 @XML2_LD_FLAGS@ to above.
3330 (libm17n_la_LIBADD): Add -ldl.
3331 (libm17n_la_LDFLAGS): Add -export-dynamic.
3332 (X_LD_FLAGS): Fix the order of linking.
3333 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
3334 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
3335 (libm17n_X_la_LDFLAGS): Add -module.
3336 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
3337 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3338 (libm17n_gd_la_LDFLAGS): Add -module.
3339 (include_HEADERS): Delete m17n-gd.h.
3341 2004-06-30 Kenichi Handa <handa@m17n.org>
3343 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
3344 (MDeviceLibraryInterface): Delete it.
3345 (register_device_library): Delete it.
3346 (m17n__device_library_list): Renamed from device_library_list.
3348 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
3349 (m17n_init_win): Adjust prototype.
3351 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
3352 (m17n_init_gd): New function.
3354 * m17n-gd.h: New file.
3356 * m17n-X.h: Include <m17n-gui.h>.
3357 (m17n_init_X): Extern it.
3358 (M17N_INIT): Redefine it.
3360 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
3361 (m17n_init_X): New function.
3363 * internal-gui.h (m17n__device_library_list): Extern it.
3364 (struct MDeviceDriver): New members initialized, init, and fini.
3366 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
3368 (libm17n_X_la_LIBADD): Delete aboves.
3369 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
3370 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3371 (libm17n_gd_la_LDFLAGS): Delete it.
3372 (include_HEADERS): Add m17n-gd.h.
3374 2004-06-25 Kenichi Handa <handa@m17n.org>
3376 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
3377 (libm17n_gd_la_LDFLAGS): Cancel previous change.
3379 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
3381 * font-ft.c (fc_list): If FcFontList finds no font, try
3384 * draw.c (compose_glyph_string): Terminate the last loop after
3385 doing default combining if necessary.
3387 2004-06-24 Kenichi Handa <handa@m17n.org>
3389 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
3391 * character.c (mchar_define_property): Add const to an arg.
3393 * charset.c (mchar_define_charset): Add const to an arg.
3395 * coding.c (MCodingSystem): Add const to an arg or decoder.
3396 (finish_decoding): Add const to an arg.
3397 (decode_coding_charset, decode_coding_utf_8)
3398 (decode_coding_utf_16, decode_coding_utf_32)
3399 (decode_coding_iso_2022, decode_coding_sjis)
3400 (mconv_define_coding): Likewise.
3402 * m17n-X.c (xft_find_metric): Delete unused variable.
3404 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
3407 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
3410 * mtext.c (count_utf_8_chars, count_utf_16_chars)
3411 (mtext__from_data, mtext_from_data): Add `const' to an arg.
3413 * mtext.h (mtext__from_data): Ajust prototype.
3415 2004-06-23 Kenichi Handa <handa@m17n.org>
3417 * draw.c (compose_glyph_string): Always get glyph codes by
3419 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
3420 (mdraw_glyph_list): New function.
3422 * font-flt.c (mfont__flt_run): Be sure to call
3423 rfont->driver->encode_char.
3425 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
3426 (ft_encode_char): Delete arg C.
3427 (ft_render): Don't call FT_Get_Char_Index.
3429 * font.c (mfont__encodable_p): Delete it.
3430 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
3432 * font.h (struct MFontDriver): Delete arg C of encode_char.
3433 (mfont__encodable_p): Delete extern.
3435 * m17n-X.c (xfont_encode_char): Delete arg C.
3436 (xft_find_metric): Don't cal FT_Get_Char_Index.
3437 (xft_render): Likewise.
3439 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
3441 (mdraw_glyph_list): Extern it.
3443 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
3445 2004-06-22 Kenichi Handa <handa@m17n.org>
3447 * m17n-gui.h (mfontset_lookup): Extern it.
3449 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
3451 * fontset.c (realize_fontset_elements)
3452 (free_realized_fontset_elements, update_fontset_elements): New
3454 (mfont__realize_fontset): Call realize_fontset_elements.
3455 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
3456 (mfont__lookup_fontset): If a fontset was modified, update
3457 the realized fontset.
3458 (mfontset_modify_entry): Increment fontset->tick.
3459 (mfontset_lookup): New function.
3461 2004-06-21 Kenichi Handa <handa@m17n.org>
3463 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
3465 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
3466 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
3467 length of source text 0.
3469 2004-06-21 Kenichi Handa <handa@m17n.org>
3471 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
3472 (compare): Pay attention to format other than utf-8.
3473 (copy): Delete this function.
3474 (count_by_utf_8, count_by_utf_16, insert): New functions.
3475 (count_utf_16_chars): Fix handling of a surrogate pair.
3476 (find_char_forward, find_char_backward): Likewise.
3477 (mtext__from_data): Delete unnecessary check. Fix number of
3479 (mtext_from_data): Don't count items.
3480 (mtext_ref_char): Optimize the code.
3481 (mtext_set_char): Pay attention to format other than utf-8.
3482 (mtext_cat_char): Likewise.
3483 (mtext_dup): Don't call copy, instead do allocation here.
3484 (mtext_cat): Call insert instead of copy.
3485 (mtext_ncat): Likewise.
3486 (mtext_cpy): Delete character at first and call insert instead of
3488 (mtext_ncpy): Likewise.
3489 (mtext_copy): Likewise.
3490 (mtext_duplicate): Call insert instead of copy.
3491 (mtext_del): Pay attention to format other than utf-8.
3492 (mtext_ins): Simply call insert.
3493 (mtext_ins_char): Pay attention to format other than utf-8.
3494 (mtext_tok): Call insert instead of copy.
3495 (mtext_text): Call UNIT_BYTES.
3497 * textprop.c (mtext__adjust_plist_for_change): New function.
3499 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
3500 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
3501 (CHAR_UNITS_AT): Fix typo.
3502 (CHAR_UNITS_BY_HEAD): Fix typo.
3503 (STRING_CHAR_AND_UNITS): Fix typo.
3505 * internal.h (MTEXT_READ_ONLY_P): New macro.
3507 * mtext.h (mtext__replace): Delete the extern.
3508 (mtext__adjust_foramt): Adjust prototype.
3510 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
3511 if possible. Otherwise make a copy of mmt.
3513 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
3516 2004-06-18 Kenichi Handa <handa@m17n.org>
3518 * character.h (CHAR_STRING_UTF16): Fix syntax.
3520 2004-06-16 Kenichi Handa <handa@m17n.org>
3522 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
3523 (libm17n_X_la_LIBADD): Delete it.
3524 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
3526 * m17n-X.c (device_open): Add parens in `if' condition.
3528 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
3529 (DEC_POSITION): Likewise.
3530 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
3532 2004-06-15 Kenichi Handa <handa@m17n.org>
3534 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
3537 * draw.c (compose_glyph_string): If langauge is specified, call
3538 mface__for_chars even if a text is all latin. Fix condition for
3539 setting non_ascii_found.
3541 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
3543 * m17n.h (minput_char_to_key): Delete extern.
3545 * m17n-gui.h (minput_event_to_key): Cancel previous change.
3547 * m17n-gui.c (null_device_open): Set several members of frame.
3549 2004-06-14 Kenichi Handa <handa@m17n.org>
3551 * m17n-gui.h (minput_event_to_key): Delete extern.
3553 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
3555 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
3557 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
3559 2004-06-08 Kenichi Handa <handa@m17n.org>
3561 * character.c (mchar_put_prop): Don't increment the ref-count of
3564 2004-06-04 Kenichi Handa <handa@m17n.org>
3566 * m17n-core.c (mdebug__register_object): New function.
3567 (mdebug__unregister_object): Likewise.
3569 * internal.h (mdebug__register_object, mdebug__unregister_object):
3571 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
3574 * charset.c (mcharset__load_from_database): Don't call
3575 mconv__register_charset_coding here.
3577 * coding.c (find_coding): Get a real name from an element of
3578 coding_definition_list.
3579 (mconv__register_charset_coding): Set the real name at the top of
3581 (mcoding__load_from_database): Likewise.
3582 (mconv_list_codings): Adjusted for the above change.
3584 2004-06-03 Kenichi Handa <handa@m17n.org>
3586 * coding.c (find_coding): Find by canonicalized name. Don't have
3587 to modify the element of coding_definition_list by
3589 (mconv__define_coding_from_charset): Delete it.
3590 (mconv__register_charset_coding): Canonicalize sym.
3591 (mcoding__load_from_database): Register plist modified by
3594 * coding.h (mconv__define_coding_from_charset): Don't extern it.
3596 * font-ft.c (ft_open): Fix setting of rfont->descent.
3598 2004-06-02 Kenichi Handa <handa@m17n.org>
3600 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
3601 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
3602 (xlfd_unparse_name): Renamed from xfont_build_name.
3603 (mfont__init): Initialized Mfontconfig.
3604 (mfont__free_realized): Unconditionally unref rfont->info.
3605 (mfont__select): Free `this' if it's not best.
3606 (mfont__open): Don't check frame->realized_font_list.
3607 (mfont__parse_name_into_font): New function.
3608 (Mfontconfig): New variable.
3609 (mfont_from_name): Call mfont_parse_name.
3610 (mfont_name): Call mfont_unparse_name.
3611 (mdebug_dump_font): Likewise.
3613 * font.h (struct MFontDriver): Delete members parse_name and
3615 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
3616 (mfont__parse_name_into_font): Extern it.
3618 * font-ft.c: Include "symbol.h".
3619 (close_ft): Unconditionally free filename and charmap_list of
3621 (ft_open): Duplicate base->filename. Increment ref-count of
3622 ft_info->charmap_list. Free ft_info->charmap_list and
3623 ft_info->filename on error.
3624 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
3626 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
3628 (enum xlfd_field_idx): Moved to font.c.
3629 (split_font_name, build_font_name): Likewise.
3630 (build_font_list): Call mfont__parse_name_info_font.
3631 (xfont_open): Call mfont__unparse_name. Free name.
3632 (xfont_parse_name, xfont_build_name): Moved to font.c
3633 (xft_select): Prototype deleted.
3634 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
3635 Call mfont_pase_name.
3637 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
3638 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
3641 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
3644 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
3646 2004-06-01 Kenichi Handa <handa@m17n.org>
3648 * fontset.c (mfontset_modify_entry): Pay attention to the case
3649 that fontset->font_spec_list is NULL.
3651 2004-05-31 Kenichi Handa <handa@m17n.org>
3653 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3655 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3657 * font.c (mfont__select): Print score the a font for debugging.
3659 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
3661 * coding.c (reset_coding_sjis): Check kanji and kana instead of
3662 kanji_sym and kana_sym.
3664 2004-05-28 Kenichi Handa <handa@m17n.org>
3666 * Makefile.am (VINFO): New variable.
3667 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
3668 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
3670 2004-05-27 Kenichi Handa <handa@m17n.org>
3672 The following chanages are to make device dependent functions
3673 accessible only from MDeviceDriver structure, and to add GD and
3674 null device drivers. Font drivers get also device dependent.
3676 * m17n.c (m17n_init): Increament shell_initialized.
3677 (m17n_fini): Decremented shell_initialized.
3679 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
3681 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
3682 (Mwidget, Mcolormap, Mx): Extern them.
3684 * m17n-gui.c: Include <dlfcn.h> and "config.h".
3685 (free_frame): Call frame->driver->close instead of
3687 (DLOPEN_SHLIB_EXT): New macro.
3688 (MDeviceLibraryInterface): New type.
3689 (device_library_list): New variable.
3690 (register_device_library): New function.
3691 (null_device): New variable.
3692 (null_device_close, null_device_get_prop)
3693 (null_device_realize_face, null_device_free_realized_face): New
3695 (null_driver): New variable.
3696 (null_device_init, null_device_fini, null_device_open): New
3698 (null_interface): New variable.
3699 (Mfreetype, Mdevice): Declare them.
3700 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
3701 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
3702 Mwin__Close_Device. Register drivers for Mx and Mgd.
3703 (m17n_fini_win): Decremented win_initialized. Call "fini"
3704 function of all opened devices. Don't call mwin__fini.
3705 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
3707 (mframe): Handle Mdevice key of PLIST.
3708 (mframe_get_prop): Call frame->device->get_prop instead of
3709 mwin__device_get_prop.
3711 * m17n-gd.c: New file.
3713 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
3714 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
3716 * m17n-core.c (m17n_init_core): Increate core_initialized.
3717 (m17n_fini_core): Decremented core_initialized.
3719 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
3720 (Mcolormap): Don't extern them here.
3722 * m17n-X.c (FRAME_DEVICE): New macro.
3723 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
3724 (free_display_info): Use MPLIST_DO.
3725 (free_device): Free rface->info.
3726 (xft_close): Delete it.
3727 (device_init): Renamed from mwin__init.
3728 (device_fini): Renamed from mwin__fini.
3729 (device_open): Renamed from mwin__open_device.
3730 (x_driver): New variable.
3731 (MXFontInfo): Delete member frame, add member display.
3732 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
3733 Don't declare them here.
3735 * internal-gui.h (MDeviceType): New enum.
3736 (MWDefice): Delete it.
3737 (struct MFrame): Change type of device to void *. New members
3738 device_type, driver, font_driver_list.
3739 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
3740 (MDeviceDriver): New type.
3741 (Mx, Mgd, Mfreetype): Extern them.
3742 (mwin__XXX): Delete all of them.
3744 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
3746 (win_destroy_ic): Likewise.
3747 (adjust_window_and_draw): Likewise.
3748 (win_callback): Likewise.
3749 (Mxim): Declare it here.
3750 (minput_event_to_key): Call M_CHECK_READABLE.
3752 * fontset.c (mfont__lookup_fontset): Delete local variable
3755 * font.h (struct MFontDriver): Delete member close, add members
3756 parse_name and build_name.
3757 (mfont__driver_list): Delete extern.
3758 (mfont__close): Delete extern.
3760 * font.c (mfont__init): Don't set mfont__driver_list.
3761 (mfont__fini): Don't unref mfont__driver_list.
3762 (mfont__select): Try font drivers in frame->font_driver_list. Set
3763 driver member of a realized font.
3764 (mfont__close): Delete it.
3765 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
3766 functions of the default frame.
3768 * font-ft.c (close_ft): Check ft_info->ft_face and work
3770 (add_font_info): Allocate ft_info by M17N_OBJECT.
3771 (ft_close): Delete it.
3772 (mfont__ft_driver): Don't set ft_close.
3773 (ft_select): Increment ref-count of best_font.
3774 (ft_open): Decremented ref-count of base. On error, call
3775 FT_Done_Face and free ft_info.
3776 (ft_find_metric): Always use XXX_MONO in load_flags.
3777 (ft_render): Fix setting of width. Call
3778 frame->driver->draw_points instead of mwin__draw_points.
3779 (ft_to_prop): Don't set mfont__driver_list.
3780 (mfont__ft_fini): Just unref ft_info.
3782 * face.c (mface__init): Exchange foreground and background of
3783 mface__default. Call mface_put_prop to set hline of
3785 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
3786 (mface__free_realized): Don't call mwin__free_realized_face.
3788 * draw.c (Mdepth): Don't declare it here.
3789 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
3790 (render_glyphs, render_glyph_string): Likewise.
3791 (mdraw__init): Don't set Mdepth.
3792 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
3794 (mdraw_text_per_char_extents): Return 0 on success and -1 on
3796 (mdraw_text_items): Check FRAME is writable.
3797 (mdraw_per_char_extents): Implement body.
3799 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
3801 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
3802 (GUI_SOURCES): Delete it.
3803 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
3804 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
3805 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
3806 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
3807 (linkgui_LDADD): Set to libm17n-gui.la
3808 (linkgui_LDFLAGS): New target.
3809 (SRC): Include ${libm17n_gui_la_SOURCES} and
3810 ${libm17n_gd_la_SOURCES}.
3812 2004-05-24 Kenichi Handa <handa@m17n.org>
3814 * draw.c (draw_background): Don't draw background even if
3815 rface->face.property[MFACE_BACKGROUND] is not Mnil.
3817 2004-05-22 Kenichi Handa <handa@m17n.org>
3819 * m17n-X.c (xft_open_font): Fix anti_alias setting.
3821 2004-05-20 Kenichi Handa <handa@m17n.org>
3823 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
3825 * m17n-gui.c: Include "plist.h".
3826 (mframe): If PLIST is NULL, initialize it to emply plist.
3828 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
3829 (xft_driver): New variable.
3830 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
3831 (xft_find_metric, xft_render): New function.
3832 (mwin__init): Adjusted for the new mfont__driver_list.
3833 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
3834 generated face to PARAM.
3835 (mwin__realize_face): Fix setting of box colors. Don't call hook
3837 (mwin__draw_hline): New function.
3838 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
3839 (mwin__xft_render): Delete these function.
3841 * internal-gui.h (struct MFrame): New member tick.
3842 (struct MGlyphString): New member tick.
3843 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
3844 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
3845 (mwin__xft_render): Delete extern.
3847 * fontset.c (mfont__lookup_fontset): Make the code simpler.
3848 (mfontset): Always increment the reference count of returned
3851 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
3852 (MFTInfo): Moved to font.h.
3853 (ft_iso8859_1_font_list): Delete this variable.
3854 (set_font_info): Don't set font->property[MFONT_TYPE].
3855 (set_font_info): Don't udpate ft_iso8859_1_font_list.
3856 (add_font_info): Change type to void.
3857 (fc_list): Change anme from xft_list. Caller changed. Include
3858 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
3859 (mfont__ft_driver): Change name from ft_driver. Caller changed.
3860 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
3861 (close_ft): Don't call mwin__xft_close. Unref
3862 ft_info->extra_info.
3863 (ft_open): Don't setup ft_info->fontname. Don't call
3865 (ft_find_metric): Don't call mwin__xft_get_metric.
3866 (ft_encode_char): Call rfont->driver->open instead of ft_open.
3867 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
3868 (mfont__ft_init): Adjusted for new mfont__driver_list.
3869 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
3871 * font.c (mfont__driver_list): Make it MPlist.
3872 (mfont__init): Adjust initialization of mfont__driver_list.
3873 (mfont__fini): Free mfont__driver_list.
3874 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
3875 (mfont__select): Adjusted for the new mfont__driver_list.
3877 * font.h (enum MFontProperty): Delete MFONT_TYPE.
3878 (mfont__drirver_list): Adjust prototype.
3879 (MFTInfo): Move to here from fron.c. Deleve member fontname.
3881 * face.h (struct MFace): Delete member realized_face_list, add
3883 (struct MRealizedFace): Delete member need_update
3884 andnofont_rface, add member non_ascii_list.
3885 (mface__update_frame_face): Extern it.
3887 * face.c (hline_prop_list, box_prop_list, noop_hook): New
3889 (get_hline_create, get_box_create): New functions.
3890 (find_realized_face): Cancel previous change. Arg RFONT deleted.
3892 (free_face): Cancep previous change. Free face->frame_list.
3893 (serialize_hline): Do nothing if hline->width is zero.
3894 (serialize_box): Do nothing if box->width is zero.
3895 (mface__init): Setup all properties of mface__default.
3896 (mface__fini): Free hline_prop_list and box_prop_list.
3897 (mface__realize): Cancel previous change. Update
3898 face->frame_list. Setup rface->non_ascii_list.
3899 (mface__for_chars): Update rface->non_ascii_list.
3900 (mface__free_realized): Free rface->non_ascii_list.
3901 (mface__update_frame_face): New function.
3902 (mface): Initialize face->frame_list.
3903 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
3905 (mface_merge): Likewise.
3906 (mface_put_prop): If key is Mhline or Mbox, get value by
3907 get_hline_create or get_box_create respectively.
3908 (mface_put_prop): Update frame->tick and call
3909 mface__update_frame_face if necessary.
3910 (mface_update): Do nothing if func is noop_hook.
3912 * draw.c (render_glyphs): If a font is not found, use
3913 mwin__draw_empty_boxes.
3914 (alloc_gstring): Initialize gstring->tick.
3915 (get_gstring): Check gstring->tick.
3917 2004-05-17 Kenichi Handa <handa@m17n.org>
3919 * face.c (find_realized_face): Return value changed. If RFONT is
3920 NULL, avoid unnecessary checking.
3921 (free_face): Free face->realized_face_list.
3922 (mface__realize): Adjusted for the change of find_realized_face.
3923 If it returns a realized face that needs update, free it and
3924 realize a new one. Push a new realized face to
3925 frame->realized_face_list instead of appending.
3926 (mface__for_chars): Adjusted for the change of find_realized_face.
3927 Short cut if the required font is in rface->ascii_rface.
3928 (mface_put_prop): Free old value if necessary. Set need_update
3929 member of realized faces to 1.
3931 * face.h (struct MFace): Delete member tick, add member
3933 (struct MRealizedFace): Delete member tick, add member
3936 2004-05-13 Kenichi Handa <handa@m17n.org>
3938 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
3940 2004-05-12 Kenichi Handa <handa@m17n.org>
3942 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
3944 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
3945 parse it XftNameParse.
3947 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
3948 (all_fonts_scaned): New variable.
3949 (set_font_info): FAMILY may be Mnil.
3950 (add_font_info): Argument changed.
3951 (xft_list): Call add_font_info in it.
3952 (ft_list): Likewise.
3953 (ft_select): Make it work in the case family is Mnil.
3954 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
3955 (mfont__ft_fini): Set all_fonts_scaned to 0.
3957 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
3958 that is failed to open.
3960 2004-05-10 Kenichi Handa <handa@m17n.org>
3962 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
3963 device's depth is 1 (i.e. monochrome).
3965 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
3966 to work around the problem of libtool.
3968 * font-ft.c: Include <freetype/ftbdf.h>.
3969 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
3971 (mfont__ft_init): Initialize them.
3972 (ft_iso8859_1_font_list): New variable.
3973 (set_font_info): Detect a font containing iso8859-1 glyphs and
3974 register it in ft_iso8859_1_font_list. If the font is not
3975 scalable, assume it as BDF or PCF font and setup SIZE and RESY
3976 properties of the font from its properties.
3977 (add_font_list): If the font is not scalable, check if it is BDF
3978 or PCF font. If not, ignore it.
3979 (ft_select): If FAMILY is Mnil, return NULL only if the requested
3980 registry is not iso8859-1.
3981 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
3982 ft_iso8859_1_font_list.
3983 (ft_find_metric): If the font is not scalable, assume it as BDF
3984 or PCF, and get a metric from its properties.
3985 (mfont__ft_fini): Free ft_iso8859_1_font_list.
3987 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
3989 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
3990 (libm17n_la_LDFLAGS): Delete it.
3991 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
3992 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
3994 2004-05-06 Kenichi Handa <handa@m17n.org>
3996 * draw.c (compose_glyph_string): Fix previous change.
3998 2004-04-30 Kenichi Handa <handa@m17n.org>
4000 * font-ft.c (ft_list): Delete unused variable `result'.
4001 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
4003 2004-04-27 Kenichi Handa <handa@m17n.org>
4005 * m17n-X.c: Include config.h
4006 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
4007 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
4008 (MWDevice) [HAVE_XFT2]: New member xft_draw.
4009 (FRAME_CMAP, FRAME_VISUAL): New macros.
4010 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
4011 (xfont_driver): Make it static.
4012 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
4013 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
4014 info->xft_color_back.
4015 (MXftFontInfo) [HAVE_XFT2]: New type.
4016 (mwin__xft_close) [HAVE_XFT2]: New function.
4017 (mwin__xft_open) [HAVE_XFT2]: New function.
4018 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
4019 (mwin__xft_render) [HAVE_XFT2]: New function.
4021 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4022 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
4023 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
4026 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4028 * font-ft.c: Don't include FT_FREETYPE_H here.
4029 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
4030 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
4031 (MFTInfo): New member charmap_index.
4032 (MFTInfo) [HAVE_XFT2]: New member xft_info.
4033 (check_otf_filename): Renamed from check_filename. Return value
4035 (ft_set_property): This function deleted.
4036 (set_font_info): New function.
4037 (add_font_list): Argument changed. Add multiple fonts.
4038 (xft_list) [HAVE_XFT2]: New function.
4039 (ft_list) [not HAVE_XFT2]: New function.
4040 (ft_select): Add code for Xft.
4041 (close_ft): Likewise.
4042 (ft_open): Likewise.
4043 (ft_find_metric): Likewise.
4044 (ft_encode_char): Likewise.
4045 (ft_render): Likewise.
4047 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
4049 2004-04-26 Kenichi Handa <handa@m17n.org>
4051 * textprop.c (mtext_attach_property): Declare the return type as
4054 2004-04-21 Kenichi Handa <handa@m17n.org>
4056 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
4058 2004-04-09 Kenichi Handa <handa@m17n.org>
4060 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
4062 (load_command): Setup above members.
4064 2004-04-05 Kenichi Handa <handa@m17n.org>
4066 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
4068 2004-03-30 Kenichi Handa <handa@m17n.org>
4070 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
4073 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
4074 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
4076 2004-03-29 Kenichi Handa <handa@m17n.org>
4078 * Version 1.0 Patch Level 2 released.
4080 2004-03-29 Kenichi Handa <handa@m17n.org>
4082 * charset.c (make_charset): Set charset->fully_loaded and
4083 charset->simple correctly. Don't try to get charset->min_char and
4084 charset->max_char for a charset of method subset and superset.
4085 Don't load a mapping file here.
4086 (mcharset__init): Set unified_max.
4087 (mcharset__load_from_database): Free a working plist.
4089 * coding.c (mcoding__fini): Free all malloced data.
4091 * input-gui.c (win_create_ic): Set control.as_image for preediting
4094 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
4095 `count') to initialize the array.
4097 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
4100 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
4102 (mwin__create_window): Fix bug of setting a background pixel of a
4104 (mwin__adjust_window): Clear the window before drawing.
4106 * m17n-core.c (mdebug__report_object): Free array->objectes if
4108 (m17n_init_core): Don't set report_header_printed to 0 here.
4109 Fix debugging information.
4110 (m17n_fini_core): Set report_header_printed to 0 here.
4112 * m17n-core.h (mplist_deserialize): Extern it.
4114 * m17n-gui.c (m17n_fini_win): Fix debugging information.
4116 * m17n.c (m17n_fini): Fix debugging information.
4118 * mtext.c (mtext__adjust_foramt): New function.
4120 * mtext.h (mtext__adjust_foramt): Extern it.
4122 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
4124 * plist.h (mplist__deserialize): Don't extern it.
4126 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
4127 elements of symbol_table to NULL. Report about created and freed
4128 symbols if MDEBUG_FINI is set.
4130 2004-03-22 Kenichi Handa <handa@m17n.org>
4132 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
4134 * m17n.c (m17n_init): Fix the way of checking merror_code.
4136 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
4138 2004-03-22 Kenichi Handa <handa@m17n.org>
4140 * fontset.c (realize_font_group): Adjust the font size by
4141 mfont__resize before selecting a font.
4143 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
4145 2004-03-19 Kenichi Handa <handa@m17n.org>
4147 * Version 1.0 Patch Level 1 released.
4149 2004-03-19 Kenichi Handa <handa@m17n.org>
4151 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
4153 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
4155 2004-03-19 Kenichi Handa <handa@m17n.org>
4157 Re-apply the changes forgotten in the released version.
4159 * charset.c (mcharset__load_from_database): Call
4160 mchar_define_charset.
4162 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
4163 (mconv_encode_range): Put Mcoding text property.
4165 2004-03-18 Kenichi Handa <handa@m17n.org>
4167 * draw.c (Mdepth): New variable.
4168 (visual_order): Delete unused local var `pos'.
4169 (compose_glyph_string): Fix for the case that gstring->glyphs is
4170 realloced. Stop generating glyphs at TO. Fix handling of
4172 (layout_glyphs): Get metrics of all glyphs in advance. Set
4173 lbearing and rbearing of base of composition glyph correctly.
4174 Handle left-overhang glyphs correctly.
4175 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
4177 (dump_combining_code): Change the defualt off_x character to ".".
4178 (mdraw__init): Initialize Mdepth.
4180 * face.c (work_gstring): New variable
4181 (mface__init): Initialize work_gstring.
4182 (mface__fini): Free work_gstring.glyphs.
4183 (mface__realize): Don't handle videomode property here. Adjusted
4184 for the change of mfont__get_metric.
4185 (mface__for_chars): Adjusted for the change of mfont__get_metric.
4187 * face.h (enum face_gc): Moved to m17n-X.c.
4189 * font.h (struct MFontDriver): Arguments of find_metric changed.
4190 (mfont__select): Prototype adjusted.
4191 (mfont__get_metric): Likewise.
4192 (mfont__ft_drive_otf): Likewise.
4193 (mfont__flt_run): Likewise.
4195 * font.c (mfont__select): New argument layouter. If layouter is
4196 different in the registered font, make a new copy of realized
4198 (mfont__get_metric): Argument changed. Get metrics of multiple
4200 (mfont_find): Call mfont__select with layouter as Mnil.
4202 * font-flt.c (FontLayoutContext): New member rfont.
4203 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
4204 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
4206 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
4208 (NUM_POINTS): New macro.
4209 (MPointTable): New type.
4210 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
4211 (mfont__ft_drive_otf): New argument rfont.
4213 * fontset.c (realize_font_group): Adjusted for the changed of
4215 (check_fontset_element): This function deleted.
4217 * input-gui.c (adjust_window_and_draw): Locate a preedit window
4218 off the parent window if the preedit text is zero length.
4220 * internal-gui.h (struct MFrame): New members foreground,
4221 background, videomode, font.
4222 (struct MGlyphString): New member anti_alias.
4223 (MDrawPoint): New type.
4224 (mwin__draw_bitmap): Prototype deleted.
4225 (mwin__draw_points): Prototype added.
4227 * m17n-gui.h (MDrawControl): New member anti_alias.
4229 * m17n-gui.c (free_frame): Free frame->font.
4230 (mframe): Set the fontset of frame->face to the default fontset.
4232 * m17n-X.c (RGB_GC): New type.
4233 (enum gc_index): Renamed from enum face_gc. Member names changed.
4235 (struct MWDevice): Members foreground and background deleted. New
4236 member scratch_gc, gc_list.
4237 (DEFAULT_FONT, FALLBACK_FONT): New macros.
4238 (free_device): Free GCs in device->gc_list.
4239 (get_rgb_gc): New function.
4240 (get_gc): Renamed and argument changed from get_color.
4241 (get_gc_for_anti_alias): New function.
4242 (xfont_find_metric): Arguments changed. Get metrics of multiple
4244 (set_region): Argument changed. Caller changed.
4245 (xfont_render): Allways set a font in gc.
4246 (x_error_handler, x_io_error_handler): Define only if
4247 X_SET_ERROR_HANDLER is defined.
4248 (mwin__open_device): Create device->scratch_gc. Set members
4249 foreground, background, and videomode of frame. Call
4250 XSetErrorHandler and XSetIOErrorHandler only if
4251 X_SET_ERROR_HANDLER is defined.
4252 (struct gc_list): Deleted.
4253 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
4254 (mwin__realize_face): Adjusted for the change of the format of
4255 rface->info and the charge of set_region.
4256 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
4257 (mwin__draw_box): Likewise.
4258 (mwin__draw_bitmap): This function deleted.
4259 (mwin__draw_points): New function.
4260 (mwin__verify_region): Adjusted for the change of the format of
4261 rface->info and the charge of set_region.
4262 (mwin__create_window): Inherit backgound pixel from parent.
4263 (mwin__dump_gc): Adjusted for the change of the format of
4266 2004-03-16 Kenichi Handa <handa@m17n.org>
4268 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
4270 * input.c (M_key_alias): New variable.
4271 (handle_key): Try M_key_alias property of a key too.
4272 (minput__init): Initialize M_key_alias. Give that property to
4273 symbols in one_char_symbol. Fix bug of initializing
4276 * draw.c (compose_glyph_string): Don't handle
4277 ignore_formatting_char here. Include formatting characters in the
4278 range processed by a FTL.
4279 (layout_glyph_string): Handle ignore_formatting_char here.
4281 2004-03-12 Kenichi Handa <handa@m17n.org>
4283 * input-gui.c (win_create_ic): Enable bidi in status control.
4285 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
4287 2004-03-09 Kenichi Handa <handa@m17n.org>
4289 * input.c (load_input_method): If title is not specified, use the
4290 input method name as title.
4292 * m17n-X.c (get_color): Make it static.
4293 (xim_create_ic, xim_destroy_ic, x_error_handler)
4294 (x_io_error_handler): Likewise.
4296 2004-03-01 Kenichi Handa <handa@m17n.org>
4298 * Version 1.0 released.
4301 Copyright (C) 2003, 2004
4302 National Institute of Advanced Industrial Science and Technology (AIST)
4303 Registration Number H15PRO112
4305 This file is part of the m17n library.
4307 The m17n library is free software; you can redistribute it and/or
4308 modify it under the terms of the GNU Lesser General Public License
4309 as published by the Free Software Foundation; either version 2.1 of
4310 the License, or (at your option) any later version.
4312 The m17n library is distributed in the hope that it will be useful,
4313 but WITHOUT ANY WARRANTY; without even the implied warranty of
4314 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4315 Lesser General Public License for more details.
4317 You should have received a copy of the GNU Lesser General Public
4318 License along with the m17n library; if not, write to the Free
4319 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
4320 Boston, MA 02110-1301, USA.