1 2007-12-08 Kenichi Handa <handa@ni.aist.go.jp>
3 * m17n-flt.c (run_rule): Fix printing of debug info. Don't update
4 TO for the rule of SRC_HAS_GLYPH.
6 * draw.c (run_flt): Argument changed.
7 (compose_glyph_string): Adjusted for the above change.
9 2007-12-07 Kenichi Handa <handa@ni.aist.go.jp>
11 * plist.c (read_mtext_element): Don't free the malloced buffer.
13 2007-12-04 Kenichi Handa <handa@ni.aist.go.jp>
15 * m17n-core.h (merror_code): Extern it.
17 * m17n-misc.h (merror_code): Don't extern it.
19 * m17n.h: Handle the case of _M17N_FLT_H_ being defined.
21 * m17n-flt.h: Handle the case of _M17N_H_ being defined.
23 2007-11-22 Kenichi Handa <handa@ni.aist.go.jp>
25 * draw.c (compose_glyph_string): Check g->rface->layouter, not
26 g->rface->rfont->layouter.
28 * font-ft.c (ft_drive_otf): Fix setting of g->g.from and g->g.to.
30 * m17n-flt.c (FontLayoutContext): New member encoded_offset.
31 (run_rule): Use ctx->encoded_offset.
32 (run_command): Likewise.
33 (run_stages): Set ctx->encoded_offset.
35 2007-11-21 Kenichi Handa <handa@ni.aist.go.jp>
37 * m17n-flt.c (enum GlyphInfoMask): Adjusted for the change of
38 bit-size of MFLTGlyph->internal.
40 2007-11-20 Kenichi Handa <handa@ni.aist.go.jp>
42 * draw.c (visual_order): Exclude the last anchor glyph from the
45 * m17n-flt.h (MFLTGlyph): New member <adjusted>.
47 * m17n-flt.c (run_otf): Set adjusted flag of glyphs if necessary.
48 (run_stages): Likewise.
49 (load_flt): Unref top after checking plist.
51 * m17n-X.c (xft_render): Check adjusted flag of glyphs.
53 2007-11-12 Kenichi Handa <handa@ni.aist.go.jp>
55 * font-ft.c (ft_check_otf): Fix arg to OTF_check_features.
57 * m17n-flt.c (Mcombining): New variable.
58 (Mfont_facility): Renamed from Mfont_has. Referrer changed.
59 (enum FontLayoutCmdRuleSrcType): Delete SRC_EXIST, add
60 SRC_HAS_GLYPH and SRC_OTF_SPEC.
61 (FontLayoutCmdRule): Delete src.exist, add src.supported_glyph and
63 (load_command): Adjusted for the above changes.
65 (combining_code_from_class): Delete it.
66 (mflt_get): Check flt->name against Mcombining, not Mt.
68 * internal-flt.h (Mcombining): Extern it.
70 * draw.c (compose_glyph_string): Call run_flt with Mcombining for
73 2007-11-09 Kenichi Handa <handa@ni.aist.go.jp>
75 * face.c (mface__realize): Reset measured flag before calling
78 * m17n-flt.c (run_stages): Fix handing of off_x and off_y.
79 (setup_combining_coverage): New function.
80 (setup_combining_flt): New function.
81 (mflt_get): If flt is not found, return NULL. If name if Mt,
82 call setup_combining_flt.
83 (mflt_run): For debugging, print font family name.
85 * font-ft.c (ft_render): Fix handling of baseline_offset.
86 (ft_encapsulate): Set metrics in 26.6 fixed pixel.
87 (ft_render): Check pixel_mode to determine anti_alias.
89 * m17n-X.c (xfont_find_metric): Delete invalid "continue" line.
90 (xfont_find_metric): Set metrics in 26.6 fixed pixel.
91 (xfont_render): Set baseline_offset in pixel.
92 (xft_render): Fix handling of baseline_offset.
94 * draw.c (run_flt): Set font.font.family.
95 (compose_glyph_string): Fix handling of combining characters.
97 * fontset.c (try_font_list): Check if the named flt is surely
100 2007-11-07 Kenichi Handa <handa@ni.aist.go.jp>
102 * draw.c (analyse_bidi_level): New function.
103 (visual_order): Do reordering using the already decided
105 (compose_glyph_string): Decide bidi-level before calling flt.
107 * m17n-flt.c (mflt_run): Fix typo.
109 * font-ft.c (ft_drive_otf): Fix indexing gstring->glyphs.
111 2007-11-06 Kenichi Handa <handa@ni.aist.go.jp>
113 * draw.c (visual_order): Don't rely on the width of glyphs.
114 (run_flt): Fix culculation of g->g.to.
116 * m17n-flt.c (run_rule): Don't set error code here.
117 (run_cond): Likewise.
118 (run_otf): Fix culculation of xoff and yoff.
119 (run_command): Don't set error code here.
123 * m17n-X.c (xfont_open): Keep rfont's metrics in 26.6 fixed pixels.
124 (xfont_find_metric): Set glyph's yadv to 0.
125 (xft_find_metric): Likewise.
127 * font-ft.c (ft_open): Keep rfont's metrics in 26.6 fixed pixels.
128 (ft_find_metric): Adjust glyph's metrics.
129 (ft_encapsulate): Keep rfont's metrics in 26.6 fixed pixels.
130 (ft_drive_otf): Set mark glyph's xadv to 0.
132 * face.c (mface__for_chars): Adjusts the unit of face's ascent and
135 2007-10-29 Kenichi Handa <handa@m17n.org>
137 * m17n-flt.h (struct _MFLTOtfSpec): Adjusted for the new FLT handling.
138 (mflt_get): Adjusted for the argument change.
139 (mflt_name): Adjusted for the return value change.
141 * m17n-flt.c (Mgenerator, Mend): New variables.
142 (flt_min_coverage, flt_max_coverage): New variables.
145 (Mfont_has): Renamed from Mexist. Referrers chagned.
146 (gen_otf_tag): Handle the trailing whitespaces.
147 (otf_count_features, otf_store_features): Fix for negative features.
148 (parse_otf_command): Adjusted for the change of MFLTOtfSpec.
149 (load_otf_command): Likewise.
150 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
151 (load_flt): Argument changed. Caller changed.
152 (free_flt_list): New function.
153 (run_rule): Adjusted for the change of FontLayoutContext.
154 (mflt_run): Adjusted for the change of FontLayoutContext.
156 * m17n-gui.c (m17n_init_win): Call m17n_init_flt.
157 (m17n_fini_win): Call m17n_fini_flt.
159 * m17n-gui.h: Include m17n-flt.h.
161 * m17n-gd.c: Adusted for the change of MGlyph.
163 * m17n-X.c: Adusted for the change of MGlyph.
164 (xft_check_otf, xft_drive_otf): New functions.
166 * internal-gui.h (MGlyph): Modified for new FLT handling.
168 * fontset.c (try_font_list): Adusted for the change of MGlyph.
170 * font-ft.c: Adjusted for the change of MGlyph.
171 (ft_check_cap_otf): Renamed from ft_check_otf. Callers changed.
172 (get_glyph_metric): Deleted.
173 (ft_check_otf): New function.
174 (ft_drive_otf): New fucntion.
176 * font.c: Adjusted for the change of MGlyph.
177 (mfont__init): Don't call mfont__flt_init.
178 (mfont__fini): Don't call mfont__flt_fini.
179 (mfont__get_glyph_id, mfont__get_metrics): New functions.
181 * font.h (struct MRealizedFont): New members x_ppem and y_ppem.
182 (MFLTFontForRealized): New struct.
183 (struct MFontDriver): New members check_otf and drive_otf.
184 (mfont__get_glyph_id, mfont__get_metrics): Extern them.
186 * face.c: Adjusted for the change of MGlyph.
188 * draw.c: Adjusted for the change of MGlyph.
190 * m17n.c (m17n_init): Don't call mchar_init.
192 * m17n-core.c (m17n_init_core): Call mchar_init.
194 * m17n-core.h (mchartable_min_char, mchartable_max_char): Extern them.
196 * input.c: Include "m17n.h" instead of "m17n-gui.h".
198 * chartab.c (mchartable): Initialize table->min_char to -1.
199 (mchartable_min_char): New function.
200 (mchartable_max_char): New function.
202 * Makefile.am (GUI_SOURCES): Delete font-flt.c.
203 (libm17n_gui_la_LIBADD): Add ${top_builddir}/src/libm17n-flt.la.
205 2007-10-12 Kenichi Handa <handa@m17n.org>
207 * m17n-core.h (Mcharset): Extern it.
208 Move detabase related declarations from m17n.h.
210 * m17n-flt.h: Include m17n-core.h instead of m17n.h.
211 (struct _MFLTOtfFeatures): New struct.
212 (struct _MFLTOtfSpec): Delete gsub, gpos, etc, add gsub_gpos.
213 (struct _MFLTFont): Delete otf, add check_otf.
214 (MCHAR_INVALID_CODE): Define it.
216 * plist.c (read_mtext_element): Simplify the code.
218 * m17n.h: Move database related declarations to m17n-core.h
219 (Mharset): Don't extern it.
221 * m17n.c (m17n_init): Don't call mdatabase__init.
223 * m17n-gd.c (read_rgb_txt): Check also /etc/X11/rgb.txt. Downcase
226 * m17n-flt.c: Include m17n-core.h instead of m17n.h.
227 (Mexist): New variable.
228 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
229 (FontLayoutCmdRule): New member src.exist.
230 (parse_otf_command): Handle gsub_count and gpos_count separately.
231 (load_otf_command): Adjusted for the change of MFLTOtfSpec.
232 (load_command): Handle the command "exist".
233 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
234 (run_rule): Handle the case SRC_EXIST.
235 (run_otf): Adjusted for the change of MFLTOtfSpec.
236 (run_command): Check the range of FROM.
237 (check_otf_spec): Delete it.
238 (m17n_init_flt): Call m17n_init_core instead of m17n_init.
240 (m17n_fini_flt): Call m17n_fini_core instead of m17n_fiini.
241 (mflt_find): Call font->check_otf instead of check_otf_spec.
242 (mflt_run): Keep the metrics in 26.6 fixed point.
244 * m17n-core.c (mdatabase__finder, mdatabase__loader): Delete them.
245 (m17n_init_core): Call mdatabase__init.
247 * m17n-X.c (device_open): Use mplist_add, not mplist_push.
249 * internal.h (mdatabase__finder, mdatabase__loader): Delete externs
252 * font-flt.c (Mexist): New variable.
253 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
254 (FontLayoutCmdRule): New member src.exist.
255 (load_category_table): Use isalnum, not isalpha.
256 (load_command): Check the command "exist".
257 (run_rule): Hande the case SRC_EXIST.
258 (run_command): Check the range of FROM.
259 (mfont__flt_init): Initialize Mexist.
261 * draw.c (layout_glyphs): Fix calculation of off_x and off_y.
263 * database.h (mdatabase__load_charset_func): Extern it.
265 * database.c: Include m17n-core.h instead of m17n.h.
266 (load_chartable): Use mtext__from_data.
267 (load_charset): Moved to charset.c
268 (load_database): Call mdatabase__load_charset_func instead of
270 (mdatabase__load_charset_func): New variable.
271 (mdatabase__init): Initialize mdatabase__load_charset_func and
272 Mcharset. Don't set mdatabase__finder and mdatabase__loader.
273 (mdatabase__save): Use fwrite, not mconv_encode_stream.
274 (Mcharset): Declare it here.
276 * charset.c: Include "database.h.".
277 (load_charset): Moved from database.c.
278 (mcharset__init): Initialize mdatabase__load_charset_func, don't
281 * character.c (mchar_define_property): Call mdatabase_find directly.
282 (mchar_get_prop): Call mdatabase_add directly.
283 (mchar_put_prop): Call mdatabase_load directly.
284 (mchar_get_prop_table): Likewise.
286 * Makefile.am (libm17n_core_la_SOURCES): Add database.[ch].
287 (libm17n_la_SOURCES): Remove database.[ch].
288 (libm17n_flt_la_LIBADD): Delete libm17n.la, add libm17n-core.la.
290 2007-09-18 Kenichi Handa <handa@m17n.org>
292 * face.c (mface__realize): Try Freetype based font at first.
294 * font.c: Include <ctype.h>
296 2007-09-16 Kenichi Handa <handa@m17n.org>
298 * m17n-flt.c (load_flt): New arg full. If full is zero, load only
300 (run_otf): Call font->get_metrics, not font->get_metric.
301 (run_stages): Likewise.
302 (CHECK_FLT_COVERAGE): New macro.
303 (CHECK_FLT_STAGES): Call load_flt with the second arg 1.
304 (check_otf_spec): New function.
305 (m17n_fini_flt): Unref flt->coverage.
306 (mflt_find): Argument changed.
307 (mflt_name): New function.
308 (mflt_coverage): Use CHECK_FLT_COVERAGE.
310 * m17n-flt.h (MFLTFont): Member get_metrics renamed from get_metric.
311 (mflt_find): Prototype adjusted.
312 (mflt_name): Extern it.
314 2007-09-14 Kenichi Handa <handa@m17n.org>
316 * m17n-flt.h (struct _MFLTGlyph): Change signedness of members.
318 * font-flt.c (run_otf): Make debug info printing comaptible with
320 (run_command): Likewise.
321 (mfont__flt_run): Likewise.
323 * m17n-flt.c (UPDATE_CLUSTER_RANGE): ctx->cluster_begin_idx is
324 invalid only when it's negative.
326 (run_command): Likewise.
327 (mflt_run): Initialize ctx.cluster_begin_idx to -1.
329 2007-09-10 Kenichi Handa <handa@m17n.org>
331 * m17n-flt.h (struct _MFLTGlyph): New member encoded and measured.
332 (struct _MFLTFont): Prototype of get_glyph_id changed.
334 * m17n-flt.c (enum GlyphInfoMask): Delete EncodedMask and
336 (GAPPEND): Delete this macro.
337 (GET_ENCODED, SET_ENCODED, GET_MEASURED, SET_MEASURED): Adjusted
338 for the change of MFLTGlyph. Caller changed.
339 (run_otf): Simply calls font->get_glyph_id.
340 (run_command): Reset g->encoded and g->measured for direct code.
341 (positioning): Delete this function.
342 (run_stages): Simply calls font->get_glyph_id and font->get_metric.
344 2007-09-07 Kenichi Handa <handa@m17n.org>
346 * draw.c (compose_glyph_string): Improve script detection.
348 2007-09-06 Kenichi Handa <handa@m17n.org>
350 * m17n-flt.h (mflt_get): Extern it.
352 * m17n-flt.c (run_stages): Call positioning only if
353 font->get_metric is non-NULL.
354 (CHECK_FLT_STAGES): Fix typo.
355 (mflt_get): New function.
357 * font-flt.c (mfont__flt_run): Improve debug info printing.
359 2007-09-04 Kenichi Handa <handa@m17n.org>
361 * m17n-flt.c (MFontLayoutTable): Delete this type.
362 (struct _MFLT): New member mdb and coverage.
363 (list_flt): Set flt->mdb.
364 (load_generator): Argument and return value changed. Caller
366 (get_font_layout_table): Delete this function.
367 (run_stages): Argument changed. Caller changed.
368 (CHECK_FLT_STAGES): New macro.
369 (mfont__flt_encode_char): Argument changed.
370 (mflt_find): Likewise.
371 (mflt_coverage): New function.
372 (mflt_run): Argument changed.
373 (mdebug_dump_flt): Likewise.
375 * m17n-flt.h (mflt_coverage): Extern it.
376 (mflt_find): Prototype adjusted.
378 2007-09-03 Kenichi Handa <handa@m17n.org>
380 * internal.h (MTABLE_CALLOC_SAFE, MSTRUCT_CALLOC_SAFE): New macros.
382 * database.c (mdatabase__props): New function.
384 * database.h (mdatabase__props): Extern it.
386 * m17n-flt.h (struct _MFLTGlyphString): Delete user_data, add
388 (struct _MFLTFont): Add suitable_p.
389 (mflt_find): Extern it.
391 * m17n-flt.c: Include "database.h".
392 (struct _MFLT): New struct.
393 (list_flt): New function.
394 (load_flt): Don't update flt_list.
395 (get_font_layout_table): Use flt_list.
396 (m17n_init_flt): Don't initialize flt_list.
397 (m17n_fini_flt): Adjusted for the change of flt_list.
398 (mflt_find): New function.
399 (mflt_run): Fix debug printing.
401 2007-08-23 Kenichi Handa <handa@m17n.org>
403 * m17n-flt.c (run_otf): Remove #ifdef HAVE_OTF and #endi.
404 (run_stages): Print separator in encoded string as "|".
406 2007-08-23 Kenichi Handa <handa@m17n.org>
408 * font-flt.c (mfont__flt_run): Don't calculate a glyph metric if
409 the glyph is already handled by OTF.
411 2007-08-21 Kenichi Handa <handa@m17n.org>
413 * font-ft.c (ft_check_capability): Check cap->script_tag at first.
415 2007-08-20 Kenichi Handa <handa@m17n.org>
417 * font-flt.c (mfont__flt_run): Get glyph metrics before printing
420 2007-08-17 Kenichi Handa <handa@m17n.org>
422 * m17n-flt.h (struct _MFLTGlyphString): Member pointer renamed to
424 (MFLTOtfSpec): Renamed from MFLT_OTF_Spec.
425 (MFLTFont): Prototype of the member drive_otf adjusted.
427 * m17n-flt.c (run_stages): Fix handling of padding.
429 * font-ft.c (get_glyph_metric): New function.
430 (DEVICE_DELTA): Return 26.6 fixed point value.
431 (adjust_anchor): Likewise.
432 (mfont__ft_drive_otf): Use get_glyph_metric.
434 * font-flt.c (mfont__flt_run): Pay attention to padding on
437 2007-08-16 Kenichi Handa <handa@m17n.org>
439 * m17n-flt.c (run_stages): Fix typo.
441 * font-ft.c (adjust_anchor): Argument changed. Calculte based on
443 (mfont__ft_drive_otf): Don't call OTF_check_features for GPOS.
444 Adjusted for the argument change of adjust_anchor. Calculte based
447 2007-08-15 Kenichi Handa <handa@m17n.org>
449 * charset.c (mcharset__load_from_database): Set mdebug_flag
450 instead of mdebug_mask.
452 * coding.c (mcoding__load_from_database): Set mdebug_flag instead
455 * database.c (load_database): Set mdebug_flag instead of
457 (mdatabase__load_for_keys): Likewise.
459 * draw.c: Include "internal-flt.h".
460 (dump_combining_code): Don't subtract 128 from combining code
463 * font-flt.c: Include "internal-flt.h". Set mdebug_flag instead
465 (run_rule): Print debug info only when MDEBUG_FLAG is greater than
467 (run_cond): Likewise.
469 (run_command): Likewise.
470 (mfont__flt_run): Change format of debug info.
472 * font-ft.c: Include "internal-flt.h".
473 Set mdebug_flag instead of mdebug_mask.
474 (mfont__ft_drive_otf): Fix arg to OTF_check_features.
476 * input.c: Set mdebug_flag instead of mdebug_mask.
477 (shift_state): New MDEBUG_FLAG macro.
478 (preedit_commit): Likewise.
481 * internal-flt.h: New file.
483 * internal-gui.h (MAKE_COMBINING_CODE, COMBINING_CODE_OFF_Y)
484 (COMBINING_CODE_OFF_X, COMBINING_CODE_BASE_X)
485 (COMBINING_CODE_BASE_Y, COMBINING_CODE_ADD_X)
486 (COMBINING_CODE_ADD_Y, MAKE_COMBINING_CODE_BY_CLASS)
487 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
488 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P): Move
489 these macros to internal-flt.h.
491 * internal.h (M17N_OBJECT_ADD_ARRAY): Adjusted for the change of
493 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Likewise.
494 (enum MDebugMaskBit): Delete this enum.
495 (enum MDebugFlag): New enum.
496 (mdebug__flag): Don't extern it.
497 (mdebug__flags): Extern it.
498 (MDEBUG_FLAG): New macro.
499 (MDEBUG_PRINT0): Use the macro MDEBUG_FLAG.
500 (MDEBUG_DUMP, MDEBUG_PUSH_TIME, MDEBUG_POP_TIME)
501 (MDEBUG_PRINT_TIME): Likewise.
503 * m17n-X.c (xfont_open): Set mdebug_flag instead of mdebug_mask.
504 (xfont_list): Likewise.
506 * m17n-core.c (mdebug__flag): Delete this variable.
507 (mdebug__flags): New variable.
508 (SET_DEBUG_FLAG): Make it a function.
509 (m17n_init_core): Set mdebug_flag instead of mdebug_mask.
510 (m17n_fini_core): Likewise.
512 * m17n-gui.c (m17n_init_win): Set mdebug_flag instead of mdebug_mask.
513 (m17n_fini_win): Likewise.
515 * m17n-misc.h (enum MErrorCode): Add MERROR_FLT.
517 * m17n.c (m17n_init): Set mdebug_flag instead of mdebug_mask.
518 (m17n_fini): Likewise.
520 * symbol.c (msymbol__free_table): Adjusted for the change of
523 * Makefile.am (BASICBUILDS): Add libm17n-flt.la.
524 (BASICHEADERS): Add m17n-flt.h.
525 (FLT_SOURCES): New variable.
526 (libm17n_flt_la_SOURCES, libm17n_flt_la_LIBADD)
527 (libm17n_flt_la_LDFLAGS): Likewise.
529 * m17n-flt.h: New file.
531 * m17n-flt.c: New file created by modifying font-flt.c.
533 2007-07-13 Kenichi Handa <handa@m17n.org>
535 * Version 1.4.0 released.
537 2007-07-12 Kenichi Handa <handa@m17n.org>
539 * input.c: Fix doxygen @ref commands.
541 2007-07-10 Kenichi Handa <handa@m17n.org>
543 * m17n-core.h (M17NFunc): Fix typo of Doxygen directive.
545 2007-07-09 Kenichi Handa <handa@m17n.org>
547 * m17n-core.h (M17N_BEGIN_HEADER, M17N_END_HEADER): New macros.
549 * m17n.h: Include m17n-core.h if not yet done. Use macros
550 M17N_BEGIN_HEADER and M17N_END_HEADER.
552 * m17n-gui.h: Likewise.
554 * m17n-misc.h: Likewise.
556 2007-06-13 Kenichi Handa <handa@m17n.org>
558 * font-flt.c (load_command): Prepend "^" in the regular expression.
560 2007-06-11 Kenichi Handa <handa@m17n.org>
562 * language.c (mlanguage_name_list): Fix previous change.
564 * coding.c (mcoding__load_from_database): Add aliases in
565 coding_definition_list.
567 2007-06-10 Kenichi Handa <handa@m17n.org>
569 * language.c (mlanguage_name_list): Fix previous change.
571 2007-06-08 Kenichi Handa <handa@m17n.org>
573 * input.c (update_candidate): Copy candidate_list earlier.
574 (re_init_ic): Provide pseudo initialize state if none.
576 2007-06-05 Kenichi Handa <handa@m17n.org>
578 * input.c (preedit_insert): Print debug information.
580 * database.c (expand_wildcard_database): New function.
581 (mdatabase_list): Fix handling of wildcard database.
583 * language.c (load_lang_name): New function.
584 (mlang__fini): Cancel the last two changes.
585 (mlanguage_name_list): New arg script and territories. Use
588 * m17n.h (mlangauge_name_list): Adjusted.
590 2007-06-04 Kenichi Handa <handa@m17n.org>
592 * input.c (open_im): Check if the input method has at least one
595 2007-06-01 Kenichi Handa <handa@m17n.org>
597 * input.c (shift_state): Change the format of debug print.
598 (preedit_commit): New arg need_prefix. Caller changed.
599 (update_candidate): Copy candidate_list.
600 (take_action_list): Likewise.
601 (handle_key): Change the format of debug print.
603 * font-flt.c (load_flt): Ignore unknown directives.
605 2007-05-25 Kenichi Handa <handa@m17n.org>
607 * m17n-core.c (mdebug__unregister_object): Small optimization.
609 * database.c (find_file): Merged into get_database_file.
610 (get_database_file): New arg result. Caller changed.
611 (mdatabase__check): Fix the logic.
613 2007-05-24 Kenichi Handa <handa@m17n.org>
615 * database.c (find_database): If unprocessed wildcard database is
616 found, register database filed and recursively call find_database.
617 (free_db_info): Unref db_info->properties.
618 (register_database): New arg properties. Delete code for
619 initializing mdatabase__list.
620 (register_databases_in_files): Argument changed. Caller changed.
621 (mdatabase__update): Don't list files by glob here.
622 (mdatabase_list): If unprocessed wildcard database is found,
623 register database filed and recursively call mdatabase_list.
625 * database.h (enum MDatabaseStatus): New enum
626 MDB_STATUS_AUTO_WILDCARD.
628 * input.c (load_branch): Fix previous change.
629 (update_global_info): If the global database is not found, return -1.
631 2007-05-23 Kenichi Handa <handa@m17n.org>
633 * database.c (Mversion): New variable.
634 (mdatabase__init): Initialize it.
635 (register_database): New arg properties. Caller changed.
636 (register_databases_in_files): Don't check version here.
637 (mdatabase__update): Likewise.
639 * database.h (MDatabaseInfo): New member properties.
641 2007-05-21 Kenichi Handa <handa@m17n.org>
643 * language.c: Include <ctype.h>
644 (mlanguage__info): Use strncasecmp (not memcmp).
645 (mlanguage_name): Downcase language name for backward
648 * input.c (filter): Don't check Mlanguage property of
651 2007-05-18 Kenichi Handa <handa@m17n.org>
653 * language.c (mlanguage_name): Fix it to handle M-text English
656 * input.c (config_command): Set NAME before using it.
657 (load_branch): Try to resolve a map name by variables.
659 2007-05-17 Kenichi Handa <handa@m17n.org>
661 * language.c (mlang__fini): Fix previous change.
663 2007-05-16 Kenichi Handa <handa@m17n.org>
665 * plist.c (free_plist): Cancel the last change.
666 (write_element): Check if PLIST is nested.
667 (mplist__from_plist): Label a plist as nested if appropriate.
668 (mplist__from_alist): Label a plist as nested.
669 (mplist__conc): Check the value of PL before referring it. Label
670 a plist as nested if appropriate.
671 (mplist_copy): Label a plist as nested if appropriate.
672 (mplist_put_func): Return Mnil if KEY is a managing key.
673 (mplist_push): Label a plist as nested if appropriate.
675 * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
678 * language.c (mlang__fini): Unref each element of langname_list.
680 2007-05-14 Kenichi Handa <handa@m17n.org>
682 * language.c: Include <string.h> and <locale.h>.
683 (langname_list): New variable.
684 (load_lang_script_list): Exclude invalid list elements.
685 (mlang__init): Initialize langname_list.
686 (mlang__fini): Unref langname_list.
687 (mlanguage__info): Adjusted for the change of English
688 name (symbol->M-text).
689 (mlanguage_name): Label it as obsolete.
690 (mlanguage_name_list): New function.
692 * m17n.h (mlanguage_name_list): Extern it.
694 * locale.c (make_locale): Fix setting of members of locale.
696 * plist.c (free_plist): Unref also nested plist.
698 2007-05-11 Kenichi Handa <handa@m17n.org>
700 * coding.c (mconv_reset_converter): Set internal->used to 0.
702 2007-05-08 Kenichi Handa <handa@m17n.org>
704 * input.c (check_description): Force copying the translated text.
706 2007-05-02 Kenichi Handa <handa@m17n.org>
708 * input.c (minput_save_config): Unref unnecessary plist. Use
709 free_im_list to free im_config_list.
711 2007-04-20 Kenichi Handa <handa@m17n.org>
713 * input.c (config_command): Fix previous change again.
714 (config_variable): Likewise.
715 (minput_config_command): Fix for the case of setting back to
717 (minput_config_variable): Likewise.
718 (minput_save_config): Include nil as documentation of customized
721 2007-04-05 Kenichi Handa <handa@m17n.org>
723 * input.c (config_command): Fix previous change.
724 (config_variable): Likewise.
726 * plist.c (mplist_get_func): Fix for backward compatiblity.
728 2007-04-04 Kenichi Handa <handa@m17n.org>
730 * input.c (minput_get_command, minput_config_command): Fix example
733 2007-03-29 Kenichi Handa <handa@m17n.org>
735 These changes are to avoid unsafe casting of a function pointer.
737 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
738 (struct MFace): New member hook.
740 * face.c (serialize_face): Adjusted for the change of MFace.
741 (deserialize_face): Likewise.
742 (mface__init): Likewise. Use msymbol_put_func.
743 (mface__realize): Adjusted for the change of MFace. Avoid
745 (mface_get_prop): Adjusted for the change of MFace.
746 (mface_put_prop): Likewise.
747 (mface_get_hook): New function.
748 (mface_put_hook): New function.
749 (mface_update): Adjusted for the change of MFace.
751 * input-gui.c (win_callback): Use mplsit_get_func.
752 (minput__win_init): Use mplsit_put_func.
754 * input.c (take_action_list): Use mplist_get_func.
755 (init_ic_info): Likewise.
756 (fini_ic_info): Likewise.
757 (minput_callback): Likewise.
758 (minput__init): Use mplist_put_func.
760 * language.c (mlang__init): Use msymbol_put_func.
762 * m17n-core.h (M17NFunc): New function type.
763 (M17N_FUNC): New macro.
764 (msymbol_put_func, msymbol_get_func): Extern them.
765 (mplist_put_func, mplist_get_func): Extern them.
767 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
769 * m17n-gui.c (mframe): Add a proper casting.
771 * plist.h (struct MPlist): Make the member val a union.
772 (MPLIST_VAL): Adjusted for the above change.
773 (MPLIST_FUNC): New macro.
774 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
776 * plist.c (mplist_put_func, mplist_get_func): New functions.
778 * symbol.c (msymbol__fini): Use MPLIST_VAL.
779 (msymbol_put_func, msymbol_get_func): New functions.
781 * textprop.c (mtext_serialize): Use msymbol_get_func.
782 (mtext_deserialize): Likewise.
784 2007-03-28 Kenichi Handa <handa@m17n.org>
786 * input.c (get_candidate_list): Avoid unnecessary unref.
788 2007-03-23 Kenichi Handa <handa@m17n.org>
790 * database.c (mdatabase__update): Unref plist at the tail.
792 2007-03-21 Kenichi Handa <handa@m17n.org>
794 * input.c (update_custom_info): Fix for the case "name == Mnil &&
796 (config_command): Fix for the case that configuration is
798 (config_variable): Likewise.
799 (minput_config_command): If keyseqlist is an empty list, cancel
801 (minput_config_variable) If value is an empty list, cancel the
803 (minput_save_config): Handle cancellation of config and customize
806 2007-03-15 Kenichi Handa <handa@m17n.org>
808 * input.c (minput_config_variable): Check custom->vars (not
811 2007-03-01 Kenichi Handa <handa@m17n.org>
813 * input.c (reload_im_info): Setup cmds, vars, and title of
815 (check_variable_value): Fix the return value.
817 * database.c (mdatabase__check): If necessary, update database and
820 2007-02-28 Kenichi Handa <handa@m17n.org>
822 * database.c (get_dir_info): Set dir_info->status to
824 (check_version): New function.
825 (register_database): Don't call find_database.
826 (register_databases_in_files): Don't register a database of
828 (mdatabase__update): Likewise. Avoid unnecessary scanning.
830 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
831 and MDB_STATUS_OUTDATED.
833 * font.h (struct MFont): Types of members type, source, and
834 spacing changed to unsigned.
836 * internal-gui.h (struct): Types of members category and type
839 * internal.h (struct MText): Types of members format and coverage
842 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
843 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
845 2007-02-23 Kenichi Handa <handa@m17n.org>
847 * input.c (Mpop): New variable.
848 (fully_initialize): Initialize Mpop.
849 (parse_action_list): Handle Mpop.
850 (take_action_list): Likewise.
851 (handle_key): When a key is unhandled, shift to the initial state
852 only if the current state has no branch action.
854 2007-02-12 Kenichi Handa <handa@m17n.org>
856 * input.c (get_preceding_char): Unref mt if necessary.
857 (get_following_char): Likewise.
858 (parse_action_list): Fix handling of `insert' action as
860 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
861 (take_action_list): Check invalid candidate list.
863 2007-02-06 Kenichi Handa <handa@m17n.org>
865 * input.c (integer_value): Check also ic->produced for @-N.
867 2007-01-26 Kenichi Handa <handa@m17n.org>
869 * database.c (mdatabase__update): Check mdatabase__dir_list from
872 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
874 2007-01-12 Kenichi Handa <handa@m17n.org>
876 * input.c (handle_key): Handle a branch action of the initial
879 2007-01-10 Kenichi Handa <handa@m17n.org>
881 * m17n-gd.c (gd_render): Delete superfluous line.
883 2006-12-26 Kenichi Handa <handa@m17n.org>
885 * m17n.h (minput_callback): Extern it.
887 * input.h (minput__callback): Delte extern.
889 * input.c (get_surrounding_text): Adjusted for the change of
890 minput__callback to minput_callback.
891 (delete_surrounding_text): Likewise.
892 (minput_create_ic): Likewise.
893 (minput_destroy_ic): Likewise.
894 (minput_filter): Likewise.
895 (minput_set_spot): Likewise.
896 (minput_toggle): Likewise.
897 (minput_reset_ic): Likewise.
899 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
900 and ic->candidate_to to 0.
901 (minput_callback): Renamed from minput__callback.
903 * input-gui.c (win_callback): Adjusted for the change of
904 minput__callback to minput_callback.
906 2006-12-15 Kenichi Handa <handa@m17n.org>
908 * font-ft.c (ft_add_font): Fix typo.
910 2006-12-06 Kenichi Handa <handa@m17n.org>
912 * Version 1.3.4 released.
914 2006-11-16 Kenichi Handa <handa@m17n.org>
916 * input.c (parse_action_list): Allow (undo 0).
917 (adjust_markers): New function.
918 (preedit_insert, preedit_delete): Call adjust_markers.
919 (preedit_replace): New function.
920 (update_candidate): Call preedit_replace instead of preedit_insert
922 (filter): When ic_info->commit_key_head is nonzero, shift input
923 event keys even if there's no committed text.
925 2006-11-10 Kenichi Handa <handa@m17n.org>
927 * input.h (MInputContextInfo): New member commit_key_head.
929 * input.c (preedit_commit): Update ic_info->commit_key_head.
930 (take_action_list): Reset ic_info->commit_key_head on Mundo.
931 (filter): When committed, shift keys by ic_info->commit_key_head.
933 2006-10-30 Kenichi Handa <handa@m17n.org>
935 * input.c (preedit_delete): Fix typo.
936 (take_action_list): Print more debugging information. Allow
937 variable in arg of 'select' and `pushback'.
939 * database.c (gen_database_name): Don't put extra space.
940 (load_database): Print debugging information.
941 (register_databases_in_files): New arg headlen. Callers changed.
942 (mdatabase__load_for_keys): Shorten debugging information.
943 (mdatabase_load): Don't print debugging information here.
945 2006-10-27 Kenichi Handa <handa@m17n.org>
947 * input.c (marker_code): New arg surrounding. Callers changed.
948 (surrounding_pos): Check if name[0] == '@'.
949 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
950 (take_action_list): Likewise.
951 (get_preceding_char): If POS is zero, always call
952 get_surrounding_text.
954 2006-10-19 Kenichi Handa <handa@m17n.org>
956 * input.c (load_variables): Fix setting of `global'.
958 2006-10-16 Kenichi Handa <handa@m17n.org>
960 * draw.c (draw_background): Be sure to set *to_x.
961 (render_glyph_string): If from == to, just return.
963 2006-10-18 Kenichi Handa <handa@m17n.org>
965 * database.c (get_dir_info): Return NULL if the directory name is
967 (register_databases_in_files): Call register_database with
969 (mdatabase__update): Fix logic. Call register_database with
971 (mdatabase_define): Call register_database with
974 * input.c (delete_surrounding_text): Be sure to set members
975 preceding_text and following_text to NULL.
976 (shift_state): Save variable values in ic_info->vars_saved.
977 (preedit_commit): Don't print debug information here. Don't
978 change ic_info->keys here.
979 (get_candidate_list): Don't ref plist.
980 (take_action_list): Don't unref return value of
981 get_candidate_list. For undo, reset ic->produced and recover
982 ic_info->vars. Be sure to set ic->candidate_list to NULL after
984 (init_ic_info): Set ic_info->vars_saved.
985 (fini_ic_info): Unref ic_info->vars_saved.
986 (re_init_ic): Be sure to set ic->candidate_list to NULL after
988 (filter): Be sure to set members preceding_text and following_text
989 to NULL. Print debug information about produced text. Delete
990 processed keys from ic_info->keys.
992 * input.h (MInputContextInfo): New member vars_saved.
994 2006-10-16 Kenichi Handa <handa@m17n.org>
996 * database.c (mdatabase__update): Fix the way to get db_info.
998 2006-10-02 Kenichi Handa <handa@m17n.org>
1000 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
1001 `size' changed to 24.
1003 * font.c (xlfd_unparse_name): Adjusted for the change of
1005 (font_score): Likewise.
1006 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
1008 * m17n-X.c (MFontX, _MFontX): Deleted.
1009 (SET_SIZE, HAVE_SIZE): Deleted.
1010 (free_display_info): Adjusted for the change of
1011 disp_info->font_list format.
1012 (xfont_registry_list): Likewise.
1013 (xfont_open): Likewise.
1014 (xfont_list): Likewise.
1015 (xfont_encode_char): Ignore size to find a realized font.
1016 (MRealizedFontXft): Change the order of members to make it
1017 compatible with MRealizedFontFT.
1019 2006-09-27 Kenichi Handa <handa@m17n.org>
1021 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
1022 (mfont_close): Add comments.
1024 * mtext-lbrk.c (mtext_line_break): Add comment.
1026 2006-09-26 Kenichi Handa <handa@m17n.org>
1028 * input.c (minput_get_description): Handle description about
1029 inclusion-only input methods.
1031 2006-09-21 Kenichi Handa <handa@m17n.org>
1033 * input.c (M_gettext): New variable.
1034 (fully_initialize): Initialize M_gettext.
1035 (check_description): New function.
1036 (load_commands): Call check_description.
1037 (config_all_commands): Be sure to unref pl.
1038 (load_variables): Call check_description.
1039 (config_all_variables): Be sure to unref pl.
1040 (load_im_info): Call check_description.
1042 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
1044 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
1045 and bind_textdomain_codeset.
1047 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
1049 2006-09-15 Kenichi Handa <handa@m17n.org>
1051 * input.c (reload_im_info): Update custom and global info.
1052 (init_ic_info): Fix previous change.
1054 2006-09-14 Kenichi Handa <handa@m17n.org>
1056 * database.c: Include <libgen.h>.
1057 (mdatabase__lock): Make a directory if necessary.
1059 * input.c (resolve_command): Adjusted for the format change of
1060 configured_cmds member.
1061 (load_commands, load_variables): Fix for errornous data handling.
1062 (config_command, config_variable): New function.
1063 (config_all_commands, config_all_variables): Renamed from
1064 config_commands and config_variables. Utilize the above function.
1065 (check_variable_value): Argument changed. Callers changed.
1066 (load_im_info): Call config_all_commands and config_all_variables.
1067 (init_ic_info): Adjusted for the format change of configured_vars
1069 (minput__init): Initialize Mcustomized, Mconfigured, and
1071 (Mcustomized, Mconfigured, Minherited): New variables.
1072 (minput_get_command): Be sure to return NULL if an input method
1073 use no local command.
1074 (minput_get_variable): Be sure to return NULL if an input method
1075 use no local variable.
1076 (minput_config_command, minput_config_variable)
1077 (minput_save_config): Adjusted for the format change of
1078 configured_cmds and configured_vars members.
1080 * plist.c (write_element): Delete superfluous ':'.
1082 2006-09-13 Kenichi Handa <handa@m17n.org>
1084 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
1085 (minput_config_file): Extern it.
1087 * draw.c (Minherited): Declaration moved to input.c.
1088 (mdraw__init): Don't initialize Minherited here.
1090 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
1092 2006-09-07 Kenichi Handa <handa@m17n.org>
1094 * textprop.c (mtext_serialize): Call mplist__serialize with the
1097 * plist.h (mplist__serialize): Prototype adjusted.
1098 (mplist__assq): Extern it.
1100 * plist.c: Include <ctype.h>
1101 (PUTC, PUTS): New macros.
1102 (write_symbol): New function.
1103 (write_element): New arg indent.
1104 (dump_string, dump_plist_element): Delete them.
1105 (mplist__from_string): New arg pretty.
1106 (mplist__assq): New function.
1107 (mdebug_dump_plist): Use write_element.
1109 * mtext.c (mtext_cat_char): Allocate more memory.
1110 (mdebug_dump_mtext): Don't escal a newline character.
1112 * m17n.h (minput_get_command, minput_get_variable)
1113 (minput_config_command, minput_config_variable)
1114 (minput_save_config): Extern them.
1116 * m17n-core.c: Include <string.h>.
1117 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
1118 use the stream stdout instead of a file of that name.
1120 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
1123 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
1124 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1125 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
1126 (MDEBUG_DUMP): Flush the stream.
1128 * input.h (struct _MInputMethodInfo): Delete member im. New
1129 members mdb, language, name, extra, cmds, configured_cmds,
1130 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
1131 (MInputContextInfo): New member tick.
1133 * input.c: Big change to improve user-side input method
1134 customization. Here, list just public API changes.
1135 (minput_get_commands, minput_get_variables)
1136 (minput_assign_command_keys, minput_set_variable): Label them
1138 (minput_get_command, minput_get_variable)
1139 (minput_config_command, minput_config_variable)
1140 (minput_save_config): New functions.
1142 * database.h (PATH_MAX): Define it if not yet defined.
1143 (PATH_SEPARATOR): Likewise.
1144 (enum MDatabaseStatus): New enum.
1145 (struct MDatabaseInfo): Moved from database.c. New members status,
1146 time, lock_file, and uniq_file.
1147 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
1148 (mdatabase__unlock): Extern them.
1150 * database.c: Include <time.h>.
1151 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
1152 (GEN_PATH): Args changed. Callers changed.
1153 (struct MDatabaseInfo): Moved to database.h.
1154 (struct MDatabase, mdb_list): Deleted.
1155 (mdatabase__list): New var.
1156 (get_database_filename): Deleted. Callers changed to use
1158 (find_file, get_database_file): New files.
1159 (get_dir_info): Initialize new members of MDatabaseInfo.
1160 (find_database): Arg chagnded. Callers changed.
1161 (free_db_info, register_database, register_databases_in_files):
1163 (update_database_list): Deleted.
1164 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
1165 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
1166 (mdatabase__update): New function.
1167 (mdatabase__check): Return value changed.
1168 (mdatabase__file, mdatabase__lock, mdatabase__save)
1169 (mdatabase__unlock): New functions.
1171 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
1173 * input.c (get_surrounding_text): Return -2 when surrounding text
1175 (get_following_char): Likewise.
1176 (get_preceding_char): Likewise.
1177 (minput__callback): Return 0 if there is a callback function,
1180 2006-08-17 Kenichi Handa <handa@m17n.org>
1182 * input.c (reset_ic): Use shift_state to setup the current state.
1184 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
1186 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
1187 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
1188 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
1190 2006-08-02 Kenichi Handa <handa@m17n.org>
1192 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
1194 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
1196 * font-ft.c (ft_encapsulate): Add code for debugging.
1197 (mfont__ft_drive_otf): Be sure to encode character before getting
1200 2006-07-21 Kenichi Handa <handa@m17n.org>
1202 * draw.c (mdraw_text_extents): Fix previous typo.
1204 2006-07-19 Kenichi Handa <handa@m17n.org>
1206 * draw.c (gstring_width): New arg lbearing.
1207 (render_glyph_string): Adjusted for the change of gstring_width.
1208 (mdraw_text_extents): Fix lbearing of ink and line metrics.
1210 * m17n-core.h (Mlanguage): Extern it.
1212 * m17n.h (Mlanguage): Extern deleted.
1214 * mtext.c (mtext__init): Initialize Mlanguage.
1215 (Mlanguage): Declaration moved from locale.c
1217 * locale.c (mlocale__init): Don't initialize Mlanguage here.
1218 (Mlanguage): Declaration moved to mtext.c.
1220 * language.c (mlang__init): Don't initialize Mlanguage here.
1222 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
1224 2006-07-14 Kenichi Handa <handa@m17n.org>
1226 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
1227 (MRealizedFontFT): New member face_encapsulated.
1228 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
1229 (ft_gen_font): New function.
1230 (ft_add_font): Use ft_gen_font.
1231 (ft_list_script): Store lists in ft_script_list.
1232 (ft_check_otf): New arg ft_face. Caller changed.
1233 (ft_check_language): Likewise.
1234 (ft_check_script): Likewise.
1235 (ft_encapsulate, ft_close): New functions.
1236 (mfont__ft_driver): Initialize members encapsulate and close.
1237 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
1239 * font.h (struct MRealizedFont): New member encapsulating.
1240 (struct MFontDriver): New members encapsulate and close.
1242 * font.c (mfont__match_p): If FONT is realized, check capability
1243 by font drivers's check_capability method.
1244 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
1247 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
1248 declarations of foundry and fam local vars.
1249 (xft_driver): Make it static.
1251 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
1252 (mfont_close): Extern them.
1254 * m17n-gd.c (device_open): Don't specify foundry and family of the
1257 2006-07-11 Kenichi Handa <handa@m17n.org>
1259 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
1261 2006-07-13 Kenichi Handa <handa@m17n.org>
1263 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
1265 (ft_check_script): Delete unused var.
1266 (ft_list_capability): Likewise.
1268 * font.c (mfont__get_capability): Setup cap->otf.
1269 (Motf): Make it global.
1270 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
1272 * font.h (MFontCapability): New member otf.
1274 * language.c (mlang__fini): Delete unused vars.
1276 * m17n-gui.h (Motf): Extern it.
1278 * database.c (update_database_list): Delete unused vars.
1280 2006-07-07 Kenichi Handa <handa@m17n.org>
1282 * font-ft.c (DEVICE_DELTA): Fix typo.
1284 2006-07-06 Kenichi Handa <handa@m17n.org>
1286 * fontset.c (mfont__lookup_fontset): Don't ignore family and
1289 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1291 * database.c: Update comments.
1293 2006-07-05 Kenichi Handa <handa@m17n.org>
1295 * database.c (PATH_MAX): Define it if not yet defined.
1296 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
1298 (get_database_filename): Use GEN_PATH.
1299 (get_dir_info): Don't include the last '/' in directory name.
1300 (register_database): New function.
1301 (update_database_list): Use register_database. Search all
1302 directories in mdatabase__dir_list for wildcard databases.
1303 (mdatabase__init): Check "~/.m17n.d".
1305 2006-07-03 Kenichi Handa <handa@m17n.org>
1307 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
1308 push reverse property.
1310 * plist.c (dump_plist_element): Fix previous change.
1312 2006-06-28 Kenichi Handa <handa@m17n.org>
1314 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
1317 * draw.c (MbidiNSM): New variable.
1318 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
1319 attention to bidi type NSM.
1320 (mdraw__init): Initialize MbibiNSM.
1322 * language.c (mscript__char_list): Fix finding a char-list element.
1324 * plist.c (dump_string): Return number of printed characters.
1325 (dump_plist_element): Print elements more compactly.
1327 2006-06-23 Kenichi Handa <handa@m17n.org>
1329 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
1330 (include_HEADERS): Likewise.
1332 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
1334 * language.c: Update documentation.
1336 2006-06-23 Kenichi Handa <handa@m17n.org>
1338 * font-ft.c (struct MFontFT): Delete member lang.
1339 (free_ft_info): Don't unref member lang. Destroy members langset
1341 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
1342 changed. Set members langset and charset.
1343 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
1345 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
1347 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
1348 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
1349 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
1350 characters at first. If it fails, try listing by language names.
1351 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
1352 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
1353 change of MFontCapability.
1354 (ft_list_capability): Likewise. Try listing by languages, then by
1355 scripts. Check OTF at last.
1356 (ft_check_script): New function.
1357 (ft_select): Adjusted for the check of MFontCapability.
1358 (ft_list_family_names): New function.
1359 (ft_check_capability): If cap->script is not Mnil, call
1361 (mfont__ft_driver): Initialize with ft_list_family_names.
1363 * font.h (struct MFontDriver): New member list_fmaily_names.
1364 (struct): Change member "MSymbol *lang" to "MSymbol language".
1366 * font.c: Include "language.h".
1367 (Motf): New variable.
1368 (otf_script_list, load_otf_script_list): Delete it.
1369 (find_script_from_otf_tag): Delete it.
1370 (merge_capability): New function.
1371 (mfont__init): Init Motf.
1372 (mfont__fini): Don't unref otf_script_list.
1373 (free_font_capability): Check cap->script_tag to determine if
1374 OTF-related capability is set.
1375 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
1376 the change of type MFontCapability.
1377 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
1378 and Motf properties.
1379 (mfont_list): Call merge_capability for LANGUAGE arg.
1380 (mfont_list_family_names): New function.
1382 * input-gui.c: Typo in comments fixed.
1384 * input.c: Typo in comments fixed.
1386 * language.h (mlanguage__list): Delete it.
1387 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
1390 * language.c: Include "mtext.h".
1391 (M_script_lang_list): Delete it.
1392 (language_list, script_list): New variables.
1393 (load_lang_script_list, init_language_list, init_script_list): New
1395 (mlang__init): Don't load language database here.
1396 (mlang__fini): Unref language_list and script_list if not NULL.
1397 (mlanguage__list): Delete it.
1398 (mlanguage__info, mscript__info, mscript__char_list)
1399 (mscript__otf_tag, mscript__from_otf_tag): New functions.
1400 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
1401 (mscript_list, mscript_language_list): New functions.
1403 * m17n-gui.h (mfont_list_family_names): Extern it.
1405 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
1406 (mlanguage_text, mscript_list, mscript_language_list): Extern
1409 2006-06-21 Kenichi Handa <handa@m17n.org>
1411 * m17n-X.c (xfont_driver): Initialize with
1412 xfont_list_family_names.
1413 (xfont_list_family_names): New function.
1414 (xft_driver): Initialize with NULL for list_family_names member.
1415 (device_init): Set list_family_names member of xft_driver to that
1416 of mfont__ft_driver.
1418 2006-06-06 Kenichi Handa <handa@m17n.org>
1420 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
1422 2006-03-24 Kenichi Handa <handa@m17n.org>
1424 * font-ft.c (ft_open): Improve debug message.
1426 * fontset.c (mfontset__get_font): Fix for the case that no font in
1427 per_script list is available.
1429 2006-02-06 Kenichi Handa <handa@m17n.org>
1431 * Version 1.3.3 released.
1433 2006-02-22 Kenichi Handa <handa@m17n.org>
1435 * textprop.c: Fix some typos in documentation.
1437 * plist.c: Fix some typos in documentation.
1439 * m17n-core.h: Fix some typos in documentation.
1440 (M17NLIB_PATCH_LEVEL): Updated to 3.
1441 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
1443 * symbol.c: Fix some typos in documentation.
1445 * mtext.c: Fix some typos in documentation.
1447 * input.c: Fix several typos in documentation.
1449 2006-02-06 Kenichi Handa <handa@m17n.org>
1451 * Version 1.3.2 released.
1453 2006-02-03 Kenichi Handa <handa@m17n.org>
1455 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
1456 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
1458 * font.c (xlfd_parse_name): Fix handling of the name "nil".
1460 * draw.c (layout_glyphs): Fix handling left_padding of
1463 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
1465 2006-02-02 Kenichi Handa <handa@m17n.org>
1467 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
1468 if WITH_GUI is true.
1470 2006-01-25 Kenichi Handa <handa@m17n.org>
1472 * input.c (resolve_expression): If the value of PLIST is a plist,
1473 but the first element is not symbol, return 0.
1475 2006-01-17 Kenichi Handa <handa@m17n.org>
1477 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
1478 HAVE_GD is 2 or the greater.
1480 2006-01-16 Kenichi Handa <handa@m17n.org>
1482 * Version 1.3.1 released.
1484 2006-01-16 Kenichi Handa <handa@m17n.org>
1486 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
1487 simulating anti-aliasing.
1489 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
1490 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
1492 2006-01-12 Kenichi Handa <handa@m17n.org>
1494 * input.c (get_surrounding_text): Always pop ic->plist.
1495 (reset_ic): Don't reset ic->plist.
1497 2006-01-10 Kenichi Handa <handa@m17n.org>
1499 * input.c (preedit_commit): For debugging, print only commiting
1500 charactes. Don't set ic->candidate_show to 0.
1501 (handle_key): Don't run branch-actions just by shifting to the
1503 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
1504 Reset vars and plist.
1506 2006-01-07 Kenichi Handa <handa@m17n.org>
1508 * input.c (load_branch): Confirm that maps is not NULL.
1510 2006-01-05 Kenichi Handa <handa@m17n.org>
1512 * input-gui.c (win_filter): Try to convert arg to key only when
1515 * plist.c (read_integer_element): If '#' and '-' are followed by
1516 non-integer-constituent, read them as a part of a symbol.
1517 (read_symbol_element): New arg C.
1518 (read_element): Adjust args to read_symbol_element.
1520 * input.c (load_macros): On overwriting a macro, free the old
1522 (minput__init): Store Mmap in load_im_info_keys.
1523 (minput_get_title_icon): If the input method has no title, be sure
1525 (minput_get_description): If the input method has no description,
1526 be sure to return NULL.
1527 (minput_get_variables): Fix documentation.
1528 (handle_key): Pay attention to the case that key is Mnil.
1529 (filter): Likewise. Fix handling of such symbol as S-A.
1531 2005-12-22 Kenichi Handa <handa@m17n.org>
1533 * Version 1.3.0 released.
1535 2005-12-22 Kenichi Handa <handa@m17n.org>
1537 * font-ft.c (ft_list): If the specified font has no property,
1540 2005-12-20 Kenichi Handa <handa@m17n.org>
1542 * character.c (mchar_get_prop): Check char_prop_list.
1543 (mchar_put_prop, mchar_get_prop_table): Likewise.
1545 2005-12-18 Kenichi Handa <handa@m17n.org>
1547 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
1548 file name sans language.
1550 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
1552 * input.c: Fix typo in comments.
1554 2005-12-14 Kenichi Handa <handa@m17n.org>
1556 * input.c (minput_get_title_icon): Check the default icon for the
1559 2005-12-13 Kenichi Handa <handa@m17n.org>
1561 * input.c (Mless_equal, Mgreater_equal): New variables.
1562 (parse_expression, resolve_expression, parse_action_list)
1563 (take_action_list): Handle the aboves.
1564 (filter): Treat key S-X as X.
1565 (minput__init): Initialize Mless_equal and Mgreater_equal.
1566 (minput_get_title_icon): New function.
1568 * m17n.h (minput_get_title_icon): Extern it.
1570 * database.c (get_database_filename): Return a filename instead of
1572 (load_database): Adjusted for the above change.
1573 (mdatabase__load_for_keys): Likewise.
1574 (mdatabase__find_file): New function.
1576 * database.h (mdatabase__find_file): Extern it.
1578 * font.h (mfont__resize): Delete extern.
1580 * font.c (mfont__list): Check resize ratio.
1581 (mfont__resize): Delete it.
1582 (mfont_resize_ratio): Include the code of mfont__resize.
1584 * font-ft.c (ft_open): Check resize ratio.
1586 * m17n-X.c (xfont_open): Check resize ratio.
1587 (xft_open): Likewise.
1589 2005-12-07 Kenichi Handa <handa@m17n.org>
1591 * input.c (take_action_list): If take_action_list return -1,
1593 (handle_key): Likewise.
1595 * face.c (mface__for_chars): When font is specified and layouter
1596 is found for it, if the layouter doesn't support one of a
1597 character, use a face sans layouter for it.
1599 2005-12-06 Kenichi Handa <handa@m17n.org>
1601 * fontset.c (mfont__lookup_fontset): If only a fallback font is
1602 found, don't use it for more than one character.
1604 2005-12-05 Kenichi Handa <handa@m17n.org>
1606 * face.c (mface__realize): Set rfont->layouter to Mnil.
1607 (mface__for_chars): Fix handling of layouter.
1609 * character.h (mchar__define_prop): Extern it.
1611 * database.c (update_database_list): Call mchar__define_prop if
1614 * character.c (mchar__init): Don't call mchar_define_property.
1615 Instead just initialize property keys.
1616 (mchar__fini): Free char_prop_list only if it's not NULL.
1617 (mchar__define_prop): New function.
1618 (mchar_define_property): Call mchar__define_prop.
1620 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
1623 2005-12-02 Kenichi Handa <handa@m17n.org>
1625 * language.c (mlang__init): Handle extra chars.
1627 * m17n-gui.h (mfont_check): Adjust prototype.
1629 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
1630 (xfont_check_capability): New function.
1631 (xft_driver): Specify xft_check_capability.
1632 (xft_check_capability): New function.
1634 * font-ft.c (M0_3): Delete it.
1636 (ft_get_charmaps): Refer to M0.
1637 (fc_parse_pattern): Fix previous change.
1638 (ft_list_language): Check also extra chars.
1639 (ft_check_otf): Define it even if HAVE_OTF is undef.
1640 (ft_check_lang): Check the result of FcLangSetHasLang against
1641 FcLangDifferentLang. Check also extra chars.
1642 (ft_list_capability): Delete ifdef HAVE_OTF.
1643 (ft_select): Likewise.
1644 (ft_open): Improve debug information.
1645 (ft_check_capability): New function.
1646 (mfont__ft_driver): Specify ft_check_capability.
1647 (mfont__ft_init): Initialize M0.
1649 * fontset.c (get_font_from_group): New function.
1650 (mfontset__get_font): New function.
1652 * fontset.h (mfontset__get_font): Extern it.
1654 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
1655 (mfont__fini): Delete ifdef HAVE_OTF.
1656 (free_font_capability): Likewise.
1657 (mfont__get_capability): Likewise.
1658 (mfont__check_capability): New function.
1659 (mfont_check): Change the order of arguments. Use
1662 * font.h (struct MFontDriver): New member check_capability.
1663 (MFontCapability): Delete ifdef HAVE_OTF.
1664 (mfont__check_capability): Extern it.
1666 * face.c (mface__realize): Fix handling of FONT arg.
1667 (mface__for_chars): Fix handling of explicitly specified font.
1669 2005-11-25 Kenichi Handa <handa@m17n.org>
1671 * font-flt.c (run_command): Print debug info for
1674 * draw.c (layout_glyphs): Fix handling of left/right_padding.
1676 * face.c (mface__for_chars): Check rfont before accessing the
1679 2005-11-21 Kenichi Handa <handa@m17n.org>
1681 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
1684 * fontset.c (fontset_table): New variable.
1685 (free_fontset): Call M17N_OBJECT_UNREGISTER.
1686 (mfont__fontset_init): Add fontset_table as an object array.
1687 (mfont__realize_fontset): Ref FONTSET.
1688 (mfont__free_realized_fontset): Unref REALIZED->fontset.
1689 (mfontset): Call M17N_OBJECT_REGISTER.
1690 (mfontset_copy): Likewise.
1692 * input.c (handle_key): For debugging, print information about
1694 (filter): Add an alias for Meta and Alt modifiers.
1695 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
1697 (minput__init): Initialize them.
1698 (parse_expression): New function.
1699 (resolve_expression): New function.
1700 (parse_action_list): Handle expressions by parse_expression.
1701 (take_action_list): Handle expressions by resolve_expression.
1702 (parse_nested_list_value): Fix previous change.
1703 (resolve_command): Fix handling of the return value of
1706 2005-11-18 Kenichi Handa <handa@m17n.org>
1708 * font-ft.c (ft_check_otf, otf_script_list): Define only when
1709 HAVE_OTF is defined.
1710 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
1712 (ft_select): Likewise.
1714 * font.c (mfont_list): Fix for the case that FONT is NULL.
1715 (OTF_tag): Delete it.
1716 (load_otf_script_list): Define only when HAVE_OTF is defined.
1717 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
1720 * draw.c (truncate_gstring): Be sure to truncate at
1721 glapheme-cluster boundary.
1723 2005-11-11 Kenichi Handa <handa@m17n.org>
1725 * input.c (delete_surrounding_text): Clear cache if necessary.
1727 2005-11-09 Kenichi Handa <handa@m17n.org>
1729 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
1730 glyph prev is also supported by the current flt.
1732 2005-11-08 Kenichi Handa <handa@m17n.org>
1734 * m17n-X.c (xft_render): Cancel previous change.
1736 2005-11-07 Kenichi Handa <handa@m17n.org>
1738 * input.c: Include <stdlib.h>.
1739 (get_surrounding_text, delete_surrounding_text)
1740 (get_preceding_char, get_following_char): New functions.
1741 (integer_value): New arg surrounding. If it is nonzero, try to
1742 get a surrounding character. Callers changed.
1743 (take_action_list): Check `value' before setting an element.
1744 (destroy_ic): Unref ic_info->preceding_text and
1745 ic_info->following_text.
1746 (minput__init): Initialize Minput_get_surrounding_text and
1747 Minput_delete_surrounding_text.
1748 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
1750 (filter): Unref ic_info->preceding_text and
1751 ic_info->following_text.
1753 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
1756 * input.h (MInputContextInfo): New members preceding_text and
1759 2005-11-04 Kenichi Handa <handa@m17n.org>
1761 * input.c (parse_nested_list_value): Fix handling of the global
1763 (get_nested_list): Get global definitions by load_partial_im_info.
1764 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
1765 MInputCandidatesChanged.
1766 (take_action_list): Likewise.
1767 (reset_ic): Likewise.
1768 (create_ic): Don't pay special attention to
1769 Mcandidates_group_size.
1770 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
1771 (minput_set_variable): Get a definition of varible by
1772 mplist_find_by_value, not mplist_get.
1774 * m17n.h (enum MInputCandidatesChanged): New enum.
1776 2005-11-01 Kenichi Handa <handa@m17n.org>
1778 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
1780 (mwin__destroy_window): If xft_draw's drawable is win, change it
1781 to device->drawable before destroying win.
1783 2005-10-31 Kenichi Handa <handa@m17n.org>
1785 * input.c (load_im_info): Fix adding of state.
1787 * m17n-core.c (m17n_fini_core): Fix reporting of module
1790 * m17n.c (m17n_fini): Fix reporting of module finalization.
1792 * m17n-gui.c (m17n_init_win): Fix reporting of module
1795 2005-10-29 Kenichi Handa <handa@m17n.org>
1797 * input.c (get_candidate_list): Fix the timing of referring plist.
1799 2005-10-28 Kenichi Handa <handa@m17n.org>
1801 * input.c (load_branch): Ignore an undefined map name.
1802 (load_im_info): Set im_info->title from `name' only if it's not
1804 (shift_state): Always update ic->status.
1805 (adjust_candidates): Renamed from adjust_candidate_command.
1806 Argument changed. Caller changed.
1807 (get_candidate_list, regularize_action): New functions.
1808 (take_action_list): Use them. On handling Munhandle, don't set
1810 (handle_key): If KEY is not handled by MAP, and MAP has
1811 branch_actions, perform them.
1813 * database.c (mdatabase__fini): Free dir_info->filename;
1815 2005-10-20 Kenichi Handa <handa@m17n.org>
1817 * input.c (marker_code): Accept '@@'.
1818 (integer_value): Handle '@@'.
1819 (parse_action_list): Accept a symbol argument.
1820 (take_action_list): Resolve the symbol argument. Handle the
1823 2005-10-18 Kenichi Handa <handa@m17n.org>
1825 * input.c: Include "charset.h".
1826 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
1828 (MIMState): New member (M17NObject control).
1829 (lookup_nested_list, set_nested_list, parse_nested_list_value)
1830 (get_nested_list, resolve_variable): New functions.
1831 (integer_value): New arg (MPlist **value). Set it to the plist
1832 element containing the value.
1833 (resolve_command): New function.
1834 (load_translation): New arg (MPlist *map_actions).
1835 (load_branch): New args language and name. If `keylist' is a
1836 symbol, resolved that as a command name.
1837 (free_map): New arg top. Free map->map_actions only if top is
1839 (free_state): New function.
1840 (load_state): New arg name.
1841 (im_info_list): New variable.
1842 (free_im_info, get_im_info_by_tags): New functions.
1843 (load_im_info): Arg key changed to plist. Handle `include'.
1844 Return (MInputMethodInfo *).
1845 (preedit_commit): Ref ic->candidate_list.
1846 (get_select_charset, adjust_candidate_command): New functions.
1847 (take_action_list): Handle `include'. Adjust candidate action
1848 properly. Handle control variables `candidates-charset' and
1849 `candidates-group-size'.
1850 (open_im): Use get_im_info.
1851 (create_ic): Get global variables.
1852 (load_partial_im_info): New function.
1853 (get_im_info): New function.
1854 (check_command_keyseq, check_command_list, check_variable_list):
1856 (minput__init): Don't handle M_database_hook and Mdetail_text.
1857 Initialize M_candidates, Mcandidates_group_size,
1858 Mcandidates_charset.
1859 (parse_variable_list, get_variable_list, parse_command_list)
1860 (get_command_list): Delete them.
1861 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
1862 (minput__fini): Simply unref command_list and variable_list.
1863 (minput_get_description): Adjusted for the new form of description.
1864 (minput_get_commands): Use get_nested_list.
1865 (minput_assign_command_keys): Likewise.
1866 (minput_get_variables, minput_set_variable): Likewise.
1868 * input.h (MInputMethodInfo): New members im and maps.
1870 * database.h (M_database_hook): Delete extern.
1871 (MDatabaseHookFunc): Delete extern.
1872 (mdatabase__check): Extern it.
1874 * database.c: Include <glob.h>.
1875 (MAX_TIME): New macro.
1876 (Masterisk): New variable.
1877 (get_database_stream): Argument changed to (MDatabaseInfo *).
1879 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
1880 (find_database): New function.
1881 (update_database_list): New function.
1882 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
1883 calling update_database_list.
1884 (mdatabase__check): New function.
1885 (mdatabase_find): Use update_database and find_database. Don't
1886 handle MDatabaseHookFunc.
1887 (mdatabase_list): Call update_database at first.
1888 (mdatabase_define): Adjusted for the change of mdb->extra_info.
1889 (MDatabaseList): New type.
1891 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
1893 * m17n.h (Mdetail_text): Delete extern.
1895 * m17n-core.h (mplist_conc): Delete extern.
1897 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
1899 (mplist_conc): Renamed to mplist__conc.
1900 (mplist__pop_unref): New function.
1902 2005-10-14 Kenichi Handa <handa@m17n.org>
1904 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
1906 (read_element): If keys is an empty plist, return any element
1908 (dump_plist_element): Check if plist is nested.
1909 (mplist_conc): Always ref tail.
1910 (mplist_set): If key is a managing key, ref val in advance.
1912 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
1913 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
1914 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
1917 * fontset.c (free_fontset): Unref fontset_list if necessary.
1918 (mfont__fontset_fini): Don't free fontset_list. Unref
1920 (mfont__realize_fontset): Initialize request.
1921 (mfontset): Ref default_fontset or fontset only if necessary.
1922 (mfontset_copy): Don't ref copy.
1924 * draw.c (render_glyphs): Check gend->type before checking
1927 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
1928 unrefed plists to NULL.
1930 2005-10-04 Kenichi Handa <handa@m17n.org>
1932 * textprop.c (mtext_serialize): Be sure to make mt
1933 MTEXT_FORMAT_UTF_8 and NULL terminated.
1935 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
1937 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
1939 2005-10-03 Kenichi Handa <handa@m17n.org>
1941 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
1942 is not at the beginning of line.
1944 2005-09-22 Kenichi Handa <handa@m17n.org>
1946 * input.c: Include <sys/stat.h> and <unistd.h>.
1947 (Minclude, Mcommit, Munhandle): New variables.
1948 (minput__init): Initialize them. Push only Mstate to
1949 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
1950 (parse_action_list): Allow integer arg for undo. Handle Mcommit
1952 (load_input_method): Handle "include" directive. If no states are
1954 (shift_state): If state_name is Mt, shift back to the previous
1955 state. Call preedit_commit to commit preedit text.
1956 (preedit_commit): New function.
1957 (take_action_list): Improve debug printing. Handle commit and
1959 (handle_key): Check the return value of take_action_list. Don't
1960 take branch_actions just after changing to the root map.
1961 (reset_ic): Reset all ic_info members.
1962 (filter): When a key is not handled, just move ic_info->keys
1963 instead fo calling reset_ic.
1964 (load_im_info): If key is not Mstate, push Mmap to
1966 (MDatabaseStatList): New type.
1967 (imdir_stat_list): New variable.
1968 (input_method_hook): Don't cancel the hook. Check the
1969 modification time of directories.
1970 (minput__fini): Free imdir_stat_list;
1972 * input.h (MInputContextInfo): New member prev_state.
1974 * m17n-core.h (mplist_conc): Extern it.
1976 * plist.c (mplist_conc): New function.
1978 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
1980 * font.h (MRealizedFont): New member average_width.
1982 * font-ft.c (ft_open): Set rface->average_width.
1984 * font.c (xlfd_unparse_name): Print '*' before registry name.
1986 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
1987 (xfont_open): Set rfont->average_width.
1988 (xft_open): Likewise.
1989 (device_open): Initialize disp_info->AVERAGE_WIDTH.
1991 * internal-gui.h (struct MFrame): New member average_width.
1993 * m17n-gui.c (mframe): Fix setting of frame->rfont.
1994 (mframe_get_prop): Return the average_width of a font.
1996 * face.c (mface__realize): Set rface->average_width.
1997 (mface__update_frame_face): Set frame->average_width.
1999 * face.h (MRealizedFace): New member average_width.
2001 2005-09-19 Kenichi Handa <handa@m17n.org>
2003 * font.c (xlfd_unparse_name): New arg full_xlfd.
2004 (mfont__encode_char): Use shortcut only for X core fonts.
2005 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
2006 (mfont_put_prop): Handle `language' property.
2007 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
2008 Print file can capability info too.
2010 * m17n-core.c (mdebug__output): New variable.
2011 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
2012 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
2013 (m17n_fini_core): Close mdebug__output if it's not stderr.
2015 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
2016 (xfont_open): Handle baseline_offset.
2017 (xfont_find_metric): Likewise.
2018 (xfont_render): Likewise.
2019 (xft_open): Likewise.
2020 (xft_render): Likewise.
2022 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
2023 (mdebug__output): Extern it.
2024 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
2025 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
2026 (MDEBUG_DUMP): New macro.
2027 (MDEBUG_PRINT_TIME): Print to medebug__output.
2029 * font.h (MRealizedFont): New member baseline_offset.
2031 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
2033 (fc_weight_table): Add FC_WEIGHT_REGULAR.
2034 (ft_list_family): Check alias.
2035 (ft_list_language): If language is "en", don't try to the second
2037 (ft_default_list): New variable.
2038 (ft_list_default): New function.
2039 (ft_select): If family is not specified, try only the default
2040 fonts. Treat the weights normal and medium same.
2041 (ft_open): Fix debug message. If registry is not specified, try
2042 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
2043 (ft_find_metric): Likewise.
2044 (ft_render): Likewise.
2045 (ft_list): Fix debug message. Accept the registring iso8859-1.
2046 If family is not specified, try only the default fonts.
2048 * face.c (mface__realize): Fix logic of opening a font.
2050 2005-09-16 Kenichi Handa <handa@m17n.org>
2052 * face.c (mface__realize):
2054 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
2057 * input.c (shift_state): Fix the condition of taking init actions.
2058 (take_action_list): Fix handling of pushback action.
2059 (handle_key): Don't change key while checking its alias.
2060 (minput__init): Initialize new variables.
2061 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
2064 2005-09-12 Kenichi Handa <handa@m17n.org>
2066 * mtext.c (mtext__uppercase): Add proper open/close parens.
2067 (mtext_titlecase): Add proper casting.
2069 * input.c (parse_action_list): Handle the case that the arg is a
2070 key sequence (MText or MPlist).
2071 (take_action_list): Likewise.
2072 (shift_state): Shorter debug message.
2073 (handle_key): Terminate a debug message by "\n".
2074 (reset_ic): Don't take initial actions here.
2075 (minput_open_im): Print a debug message.
2076 (minput_close_im): Likewise.
2077 (minput_create_ic): Likewise.
2078 (minput_destroy_ic): Likewise.
2080 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
2082 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
2085 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
2086 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
2089 * character.c: Add Japanese documentation for
2090 mchar_get_prop_table ().
2092 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
2094 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
2095 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
2096 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
2098 (init_case_conversion): New function.
2099 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
2100 (uppercase_precheck, lowercase_precheck, final_sigma)
2101 (after_soft_dotted, more_above, before_dot, after_i)
2102 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
2104 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
2106 * plist.c (read_mtext_element): Fix previous change.
2108 2005-09-05 Kenichi Handa <handa@m17n.org>
2110 * plist.c (read_mtext_element): Handle \uXXXX notation.
2112 * internal.h (MTABLE_MALLOC): Don't use a local variable.
2113 (MTABLE_ALLOCA): Change the name of local variable.
2115 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
2116 HAVE_FREETYPE are defined.
2118 * m17n-X.c: Check HAVE_X11.
2120 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
2121 directory listing libraries.
2122 (noinst_PROGRAMS): Define it only in maintainer mode.
2124 2005-09-02 Kenichi Handa <handa@m17n.org>
2126 * m17n-gui.h (mdraw_line_break_option): Extern it.
2128 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
2129 end of the first glyph.
2130 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
2132 (mdraw_line_break_option): New variable.
2133 (mdraw_default_line_break): Use mtext_line_break.
2135 * mtext.h (wordseg_func_table): Don't extern it.
2136 (mtext__wseg_fini): Extern it.
2138 * mtext.c: Don't include word-thai.h.
2139 (wordseg_func_table): Delete this variable.
2140 (mtext__init): Don't initialize above. Don't call
2141 mtext__word_thai_init.
2142 (mtext__fini): Don't free wordseg_func_table. Call
2143 mtext__wseg_fini instead fo mtext__word_thai_fini.
2144 (MTextWordsegFunc): Don't typedef it.
2145 (mtext__word_segment): Moved to mtext-wseg.c.
2147 * m17n-core.h (enum MTextLineBreakOption): New enum.
2148 (mtext_line_break): Extern it.
2150 * mtext-wseg.c: New file.
2152 * mtext-lbrk.c: New file.
2154 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
2155 add mtext-lbrk.c and mtext-wseg.c.
2157 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
2158 the case that head is NULL.
2160 2005-09-01 Kenichi Handa <handa@m17n.org>
2162 * word-thai.c (wordseg_propertize): If the property value is nil,
2163 don't make the property no-merge.
2164 (thai_wordseg): Don't require *from and *to are set a priori. Pay
2165 attention to the case that they are NULL.
2166 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
2169 * character.c (mchar_get_prop_table): New function.
2171 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
2173 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
2174 (mchar_get_prop_table): Extern it.
2176 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
2177 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
2179 * internal.h (enum MTextCoverage): New enum.
2180 (MText): New member coverage.
2182 * mtext.c (FORMAT_COVERAGE): New macro.
2183 (insert): Copy mt2->coverage.
2184 (mtext__from_data): Initialize mt->coverage.
2185 (mtext__adjust_format): Update mt->coverage.
2186 (mtext): Initialize mt->coverage.
2187 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
2188 Update mt->coverage if necessary.
2189 (mtext_duplicate): Copy mt->coverage.
2190 (mtext_insert, mtext_replace): New functions.
2191 (mtext_dup): Use mtext_duplicate.
2192 (mtext__word_segment): Don't set *from and *to if a word
2193 segmentation funcion is not found.
2194 (mtext_ins_char): Fix typo.
2196 2005-08-25 Kenichi Handa <handa@m17n.org>
2198 * font.h (MFont): New member for_full_width.
2200 * font.c (compare_font_score): Prefer a font of not
2203 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
2204 registry charset of a font is one of CJK charsets.
2206 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
2207 supports some of CJK.
2209 2005-08-24 Kenichi Handa <handa@m17n.org>
2211 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
2213 * m17n-gui.c (null_device_open): Check Mresolution param and set
2216 * m17n-gd.c (device_open): Check Mresolution param and set
2219 * m17n-X.c (MWDevice): New member resy.
2220 (xfont_open): Set ascent, descent, and max_advance members of
2222 (xft_open): Likewise.
2223 (device_open): Compare also screen_num to find a device. Set
2224 device->resy and frame->dpi.
2226 * internal-gui.h (MFrame): New member dpi.
2228 * font.h (MRealizedFont): New member max_advance.
2230 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
2231 (mfont__init): Don't initialize Mascent, Mdescent.
2232 (Mascent, Mdescent): Delete these variables.
2233 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
2234 Mfont_descent instead of Mascent and Mdescent.
2235 (mfont_put_prop): Allow negative size.
2236 (mfont_find): Handle the case of spec->size < 0. Fix previous
2238 (mfont_list): Handle the case of spec->size < 0.
2239 (mfont_check): Likewise.
2241 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
2242 (fc_get_pattern): Handle the case of font->size < 0.
2243 (ft_open): Set ascent, descent, and max_advance members of rfont.
2244 (ft_find_metric): Improve rounding.
2245 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
2248 * face.c (mface__realize): Handle the case of font->size < 0.
2250 2005-08-22 Kenichi Handa <handa@m17n.org>
2252 * coding.c (MConverterStatus): Change the member buf to union.
2253 (mconv_buffer_converter): Add const to the arg buf.
2254 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2255 (mconv_decode): Adjusted for the change of MConverterStatus.
2256 (mconv_encode_range): Likewise.
2258 * m17n.h (mconv_buffer_converter): Prototype adjusted.
2259 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2261 2005-08-20 Kenichi Handa <handa@m17n.org>
2263 * m17n-gui.h (mfont_from_name): Prototype adjusted.
2264 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
2266 * m17n-X.c (xfont_open): Set members ascent, descent, and
2267 max_advance of rfont.
2268 (xft_open): Likewise.
2270 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
2272 (mfont__ft_parse_name): Add const to the arg name.
2274 * font.c (xlfd_parse_name): Add const to the arg name. Call
2275 mfont__set_property instead of mfont_set_spec. Set font->spacing.
2276 (xlfd_unparse_name): Handle spacing.
2277 (mfont__init): Initialize new variables.
2278 (mfont__id): Handle spacing.
2279 (mfont__merge): Likewise.
2280 (mfont__set_spec): This function deleted.
2281 (mfont__parse_name_into_font): Add const to the arg name. Fix the
2282 condition of calling mfont__ft_parse_name.
2283 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
2284 (mfont_get_prop): Handle properties spacing, ascent, descent,
2286 (mfont_find): Return a realized font.
2287 (mfont_from_name): Add const to the arg name.
2289 * font.h (enum MFontProperty): New member MFONT_SPACING.
2290 (enum MFontSpacing): New enum.
2291 (MFont): New members spacing and max_advance.
2292 (mfont__ft_parse_name): Prototype adjusted.
2293 (mfont__set_spec): Extern deleted.
2294 (mfont__parse_name_into_font): Prototype adjusted.
2296 2005-08-19 Kenichi Handa <handa@m17n.org>
2298 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
2300 * font.c (mfont_list): If FONT is null, use a temporary font.
2301 (mfont_parse_name): Add const to the arg name.
2303 2005-08-18 Kenichi Handa <handa@m17n.org>
2305 * word-thai.c: Surround code by #ifdef and #endif to escape from
2308 * font-ft.c: Mostly re-written.
2310 * font-flt.c (FontLayoutCmdOTF): This type deleted.
2311 (FontLayoutCmd): Type of the member otf changed..
2312 (load_otf_command): Adjusted for the format change of otf command.
2313 (load_command): Likewise.
2314 (free_flt_command): Unref cmd->body.otf.
2315 (run_otf): Ajusted for the type change of otf_cmd.
2316 (run_command): Ajusted for the type change of otf_cmd. On
2317 debugging, print ctx->combining_code.
2318 (mfont__flt_run): Initialize ctx's members code_offset,
2319 combining_code, and left_padding to 0.
2321 * face.h (struct MRealizedFace): New member font.
2322 (mface__realize): Prototype adjusted.
2324 * face.c (find_realized_face): New arg font.
2325 (find_realized_face): Adjusted for the change of MFont.
2326 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
2327 (mface__fini): Don't call mdebug__report_object.
2328 (mface__realize): New arg font.
2329 (mface__for_chars): Adjusted for the change of mfont__encode_char.
2330 Optimize the latin case.
2331 (mface__free_realized): Free rface->font.
2332 (mface__update_frame_face): Adjusted for the change of mface__realize.
2333 (mface_equal): New function.
2335 * draw.c (Mcommon): New variable.
2336 (visual_order): Args to mfont__encode_char changed.
2337 (compose_glyph_string): Handle Mfont text property.
2338 (layout_glyphs): Adjusted for the change of MFont.
2339 (mdraw__init): Initialize Mcommon.
2340 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
2342 * font.h (enum MFontType): Members completely changed.
2343 (enum MFontProperty): Move MFONT_SIZE to the tail.
2344 (enum MFontSource): New enum.
2345 (struct MFont): New members type, source, sizes, file, capability,
2347 (struct MRealizedFont): Type of member font changed. Members
2348 score, status, and encoding deleted.
2349 (MFontScore): New type.
2350 (MFontList): Member changed.
2351 (struct MFontDriver): New member has_char. Types of members
2353 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2354 (Mapple_roman): Extern them.
2355 (OTF_Tag): Typedefed if not HAVE_OTF.
2356 (enum MFontOpenTypeTable): New enum.
2357 (MFontCapability): New type.
2358 (mfont__ft_drive_otf): Prototype adjusted.
2359 (mfont__score): Extern deleted.
2360 (mfont__merge): Extern it.
2361 (mfont__has_char): Extern it.
2362 (mfont__encode_char): Prototype adjusted.
2363 (mfont__open): Extern it.
2364 (mfont__set_spec): Prototype adjusted.
2365 (mfont__get_capability): Extern it.
2367 * font.c: Include "fontset.h".
2368 (M_font_capability, M_font_list, M_font_list_len): New variables.
2369 (font_score_priority): Change order of initial elements.
2370 (font_score_shift_bits): Fix array size.
2371 (common_weight): Add "thin", "semibold", and "heavy".
2372 (common_stretch): Add "ultracondensed", "extracondensed",
2373 "extraexpanded", and "utltraexpand".
2374 (font_weight_regular, font_weight_normal, font_weight_medium): New
2376 (gen_font_name): This function deleted.
2377 (find_encoding): Set font->encoding.
2378 (OTF_tag): New function.
2379 (otf_script_list): New variable.
2380 (load_otf_script_list): New function.
2381 (find_script_from_otf_tag): New function.
2382 (xlfd_parse_name): Set font->type and font->source.
2383 (mfont__free_realized): Free chains rfonts.
2384 (font_score): Renamed from mfont__score.
2385 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2386 (Mapple_roman): New variables.
2387 (mfont__init): Initilize new variables. Initalize
2388 default_encoding.encoding_name and
2389 default_encoding.encoding_charset to Municode_full and
2390 mcharset__unicode. Use SAFE* macros for allocating filepath
2392 (mfont__fini): Free otf_script_list.
2393 (mfont__id): New function.
2394 (mfont__match_p): Check also capability member of MFont.
2395 (mfont__merge): New funciton.
2396 (mfont__set_spec_from_face): Set type and source members.
2397 (mfont__set_spec_from_plist): Set capability and type members.
2398 (mfont__select): Argument changed.
2399 (mfont__available): New function.
2400 (compare_font_score): New function.
2401 (mfont__list): New function.
2402 (mfont__open): Return a realized font.
2403 (mfont__resize): Adjusted for the change of MFont.
2404 (mfont__has_char): New function.
2405 (mfont__encode_char): Argument changed.
2406 (mfont__set_spec): Argument changed.
2407 (free_font_capability): New function.
2408 (mfont__get_capability): New function.
2409 (MFontfile): New variable.
2410 (mfont_get_prop): Adjusted for the change of MFont.
2411 (mfont_put_prop): Likewise.
2412 (mfont_set_selection_priority): Fix the way of setting
2413 font_score_priority[].
2414 (mfont_find): Use mfont__list instead of mfont__select.
2415 (mfont_resize_ratio): Adjusted for the change of MFont.
2416 (mfont_list): Use mfont__list.
2417 (mfont_check): New function.
2418 (font_score): Make it static.
2420 * fontset.h (mfont__realize_fontset): Prototype adjusted.
2421 (mfont__lookup_fontset): Likewise.
2423 * fontset.c (struct MFontset): Delete member font_spec_list.
2424 (struct MRealizedFontset): Type of member spec changed. New
2426 (load_font_group): Arg spec_list deleted.
2427 (load_fontset_contents): Adjusted for the change of fontset_def.
2428 (free_fontset): Fix the way of freeing fontset elements.
2429 (realize_fontset_elements): Argument changed.
2430 (get_per_script): New function.
2431 (free_realized_fontset_elements): Fix the way of feeing rfontset
2433 (update_fontset_elements): Fix args to realize_fontset_elements.
2434 (mfont__realize_fontset): New arg spec.
2435 (try_font_list): New function.
2436 (try_font_group): New arg request. Use try_font_list.
2437 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
2439 (mfontset): Adjusted for the change of MFontset.
2440 (mfontset_copy): Likewise. Don't share plists.
2441 (mfontset_modify_entry): Adjusted for the change of MFontset.
2442 (mfontset_lookup): Call get_per_script.
2443 (mdebug_dump_fontset): Print also the address of fonts.
2445 * input.c (shift_state): Don't reset ic_info->vars.
2446 (take_action_list): Call MDEBUG_PRINT fore calling
2449 * internal-gui.h (MFontDriver): Don't typedef it here.
2451 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
2452 (MXFont): This type deleted.
2454 (struct _MFontX): New struct.
2455 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
2456 (MDisplayInfo): Member base_font_list deleted.
2457 (DEFAULT_FONT): Definition changed.
2458 (FALLBACK_FONT): This maclr deleted.
2459 (free_display_info): Adjusted for the change of MDisplayInfo.
2460 (free_device): Argument to mfont__free_realized changed.
2461 (xfont_driver): Adjusted for the change of MFontDriver.
2462 (xfont_registry_list): Use MFontX instead of MXFont.
2463 (MRealizedFontX): Renamed from MXFontInfo.
2464 (xfont_select): Return the font found first.
2465 (close_xfont): Change MXFontInfo to MRealizedFontX.
2466 (xfont_open): Return the realized font.
2467 (xfont_find_metric): Get xfont from rfont->fontp.
2468 (xfont_has_char): New function.
2469 (xfont_encode_char): Adjusted for the argument change.
2470 (xfont_render): Get xfont from rfont->fontp.
2471 (xfont_list): Adjusted for the argument change.
2472 (MRealizedFontXft): Renamed from MXftFontInfo.
2473 (xft_driver): Ajusted for the change of MFontDriver.
2474 (close_xft): Change MXtfFontInfo to MRealizedFontXft
2475 (xft_open_font): Argument changed.
2476 (xft_open): Argument changed. Return the realized font.
2477 (xft_find_metric): Get xft_font from rfont->fontp.
2478 (xft_has_char, xft_encode_char): New functions.
2479 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
2480 font if not yet opened.
2481 (device_open): Don't set frame->font.
2483 * m17n-gd.c (gd_font_driver): Adjusted for the change of
2485 (gd_font_open): New function.
2486 (gd_render): Don't use the local variable ft_info.
2487 (device_init): Adjusted for the change of gd_font_driver.
2489 * textprop.c (mtext__prop_init): Initialize text_property_table.
2490 Call M17N_OBJECT_ADD_ARRAY.
2491 (mtext__prop_fini): Don't call mdebug__report_object.
2493 * plist.c (mplist__init): Initialize plist_table.
2494 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
2495 (mplist__fini): Don't call mdebug__report_object.
2497 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
2498 (mtext__fini): Don't call mdebug__report_object.
2499 (MTEXT_FORMAT_UTF_16): Correct type.
2500 (mtext_data): New function.
2501 (mtext_text): Fix calculation of limit and args to
2504 * language.c: Include "plist.h".
2505 (M_script_lang_list): New variable.
2506 (mlang__init): Read languages and their information from m17n
2508 (mlanguage__list): New function.
2509 (Miso639_1, Miso639_2): New variables.
2511 * language.h (mlanguage__list): Extern it.
2513 * database.c (get_database_stream): Use SAFE_* macros for
2514 allocating and freeing path.
2515 (mdatabase__init): Likewise.
2517 * symbol.c (msymbol__fini): Don't free symbols here.
2518 (msymbol__free_table): New function.
2519 (msymbol_is_managing_key): New function.
2521 * symbol.h (msymbol__free_table): Extern it.
2522 (msymbol__list): Extern it.
2524 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
2526 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
2527 (struct _M17NObjectArray): New member name and next.
2528 (mdebug__add_object_array): Extern it.
2529 (M17N_OBJECT_ADD_ARRAY): New macro.
2530 (mdebug__report_object): Don't extern it.
2532 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
2534 * m17n-gui.c (free_frame): Don't free frame->font.
2535 (null_device_fini): Fix code for freeing
2536 null_device.realized_font_list.
2537 (m17n_fini_win): Free interface.
2538 (mframe): Cast the return value of dlsym. Set frame->font here.
2539 (mframe_get_prop): Check frame->rface->rfont before accessing the
2542 * m17n-gui.h (Mfontfile): Extern it.
2543 (mfont_check): Extern it.
2544 (mface_equal): Extern it.
2546 * m17n-core.c: Include "symbol.h".
2547 (report_header_printed): This variable deleted.
2548 (object_array_root): New variable.
2549 (report_object_array): New function.
2550 (mdebug__report_object): This function deleted.
2551 (mdebug__add_object_array): New function.
2552 (m17n_init_core): Call mchartable_init () before mtext_init ().
2553 (m17n_fini_core): Call report_object_array (if necessary) and
2554 msymbol__free_atable at the end.
2556 * m17n-core.h (msymbol_is_managing_key): Extern it.
2557 (mtext_data): Extern it.
2558 (MTEXT_FORMAT_UTF_16): Correct type.
2559 (M17NLIB_MINOR_VERSION): Changed to 3.
2560 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
2562 * chartab.c (mchartable__init): Initalize chartable_table.count.
2563 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
2564 mdebug__report_object.
2566 2005-05-26 Kenichi Handa <handa@m17n.org>
2568 * m17n.h (Miso639_1, Miso639_2): Extern them.
2570 * symbol.h (msymbol__list): Extern it.
2572 * symbol.c (msymbol__list): New function.
2574 2005-05-19 Kenichi Handa <handa@m17n.org>
2576 * input-gui.c (minput__win_init): Don't change the value of
2579 2005-05-16 Kenichi Handa <handa@m17n.org>
2581 * m17n-core.c (m17n_object): Be sure to initialize all members.
2583 * font-ft.c (fc_decode_prop): Fix args to msymbol.
2585 2005-05-09 Kenichi Handa <handa@m17n.org>
2587 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
2589 2005-04-27 Kenichi Handa <handa@m17n.org>
2591 * language.c (mlang__init): Add "an" (Aragonese).
2593 * word-thai.c: Add support for libthai.
2594 (mtext__word_thai_init): Initialize wordseg library conditionaly.
2595 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
2597 * mtext.c: Include "word-thai.h" conditionaly.
2598 (mtext__init): Call mtext__word_thai_init conditionaly.
2599 (mtext__fini): Call mtext__word_thai_fini conditionaly.
2601 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
2602 not WORDCUT_LD_FLAGS.
2604 2005-04-19 Kenichi Handa <handa@m17n.org>
2606 * word-thai.c (wordseg_propertize): Always unref the attached
2608 (thai_wordseg): Don't unref the property.
2610 2005-04-18 Kenichi Handa <handa@m17n.org>
2612 * word-thai.c: Include stdlib.h.
2613 (wordseg_propertize): Add dummy function for the case that wordcut
2614 library doesn't exist.
2615 (wordseg_propertize): Fix for old wordcut library.
2617 2005-04-16 Kenichi Handa <handa@m17n.org>
2619 * word-thai.c: Include <stdio.h>.
2621 2005-04-15 Kenichi Handa <handa@m17n.org>
2623 * draw.c: Include mtext.h.
2624 (linebreak_table, M_break_at_space, M_break_at_word)
2625 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
2626 (compose_glyph_string): Check POS before getting Mface text
2628 (truncate_gstring): Give correct TO arg to line_break function.
2629 (GET_LB_TYPE): New macro.
2630 (find_break_backward, find_break_forward): New functions.
2631 (mdraw__init): Initialize the above new variables.
2632 (mdraw__fini): Free linebreak_table.
2633 (mdraw_default_line_break): Use find_break_backward and
2636 * word-thai.c: New file.
2638 * word-thai.h: New file.
2640 * mtext.c: Include word-thai.h.
2641 (wordseg_func_table): New variable.
2642 (mtext__init): Initialize wordseg_func_table and call
2643 mtext__word_thai_init.
2644 (mtext__fini): Call mtext__word_thai_fini, free
2646 (MTextWordsegFunc): New type.
2647 (mtext__word_segment): New function.
2649 * mtext.h (wordseg_func_table): Extern it.
2650 (mtext__word_segment): Extern it.
2652 * m17n.c (m17n_init): Fix typo (== -> =).
2654 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
2655 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
2657 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
2658 (MTEXTPROP_VAL): New macros.
2660 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
2662 2005-04-07 Kenichi Handa <handa@m17n.org>
2664 * database.c (load_chartable): Fix pursing of symbol name.
2666 2005-03-24 Kenichi Handa <handa@m17n.org>
2668 * m17n.c (m17n_init): Fix typo (== -> =).
2670 2005-03-11 Kenichi Handa <handa@m17n.org>
2672 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
2674 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
2676 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
2679 2005-03-09 handa <handa@m17n.org>
2681 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
2682 calling m17n_init ().
2684 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
2685 calling m17n_init_core ().
2687 2005-02-28 Kenichi Handa <handa@m17n.org>
2689 * font-flt.c (mfont__flt_run): Add resulting code sequence in
2692 2005-02-17 Kenichi Handa <handa@m17n.org>
2694 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
2695 (M_description, M_command, M_variable): New variables.
2696 (load_im_info_keys): New variables.
2697 (load_im_info, check_command_keyseq, get_description_advance)
2698 (parse_command_list, get_command_list, parse_variable_list)
2699 (get_variable_list, input_method_hook): New functions.
2700 (command_list, variable_list): New variables.
2701 (minput__init): Put input_method_hook to Minput_method.
2702 Initialize M_description, M_command, M_variable, Mdetail_text,
2703 load_im_info_keys, command_list, variable_list.
2704 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
2705 (Mdetail_text): New variable.
2706 (minput_get_description, minput_get_commands)
2707 (minput_assign_command_keys, minput_get_variables)
2708 (minput_set_variable): New functions.
2710 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
2711 (minput_assign_command_keys, minput_get_variables)
2712 (minput_set_variable): Extern them.
2714 * plist.c (UNGETC): Just decrement st->p.
2715 (read_mtext_element): New arg skip.
2716 (read_integer_element): Likewise.
2717 (read_symbol_element): Likewise.
2718 (read_element): New arg KEYS.
2719 (mplist__from_plist): Don't increment ref-count of NULL object.
2720 (mplist__from_file): New arg KEYS.
2721 (mplist_put): Don't increment ref-count of NULL object.
2722 (mplist_add): Likewise.
2723 (mplist_push): Likewise.
2724 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
2726 * plist.h (mplist__from_file): Prototype adjusted.
2728 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
2729 (get_database_stream): New function.
2730 (load_database): Use get_database_stream.
2731 (M_database_hook): New variable
2732 (mdatabase__init): Initialize M_database_hook.
2733 (mdatabase__load_for_keys): New function.
2734 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
2736 (mdatabase_define): Free mdb->extra_info if necessary.
2738 * database.h (mdatabase__dir_list, M_database_hook)
2739 (mdatabase__load_for_keys): Extern them.
2740 (MDatabaseHookFunc): New type.
2742 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
2744 2004-12-27 Kenichi Handa <handa@m17n.org>
2746 * Version 1.2.0 released.
2748 2004-12-27 Kenichi Handa <handa@m17n.org>
2750 * input.c (minput_filter): Don't reset ic->xxx_changed.
2752 * mtext.c (mtext_from_data): Fix documentation.
2754 2004-12-25 Kenichi Handa <handa@m17n.org>
2756 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
2757 (M17NLIB_VERSION_NAME): Update to "1.2.".
2759 2004-12-24 Kenichi Handa <handa@m17n.org>
2761 * input.c (reset_ic): Set key_unhandled to 0.
2763 2004-12-21 Kenichi Handa <handa@m17n.org>
2765 * m17n-gui.h (mfont_from_spec): Delete extern.
2767 * input-gui.c (win_callback): Handle Minput_reset.
2768 (minput__win_init): Register reset_ic as a callback for
2771 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
2772 changed. At first, shift to the initial state.
2773 (minput__init): Initialize Minput_reset. Register reset_ic as a
2774 callback for Minput_reset.
2775 (Minput_reset): New variable.
2776 (minput_filter): Always set ic->xxx_changed to 0.
2777 (minput_reset_ic): New function.
2778 (integer_value): Fix typo ('>' -> '<') and calculation of length
2781 * m17n-core.c (merror_code): Change type to `int'.
2783 * m17n-misc.h (merror_code): Adjust type.
2785 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
2787 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
2788 (mtext_change_prop): Delete extern.
2790 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
2791 to `int'. Move the documents to m17n-core.h.
2793 2004-12-13 Kenichi Handa <handa@m17n.org>
2795 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
2796 (MTextProperty): Document it.
2798 2004-12-09 Kenichi Handa <handa@m17n.org>
2800 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
2802 2004-12-03 Kenichi Handa <handa@m17n.org>
2804 * internal.h (m17n__core_initialized, m17n__shell_initialized,
2805 m17n__gui_initialized): New externs.
2807 * m17n-core.h (enum M17NStatus): New enum.
2808 (m17n_status): Extern it.
2810 * m17n-core.c (core_initialized): Delete this variable.
2811 (m17n__core_initialized, m17n__shell_initialized,
2812 m17n__gui_initialized): New variables.
2813 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
2814 instead of core_initialized.
2815 (m17n_status): New function.
2817 * m17n.c (shell_initialized): Delete this variable.
2818 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
2821 * m17n-gui.h (m17n_init_win): Adjust the prototype.
2823 * m17n-gui.c (win_initialized): Delete this variable.
2824 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
2825 instead of gui_initialized.
2827 2004-11-19 Kenichi Handa <handa@m17n.org>
2829 * input.c (reset_ic): Check if ic_info->state is NULL.
2830 (filter): If ic_info->state is NULL, return 0.
2831 (load_input_method): Don't unref `maps' it it's not created.
2833 2004-11-15 Kenichi Handa <handa@m17n.org>
2835 * input.c (find_candidates_group): If INDEX is -1, find the last
2837 (take_action_list): If the previous of the first candidate is
2838 requested, select the last candidate.
2840 2004-11-08 Kenichi Handa <handa@m17n.org>
2842 * m17n-X.c (device_open): Try at most 32 fonts to find a
2843 non-autoscaled font.
2845 * font.c (xlfd_parse_name): Fix previous change.
2847 2004-11-05 Kenichi Handa <handa@m17n.org>
2849 * font.c: (commont_style): Include dummy elements "slanted" and
2850 "rslanted" to prefer "o" to "r" if "i" is requested.
2852 * font-ft.c (ft_to_prop): Fix "oblique" entry.
2854 2004-10-29 Kenichi Handa <handa@m17n.org>
2856 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
2858 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
2859 New members smallest and larger.
2860 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
2861 (xfont_registry_list): Likewise.
2862 (xfont_select): Likewise.
2865 2004-10-28 Kenichi Handa <handa@m17n.org>
2867 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
2868 font name comparison.
2869 (xfont_select): Fix logic for selecting a larger size font.
2871 2004-10-25 Kenichi Handa <handa@m17n.org>
2873 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
2876 2004-10-22 Kenichi Handa <handa@m17n.org>
2878 * input.c (update_candidate): Renamed from udpate_candidate.
2879 (take_action_list): Show more debugging info on arithmetic commands.
2881 * m17n-X.c (device_open): Fix previous change.
2883 * draw.c (compose_glyph_string): Don't get face property at the
2886 2004-10-21 Kenichi Handa <handa@m17n.org>
2888 * draw.c (compose_glyph_string): Fix for the case of category
2891 2004-10-19 Kenichi Handa <handa@m17n.org>
2893 * input.c (mdebug_mask): New variable.
2894 (shift_state): Print debug information.
2895 (take_action_list): Likewise.
2896 (handle_key): Likewise.
2898 2004-10-14 Kenichi Handa <handa@m17n.org>
2900 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
2902 2004-10-13 Kenichi Handa <handa@m17n.org>
2904 * m17n-X.c (device_open): Be sure to register at least one font
2907 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
2908 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
2910 2004-10-12 Kenichi Handa <handa@m17n.org>
2912 * draw.c (alloc_gstring): Fix previous change.
2914 * font-ft.c (ft_list_generic): Fix for the case of not
2917 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
2919 * font.c (mfont_list): If no font is found, return NULL.
2920 (load_font_encoding_table): Put entries of nil registry first.
2921 (find_encoding): Adjust for the above change.
2923 2004-10-11 Kenichi Handa <handa@m17n.org>
2925 * m17n-gui.h (mfont_list): Adjust prototype.
2927 * m17n-X.c (xfont_list): New arg maxnum.
2929 * font.h (struct MFontDriver): Change prototype of <list>.
2931 * font-ft.c (fc_generic_family_list): Delete it.
2932 (Mserif, Msans_serif, Mmonospace): Delete them.
2933 (M_generic_family_info): New variable.
2934 (enum GenericFamilyType): New enum.
2935 (struct GenericFamilyInfo): New struct.
2936 (generic_family_table): New variable.
2937 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
2939 (add_font_info): Get style here.
2940 (ft_list_family): Don't initialize fc_config here. Don't list
2942 (ft_list_generic): New function.
2943 (ft_select): Pay attention to generic familes here.
2944 (ft_open): Fix calculation of ascent and descent.
2945 (ft_list): Pay attention to generic families.
2946 (mfont__ft_init): Initialize M_generic_family_info,
2947 generic_family_table, and fc_config..
2948 (mfont__ft_fini): Finalize generic_family_table.
2950 * draw.c (compose_glyph_string): Use more constant font for
2951 glyphs. Adjust for the member change in MGlyph.
2952 (layout_glyph_string): Adjust for the member change in MGlyph.
2953 (alloc_gstring): Intilize scracth_glyph to avoid
2954 compose_glyph_string on it.
2955 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
2956 (mdraw_coordinates_position): Fix previous change.
2958 * internal-gui.h (glyph_category): New enum.
2959 (MGlyph): Change type of <category> to enum glyph_category.
2961 * face.c (mface__realize): Delete args langauge and charset.
2962 (mface__for_chars): Fix for the case that glyphs have different
2964 (mface__update_frame_face): Adjust for mface__realize change.
2966 * face.h (mface__realize): Adjust prototype.
2968 2004-10-05 Kenichi Handa <handa@m17n.org>
2970 * language.c (mlang__init): Add Akan.
2972 2004-10-04 Kenichi Handa <handa@m17n.org>
2974 * font-ft.c (add_font_info): Add instead of push the element.
2975 (ft_list_family): For generic fonts, try all
2976 substituted. families.
2978 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
2979 (run_rule): Don't update cluster range here.
2980 (run_command): Update cluster range on appending a glyph.
2981 (run_otf): Update cluster range for glyphs generated by OTF.
2983 2004-10-02 Kenichi Handa <handa@m17n.org>
2985 * m17n-X.c (device_open): Handle Mfont key in PLIST.
2987 2004-09-30 Kenichi Handa <handa@m17n.org>
2989 * font-ft.c (ft_select): Ignore family on calling mfont__score.
2991 2004-09-30 Kenichi Handa <handa@m17n.org>
2993 * font.h: Include <fontconfig/fontconfig.h>.
2994 (MFTInfo): New member langset.
2995 (mfont__encoding_list): Extern it.
2997 * font.c (mfont__encoding_list): New function.
2998 (mdebug_dump_font_list): New function.
3000 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
3001 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
3003 (ft_family_list): New variable.
3004 (set_font_info): New arg basep. Callers changed.
3005 (fc_list): Check the return value of FcPatternGetString.
3006 (add_font_info): New arg plist. Callers changed. Update
3008 (ft_list_family): New function (merged fc_list and ft_list_all).
3009 (ft_select): Use ft_list_family.
3010 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
3012 (mfont__ft_init): Initialize above new variables.
3013 (mfont__ft_fini): Free ft_family_list.
3014 (STRDUP_LOWER): New macro.
3015 (set_font_info): Use STRDUP_LOWER.
3016 (ft_list_family): Avoid duplicate addition of font path. Use
3018 (fc_decode_prop): Fix typo.
3020 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
3021 (xfont_registry_list): Change argument disp_info to frame.
3023 (xfont_list_all): New function.
3024 (xfont_list): If FONT is not NULL, check all fonts.
3026 2004-09-28 Kenichi Handa <handa@m17n.org>
3028 * m17n-X.c (MXFont, MXFontList): New types.
3029 (MDisplayInfo): Delete members font_registry_list,
3030 iso8859_1_family_list, iso10646_1_family_list, new members
3031 font_list, base_font_list.
3032 (free_display_info): Adusted for the change of MDisplayInfo.
3033 (xfont_driver): Initialize with xfont_list.
3034 (font_compare): New function.
3035 (build_font_list): Deleted.
3036 (xfont_registry_list): New function.
3037 (xfont_select): Use xfont_registry_list.
3038 (xfont_list): New function.
3039 (device_open): Adusted for the change of MDisplayInfo.
3041 * font-ft.c (add_font_info): New arg languages. Callers changed.
3042 (fc_list): Get languages from fonts..
3043 (ft_list_all): Renamed from ft_list. Callers changed.
3044 (ft_list): New function.
3045 (mfont__ft_driver): Initalize with ft_list.
3047 * font.c (mfont_list): New function.
3049 * font.h (struct MFontDriver): New member `list'.
3050 (MFTInfo): New member languages.
3052 * m17n-gui.h (mfont_list): Extern it.
3054 2004-09-27 Kenichi Handa <handa@m17n.org>
3056 * internal-gui.h (struct MGlyphString): Delete members mt,
3057 sub_width, sub_lbrearing, sub_rbearing, and region.
3059 * draw.c (MSubTextExtents): New type.
3060 (layout_glyphs): New arg extents. Set its members.
3061 (layout_glyph_string): Adjusted for the above change.
3062 (alloc_gstring): Don't set gstring->mt.
3063 (truncate_gstring): Call line_break function with mt instead of
3066 2004-09-22 Kenichi Handa <handa@m17n.org>
3068 * mtext.c (count_utf_16_chars): Count each code of invalid
3071 2004-09-19 Kenichi Handa <handa@m17n.org>
3073 * mtext.c (default_utf_16, default_utf_32): Rename them to
3074 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
3077 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
3080 2004-09-13 Kenichi Handa <handa@m17n.org>
3082 * draw.c (Mlatin): Don't declare it here.
3083 (visual_order): Fix reordering of combining characters.
3084 (compose_glyph_string): Fix detection of script.
3085 (layout_glyphs): Don't fix reordering of combining characters
3087 (layout_glyph_string): Pay attention to
3088 control->disable_overlapping_adjustment.
3089 (truncate_gstring): Include at least on character in a line.
3090 (get_gstring): Always scan one full line.
3091 (mdraw__init): Don't initialize Mlatin here.
3092 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
3093 have a font, use ascent/descent of an ASCII font. Allow
3094 ink_array_return and logical_array_return to be NULL.
3095 (mdraw_coordinates_position): Fix iteration.
3097 * font-ft.c (MFTtoProp): Member completely changed.
3098 (ft_to_prop): Adjusted for the above change.
3099 (ft_to_prop_size): Likewise.
3100 (set_font_info): Adjusted for the change of MFTtoProp.
3101 (fc_generic_family_list): New variable.
3102 (fc_list): Add special handling of generic font names.
3103 (mfont__ft_init): Adjusted for the change of MFTtoProp.
3104 Initialize fc_generic_family_list.
3105 (mfont__ft_fini): Don't free ft_to_prop. Free
3106 fc_generic_family_list.
3107 (FC_vs_M17N_font_prop): New type.
3108 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
3109 (fc_decode_prop, fc_encode_prop): New functions.
3110 (mfont__ft_parse_name): Use fc_decode_prop.
3111 (mfont__ft_unparse_name): Use fc_encode_prop.
3113 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
3114 (MWDevice): Add member realized_font_list.
3115 (free_display_info): Don't free disp_info->realized_font_list.
3116 (free_device): Free device->realized_fontset_list.
3117 (xft_find_metric): Use gstring->frame instead of rfont->frame.
3118 (device_open): Don't initialize disp_info->realized_font_list.
3119 (device_open): Initialize device->realized_font_list and set it to
3120 frame->realized_font_list.
3122 * fontset.c (try_font_group): New function.
3123 (mfont__lookup_fontset): Use try_font_group.
3125 * font.c (common_weight): Change the order of "regular".
3127 * face.c (Mlatin): Don't make it static.
3128 (mface__realize): Be sure to set work_gstring.frame.
3129 (mface__for_chars): Likewise.
3131 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
3134 * internal-gui.h (Mlatin): Extern it.
3136 * m17n-gui.h (MDrawControl): New member
3137 disable_overlapping_adjustment.
3139 2004-09-06 Kenichi Handa <handa@m17n.org>
3141 * font-flt.c (run_otf): Fix typo ('}'->']').
3143 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
3144 (COMBINING_PRECOMPUTED_P): New macros.
3146 * draw.c (layout_glyphs): Handle precomputed combining code.
3148 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
3149 precomupted combining code.
3151 2004-09-03 Kenichi Handa <handa@m17n.org>
3153 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
3156 2004-08-27 Kenichi Handa <handa@m17n.org>
3158 * face.c (mface_put_prop): If the new value is the same as the
3159 current one, don't increment frame->tick.
3161 2004-08-25 Kenichi Handa <handa@m17n.org>
3163 * fontset.c (mfontset): Initialize font_spec_list member.
3164 (mfontset_copy): Load fontset if necessary.
3166 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
3167 'metrics' to for C++.
3169 * draw.c (mdraw_glyph_info): Adjusted for the member name change
3172 2004-08-16 Kenichi Handa <handa@m17n.org>
3174 * Version 1.1.0 released.
3176 2004-08-13 Kenichi Handa <handa@m17n.org>
3178 * language.c (mlang__init): Add Dhivehi.
3180 * m17n-gui.c (Mx, Mfreetype): Delete it.
3181 (m17n_init_win): Don't initialize Mx and Mfreetype here.
3183 * m17n-gui.h (Mfreetype, Mxft): Extern them.
3184 (mfont_resize_ratio): Extern it.
3185 (MDrawGlyphInfo): New member logical_width;
3186 (MDrawGlyph): New type.
3187 (mdraw_glyph_list): Prototype adjusted.
3189 * m17n-X.c (xfont_open): Set type and fontp members.
3190 (xft_open): Likewise.
3192 * internal-gui.h (Mx, Mfreetype): Delete extern.
3194 * font.h (struct MRealizedFont): New member type and fontp.
3196 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
3197 (Mx, Mfreetype): Declare here.
3198 (Mxft): New variable.
3199 (mfont_resize_ratio): New function.
3201 * font-ft.c (ft_open): Set type and fontp members.
3203 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
3206 2004-08-11 Kenichi Handa <handa@m17n.org>
3208 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
3211 2004-08-06 Kenichi Handa <handa@m17n.org>
3213 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
3216 * font-flt.c (run_otf): Print debugging information if necessary.
3218 2004-08-05 Kenichi Handa <handa@m17n.org>
3220 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
3221 positioning_type 5 and 6. Switch simplified.
3223 2004-08-04 Kenichi Handa <handa@m17n.org>
3225 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
3227 2004-08-02 Kenichi Handa <handa@m17n.org>
3229 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
3230 set val to 1 even if it is greater than 1.
3232 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
3234 2004-07-29 Kenichi Handa <handa@m17n.org>
3236 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
3237 debugging information.
3239 * internal.h (MDEBUG_PRINT5): New macro.
3241 * draw.c (layout_glyphs): Don't combine a zero width glyph with
3242 the previous one if the zero width glyph has left or right
3245 2004-07-26 Kenichi Handa <handa@m17n.org>
3247 * m17n-X.c (xft_render): Pay attention to members left_padding and
3248 right_padding of MGlyph.
3250 * draw.c (visual_order): Allocate one more elements for arrays as
3251 a workaround of fribidi bug.
3252 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
3253 instead of MGlyph->bidi_sensitive.
3254 (layout_glyph_string): Pay attentinon to
3255 control->orientation_reversed when padding at the head or tail.
3256 Fix adjustment of space glyph width.
3257 (get_gstring): If cursor_width or cursor_bidi is changed, don't
3260 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
3261 instead of MGlyph->bidi_sensitive.
3263 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
3265 2004-07-26 Kenichi Handa <handa@m17n.org>
3267 * draw.c (visual_order): Don't treat combined glyphs specially.
3268 (layout_glyphs): Don't get metrics glyphs that are already ready.
3269 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
3270 width with the previous one.
3271 (draw_background): Fix bar cursor position on a r2l glyph.
3273 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
3274 (run_rule): Fix place of updating cluster_begin_pos and
3275 cluster_end_pos here.
3276 (run_otf): Don't set left_padding.
3278 * font-ft.c (adjust_anchor): Type of argument `code' changed.
3280 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
3281 Fix handling of GPOS.
3282 (mfont__ft_drive_gpos): Delete this function.
3284 * font.h (mfont__ft_drive_otf): Renamed back from
3285 mfont__ft_drive_gsub.
3286 (mfont__ft_drive_gpos): Delete extern.
3288 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
3289 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
3291 2004-07-23 Kenichi Handa <handa@m17n.org>
3293 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
3294 the same bidi level.
3296 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
3298 2004-07-22 Kenichi Handa <handa@m17n.org>
3300 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
3302 2004-07-20 Kenichi Handa <handa@m17n.org>
3304 * draw.c (render_glyphs): Fix checking of g->code validity.
3306 * face.c (mface__realize): Set g.type.
3308 2004-07-18 Kenichi Handa <handa@m17n.org>
3310 * Makefile.am: Prepend ${top_srcdir} to all *.la in
3313 * m17n-gui.c (mframe): Print error message give by dlopen to
3316 2004-07-16 Kenichi Handa <handa@m17n.org>
3318 * draw.c (compose_glyph_string): Improve the way of deciding a
3319 script. For a character that doesn't have script property, use
3320 the last non-latin script.
3322 * font-ft.c (fc_list): Cancel previous change.
3323 (mfont__ft_init): Add more entries in ft_to_prop_name.
3325 2004-07-15 Kenichi Handa <handa@m17n.org>
3327 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
3328 previous or next character glyphs.
3330 2004-07-14 Kenichi Handa <handa@m17n.org>
3332 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
3333 of type GLYPH_SPACE.
3335 * fontset.c (mfont__lookup_fontset): If glyph type is
3336 GLYPH_SPACE, get codes for SPACE.
3338 * internal-gui.h (Mfont): Delete extern.
3340 * m17n-gui.h (Mfont): Delete duplicated extern.
3342 2004-07-13 Kenichi Handa <handa@m17n.org>
3344 * font-ft.c (DEVICE_DELTA): New macro.
3345 (adjust_anchor): New function.
3346 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
3348 (mfont__ft_drive_gpos): New function.
3350 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
3351 (FontLayoutContext): Delete member `rfont'.
3352 (run_otf): Set g->otf_cmd. Call
3353 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
3354 only whne HAVE_OTF is defined.
3356 * fontset.c: Include "config.h".
3358 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
3359 (MGlyph): New member otf_cmd.
3361 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
3362 (mfont__ft_drive_gpos): Extern it.
3364 * face.c: Include "config.h".
3366 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
3368 * input-gui.c: Include "config.h".
3370 * plist.c: Include "config.h".
3372 2004-07-06 Kenichi Handa <handa@m17n.org>
3374 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
3375 internal-gui.h: Cancel previous changes.
3377 * m17n-gd.h: Delete it.
3379 * Makefile.am (libm17n_core_la_LIBADD): New variable.
3380 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
3381 @XML2_LD_FLAGS@ to above.
3382 (libm17n_la_LIBADD): Add -ldl.
3383 (libm17n_la_LDFLAGS): Add -export-dynamic.
3384 (X_LD_FLAGS): Fix the order of linking.
3385 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
3386 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
3387 (libm17n_X_la_LDFLAGS): Add -module.
3388 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
3389 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3390 (libm17n_gd_la_LDFLAGS): Add -module.
3391 (include_HEADERS): Delete m17n-gd.h.
3393 2004-06-30 Kenichi Handa <handa@m17n.org>
3395 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
3396 (MDeviceLibraryInterface): Delete it.
3397 (register_device_library): Delete it.
3398 (m17n__device_library_list): Renamed from device_library_list.
3400 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
3401 (m17n_init_win): Adjust prototype.
3403 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
3404 (m17n_init_gd): New function.
3406 * m17n-gd.h: New file.
3408 * m17n-X.h: Include <m17n-gui.h>.
3409 (m17n_init_X): Extern it.
3410 (M17N_INIT): Redefine it.
3412 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
3413 (m17n_init_X): New function.
3415 * internal-gui.h (m17n__device_library_list): Extern it.
3416 (struct MDeviceDriver): New members initialized, init, and fini.
3418 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
3420 (libm17n_X_la_LIBADD): Delete aboves.
3421 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
3422 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3423 (libm17n_gd_la_LDFLAGS): Delete it.
3424 (include_HEADERS): Add m17n-gd.h.
3426 2004-06-25 Kenichi Handa <handa@m17n.org>
3428 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
3429 (libm17n_gd_la_LDFLAGS): Cancel previous change.
3431 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
3433 * font-ft.c (fc_list): If FcFontList finds no font, try
3436 * draw.c (compose_glyph_string): Terminate the last loop after
3437 doing default combining if necessary.
3439 2004-06-24 Kenichi Handa <handa@m17n.org>
3441 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
3443 * character.c (mchar_define_property): Add const to an arg.
3445 * charset.c (mchar_define_charset): Add const to an arg.
3447 * coding.c (MCodingSystem): Add const to an arg or decoder.
3448 (finish_decoding): Add const to an arg.
3449 (decode_coding_charset, decode_coding_utf_8)
3450 (decode_coding_utf_16, decode_coding_utf_32)
3451 (decode_coding_iso_2022, decode_coding_sjis)
3452 (mconv_define_coding): Likewise.
3454 * m17n-X.c (xft_find_metric): Delete unused variable.
3456 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
3459 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
3462 * mtext.c (count_utf_8_chars, count_utf_16_chars)
3463 (mtext__from_data, mtext_from_data): Add `const' to an arg.
3465 * mtext.h (mtext__from_data): Ajust prototype.
3467 2004-06-23 Kenichi Handa <handa@m17n.org>
3469 * draw.c (compose_glyph_string): Always get glyph codes by
3471 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
3472 (mdraw_glyph_list): New function.
3474 * font-flt.c (mfont__flt_run): Be sure to call
3475 rfont->driver->encode_char.
3477 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
3478 (ft_encode_char): Delete arg C.
3479 (ft_render): Don't call FT_Get_Char_Index.
3481 * font.c (mfont__encodable_p): Delete it.
3482 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
3484 * font.h (struct MFontDriver): Delete arg C of encode_char.
3485 (mfont__encodable_p): Delete extern.
3487 * m17n-X.c (xfont_encode_char): Delete arg C.
3488 (xft_find_metric): Don't cal FT_Get_Char_Index.
3489 (xft_render): Likewise.
3491 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
3493 (mdraw_glyph_list): Extern it.
3495 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
3497 2004-06-22 Kenichi Handa <handa@m17n.org>
3499 * m17n-gui.h (mfontset_lookup): Extern it.
3501 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
3503 * fontset.c (realize_fontset_elements)
3504 (free_realized_fontset_elements, update_fontset_elements): New
3506 (mfont__realize_fontset): Call realize_fontset_elements.
3507 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
3508 (mfont__lookup_fontset): If a fontset was modified, update
3509 the realized fontset.
3510 (mfontset_modify_entry): Increment fontset->tick.
3511 (mfontset_lookup): New function.
3513 2004-06-21 Kenichi Handa <handa@m17n.org>
3515 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
3517 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
3518 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
3519 length of source text 0.
3521 2004-06-21 Kenichi Handa <handa@m17n.org>
3523 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
3524 (compare): Pay attention to format other than utf-8.
3525 (copy): Delete this function.
3526 (count_by_utf_8, count_by_utf_16, insert): New functions.
3527 (count_utf_16_chars): Fix handling of a surrogate pair.
3528 (find_char_forward, find_char_backward): Likewise.
3529 (mtext__from_data): Delete unnecessary check. Fix number of
3531 (mtext_from_data): Don't count items.
3532 (mtext_ref_char): Optimize the code.
3533 (mtext_set_char): Pay attention to format other than utf-8.
3534 (mtext_cat_char): Likewise.
3535 (mtext_dup): Don't call copy, instead do allocation here.
3536 (mtext_cat): Call insert instead of copy.
3537 (mtext_ncat): Likewise.
3538 (mtext_cpy): Delete character at first and call insert instead of
3540 (mtext_ncpy): Likewise.
3541 (mtext_copy): Likewise.
3542 (mtext_duplicate): Call insert instead of copy.
3543 (mtext_del): Pay attention to format other than utf-8.
3544 (mtext_ins): Simply call insert.
3545 (mtext_ins_char): Pay attention to format other than utf-8.
3546 (mtext_tok): Call insert instead of copy.
3547 (mtext_text): Call UNIT_BYTES.
3549 * textprop.c (mtext__adjust_plist_for_change): New function.
3551 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
3552 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
3553 (CHAR_UNITS_AT): Fix typo.
3554 (CHAR_UNITS_BY_HEAD): Fix typo.
3555 (STRING_CHAR_AND_UNITS): Fix typo.
3557 * internal.h (MTEXT_READ_ONLY_P): New macro.
3559 * mtext.h (mtext__replace): Delete the extern.
3560 (mtext__adjust_foramt): Adjust prototype.
3562 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
3563 if possible. Otherwise make a copy of mmt.
3565 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
3568 2004-06-18 Kenichi Handa <handa@m17n.org>
3570 * character.h (CHAR_STRING_UTF16): Fix syntax.
3572 2004-06-16 Kenichi Handa <handa@m17n.org>
3574 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
3575 (libm17n_X_la_LIBADD): Delete it.
3576 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
3578 * m17n-X.c (device_open): Add parens in `if' condition.
3580 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
3581 (DEC_POSITION): Likewise.
3582 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
3584 2004-06-15 Kenichi Handa <handa@m17n.org>
3586 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
3589 * draw.c (compose_glyph_string): If langauge is specified, call
3590 mface__for_chars even if a text is all latin. Fix condition for
3591 setting non_ascii_found.
3593 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
3595 * m17n.h (minput_char_to_key): Delete extern.
3597 * m17n-gui.h (minput_event_to_key): Cancel previous change.
3599 * m17n-gui.c (null_device_open): Set several members of frame.
3601 2004-06-14 Kenichi Handa <handa@m17n.org>
3603 * m17n-gui.h (minput_event_to_key): Delete extern.
3605 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
3607 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
3609 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
3611 2004-06-08 Kenichi Handa <handa@m17n.org>
3613 * character.c (mchar_put_prop): Don't increment the ref-count of
3616 2004-06-04 Kenichi Handa <handa@m17n.org>
3618 * m17n-core.c (mdebug__register_object): New function.
3619 (mdebug__unregister_object): Likewise.
3621 * internal.h (mdebug__register_object, mdebug__unregister_object):
3623 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
3626 * charset.c (mcharset__load_from_database): Don't call
3627 mconv__register_charset_coding here.
3629 * coding.c (find_coding): Get a real name from an element of
3630 coding_definition_list.
3631 (mconv__register_charset_coding): Set the real name at the top of
3633 (mcoding__load_from_database): Likewise.
3634 (mconv_list_codings): Adjusted for the above change.
3636 2004-06-03 Kenichi Handa <handa@m17n.org>
3638 * coding.c (find_coding): Find by canonicalized name. Don't have
3639 to modify the element of coding_definition_list by
3641 (mconv__define_coding_from_charset): Delete it.
3642 (mconv__register_charset_coding): Canonicalize sym.
3643 (mcoding__load_from_database): Register plist modified by
3646 * coding.h (mconv__define_coding_from_charset): Don't extern it.
3648 * font-ft.c (ft_open): Fix setting of rfont->descent.
3650 2004-06-02 Kenichi Handa <handa@m17n.org>
3652 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
3653 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
3654 (xlfd_unparse_name): Renamed from xfont_build_name.
3655 (mfont__init): Initialized Mfontconfig.
3656 (mfont__free_realized): Unconditionally unref rfont->info.
3657 (mfont__select): Free `this' if it's not best.
3658 (mfont__open): Don't check frame->realized_font_list.
3659 (mfont__parse_name_into_font): New function.
3660 (Mfontconfig): New variable.
3661 (mfont_from_name): Call mfont_parse_name.
3662 (mfont_name): Call mfont_unparse_name.
3663 (mdebug_dump_font): Likewise.
3665 * font.h (struct MFontDriver): Delete members parse_name and
3667 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
3668 (mfont__parse_name_into_font): Extern it.
3670 * font-ft.c: Include "symbol.h".
3671 (close_ft): Unconditionally free filename and charmap_list of
3673 (ft_open): Duplicate base->filename. Increment ref-count of
3674 ft_info->charmap_list. Free ft_info->charmap_list and
3675 ft_info->filename on error.
3676 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
3678 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
3680 (enum xlfd_field_idx): Moved to font.c.
3681 (split_font_name, build_font_name): Likewise.
3682 (build_font_list): Call mfont__parse_name_info_font.
3683 (xfont_open): Call mfont__unparse_name. Free name.
3684 (xfont_parse_name, xfont_build_name): Moved to font.c
3685 (xft_select): Prototype deleted.
3686 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
3687 Call mfont_pase_name.
3689 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
3690 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
3693 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
3696 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
3698 2004-06-01 Kenichi Handa <handa@m17n.org>
3700 * fontset.c (mfontset_modify_entry): Pay attention to the case
3701 that fontset->font_spec_list is NULL.
3703 2004-05-31 Kenichi Handa <handa@m17n.org>
3705 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3707 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3709 * font.c (mfont__select): Print score the a font for debugging.
3711 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
3713 * coding.c (reset_coding_sjis): Check kanji and kana instead of
3714 kanji_sym and kana_sym.
3716 2004-05-28 Kenichi Handa <handa@m17n.org>
3718 * Makefile.am (VINFO): New variable.
3719 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
3720 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
3722 2004-05-27 Kenichi Handa <handa@m17n.org>
3724 The following chanages are to make device dependent functions
3725 accessible only from MDeviceDriver structure, and to add GD and
3726 null device drivers. Font drivers get also device dependent.
3728 * m17n.c (m17n_init): Increament shell_initialized.
3729 (m17n_fini): Decremented shell_initialized.
3731 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
3733 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
3734 (Mwidget, Mcolormap, Mx): Extern them.
3736 * m17n-gui.c: Include <dlfcn.h> and "config.h".
3737 (free_frame): Call frame->driver->close instead of
3739 (DLOPEN_SHLIB_EXT): New macro.
3740 (MDeviceLibraryInterface): New type.
3741 (device_library_list): New variable.
3742 (register_device_library): New function.
3743 (null_device): New variable.
3744 (null_device_close, null_device_get_prop)
3745 (null_device_realize_face, null_device_free_realized_face): New
3747 (null_driver): New variable.
3748 (null_device_init, null_device_fini, null_device_open): New
3750 (null_interface): New variable.
3751 (Mfreetype, Mdevice): Declare them.
3752 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
3753 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
3754 Mwin__Close_Device. Register drivers for Mx and Mgd.
3755 (m17n_fini_win): Decremented win_initialized. Call "fini"
3756 function of all opened devices. Don't call mwin__fini.
3757 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
3759 (mframe): Handle Mdevice key of PLIST.
3760 (mframe_get_prop): Call frame->device->get_prop instead of
3761 mwin__device_get_prop.
3763 * m17n-gd.c: New file.
3765 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
3766 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
3768 * m17n-core.c (m17n_init_core): Increate core_initialized.
3769 (m17n_fini_core): Decremented core_initialized.
3771 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
3772 (Mcolormap): Don't extern them here.
3774 * m17n-X.c (FRAME_DEVICE): New macro.
3775 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
3776 (free_display_info): Use MPLIST_DO.
3777 (free_device): Free rface->info.
3778 (xft_close): Delete it.
3779 (device_init): Renamed from mwin__init.
3780 (device_fini): Renamed from mwin__fini.
3781 (device_open): Renamed from mwin__open_device.
3782 (x_driver): New variable.
3783 (MXFontInfo): Delete member frame, add member display.
3784 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
3785 Don't declare them here.
3787 * internal-gui.h (MDeviceType): New enum.
3788 (MWDefice): Delete it.
3789 (struct MFrame): Change type of device to void *. New members
3790 device_type, driver, font_driver_list.
3791 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
3792 (MDeviceDriver): New type.
3793 (Mx, Mgd, Mfreetype): Extern them.
3794 (mwin__XXX): Delete all of them.
3796 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
3798 (win_destroy_ic): Likewise.
3799 (adjust_window_and_draw): Likewise.
3800 (win_callback): Likewise.
3801 (Mxim): Declare it here.
3802 (minput_event_to_key): Call M_CHECK_READABLE.
3804 * fontset.c (mfont__lookup_fontset): Delete local variable
3807 * font.h (struct MFontDriver): Delete member close, add members
3808 parse_name and build_name.
3809 (mfont__driver_list): Delete extern.
3810 (mfont__close): Delete extern.
3812 * font.c (mfont__init): Don't set mfont__driver_list.
3813 (mfont__fini): Don't unref mfont__driver_list.
3814 (mfont__select): Try font drivers in frame->font_driver_list. Set
3815 driver member of a realized font.
3816 (mfont__close): Delete it.
3817 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
3818 functions of the default frame.
3820 * font-ft.c (close_ft): Check ft_info->ft_face and work
3822 (add_font_info): Allocate ft_info by M17N_OBJECT.
3823 (ft_close): Delete it.
3824 (mfont__ft_driver): Don't set ft_close.
3825 (ft_select): Increment ref-count of best_font.
3826 (ft_open): Decremented ref-count of base. On error, call
3827 FT_Done_Face and free ft_info.
3828 (ft_find_metric): Always use XXX_MONO in load_flags.
3829 (ft_render): Fix setting of width. Call
3830 frame->driver->draw_points instead of mwin__draw_points.
3831 (ft_to_prop): Don't set mfont__driver_list.
3832 (mfont__ft_fini): Just unref ft_info.
3834 * face.c (mface__init): Exchange foreground and background of
3835 mface__default. Call mface_put_prop to set hline of
3837 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
3838 (mface__free_realized): Don't call mwin__free_realized_face.
3840 * draw.c (Mdepth): Don't declare it here.
3841 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
3842 (render_glyphs, render_glyph_string): Likewise.
3843 (mdraw__init): Don't set Mdepth.
3844 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
3846 (mdraw_text_per_char_extents): Return 0 on success and -1 on
3848 (mdraw_text_items): Check FRAME is writable.
3849 (mdraw_per_char_extents): Implement body.
3851 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
3853 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
3854 (GUI_SOURCES): Delete it.
3855 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
3856 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
3857 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
3858 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
3859 (linkgui_LDADD): Set to libm17n-gui.la
3860 (linkgui_LDFLAGS): New target.
3861 (SRC): Include ${libm17n_gui_la_SOURCES} and
3862 ${libm17n_gd_la_SOURCES}.
3864 2004-05-24 Kenichi Handa <handa@m17n.org>
3866 * draw.c (draw_background): Don't draw background even if
3867 rface->face.property[MFACE_BACKGROUND] is not Mnil.
3869 2004-05-22 Kenichi Handa <handa@m17n.org>
3871 * m17n-X.c (xft_open_font): Fix anti_alias setting.
3873 2004-05-20 Kenichi Handa <handa@m17n.org>
3875 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
3877 * m17n-gui.c: Include "plist.h".
3878 (mframe): If PLIST is NULL, initialize it to emply plist.
3880 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
3881 (xft_driver): New variable.
3882 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
3883 (xft_find_metric, xft_render): New function.
3884 (mwin__init): Adjusted for the new mfont__driver_list.
3885 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
3886 generated face to PARAM.
3887 (mwin__realize_face): Fix setting of box colors. Don't call hook
3889 (mwin__draw_hline): New function.
3890 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
3891 (mwin__xft_render): Delete these function.
3893 * internal-gui.h (struct MFrame): New member tick.
3894 (struct MGlyphString): New member tick.
3895 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
3896 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
3897 (mwin__xft_render): Delete extern.
3899 * fontset.c (mfont__lookup_fontset): Make the code simpler.
3900 (mfontset): Always increment the reference count of returned
3903 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
3904 (MFTInfo): Moved to font.h.
3905 (ft_iso8859_1_font_list): Delete this variable.
3906 (set_font_info): Don't set font->property[MFONT_TYPE].
3907 (set_font_info): Don't udpate ft_iso8859_1_font_list.
3908 (add_font_info): Change type to void.
3909 (fc_list): Change anme from xft_list. Caller changed. Include
3910 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
3911 (mfont__ft_driver): Change name from ft_driver. Caller changed.
3912 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
3913 (close_ft): Don't call mwin__xft_close. Unref
3914 ft_info->extra_info.
3915 (ft_open): Don't setup ft_info->fontname. Don't call
3917 (ft_find_metric): Don't call mwin__xft_get_metric.
3918 (ft_encode_char): Call rfont->driver->open instead of ft_open.
3919 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
3920 (mfont__ft_init): Adjusted for new mfont__driver_list.
3921 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
3923 * font.c (mfont__driver_list): Make it MPlist.
3924 (mfont__init): Adjust initialization of mfont__driver_list.
3925 (mfont__fini): Free mfont__driver_list.
3926 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
3927 (mfont__select): Adjusted for the new mfont__driver_list.
3929 * font.h (enum MFontProperty): Delete MFONT_TYPE.
3930 (mfont__drirver_list): Adjust prototype.
3931 (MFTInfo): Move to here from fron.c. Deleve member fontname.
3933 * face.h (struct MFace): Delete member realized_face_list, add
3935 (struct MRealizedFace): Delete member need_update
3936 andnofont_rface, add member non_ascii_list.
3937 (mface__update_frame_face): Extern it.
3939 * face.c (hline_prop_list, box_prop_list, noop_hook): New
3941 (get_hline_create, get_box_create): New functions.
3942 (find_realized_face): Cancel previous change. Arg RFONT deleted.
3944 (free_face): Cancep previous change. Free face->frame_list.
3945 (serialize_hline): Do nothing if hline->width is zero.
3946 (serialize_box): Do nothing if box->width is zero.
3947 (mface__init): Setup all properties of mface__default.
3948 (mface__fini): Free hline_prop_list and box_prop_list.
3949 (mface__realize): Cancel previous change. Update
3950 face->frame_list. Setup rface->non_ascii_list.
3951 (mface__for_chars): Update rface->non_ascii_list.
3952 (mface__free_realized): Free rface->non_ascii_list.
3953 (mface__update_frame_face): New function.
3954 (mface): Initialize face->frame_list.
3955 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
3957 (mface_merge): Likewise.
3958 (mface_put_prop): If key is Mhline or Mbox, get value by
3959 get_hline_create or get_box_create respectively.
3960 (mface_put_prop): Update frame->tick and call
3961 mface__update_frame_face if necessary.
3962 (mface_update): Do nothing if func is noop_hook.
3964 * draw.c (render_glyphs): If a font is not found, use
3965 mwin__draw_empty_boxes.
3966 (alloc_gstring): Initialize gstring->tick.
3967 (get_gstring): Check gstring->tick.
3969 2004-05-17 Kenichi Handa <handa@m17n.org>
3971 * face.c (find_realized_face): Return value changed. If RFONT is
3972 NULL, avoid unnecessary checking.
3973 (free_face): Free face->realized_face_list.
3974 (mface__realize): Adjusted for the change of find_realized_face.
3975 If it returns a realized face that needs update, free it and
3976 realize a new one. Push a new realized face to
3977 frame->realized_face_list instead of appending.
3978 (mface__for_chars): Adjusted for the change of find_realized_face.
3979 Short cut if the required font is in rface->ascii_rface.
3980 (mface_put_prop): Free old value if necessary. Set need_update
3981 member of realized faces to 1.
3983 * face.h (struct MFace): Delete member tick, add member
3985 (struct MRealizedFace): Delete member tick, add member
3988 2004-05-13 Kenichi Handa <handa@m17n.org>
3990 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
3992 2004-05-12 Kenichi Handa <handa@m17n.org>
3994 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
3996 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
3997 parse it XftNameParse.
3999 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
4000 (all_fonts_scaned): New variable.
4001 (set_font_info): FAMILY may be Mnil.
4002 (add_font_info): Argument changed.
4003 (xft_list): Call add_font_info in it.
4004 (ft_list): Likewise.
4005 (ft_select): Make it work in the case family is Mnil.
4006 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
4007 (mfont__ft_fini): Set all_fonts_scaned to 0.
4009 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
4010 that is failed to open.
4012 2004-05-10 Kenichi Handa <handa@m17n.org>
4014 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
4015 device's depth is 1 (i.e. monochrome).
4017 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
4018 to work around the problem of libtool.
4020 * font-ft.c: Include <freetype/ftbdf.h>.
4021 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
4023 (mfont__ft_init): Initialize them.
4024 (ft_iso8859_1_font_list): New variable.
4025 (set_font_info): Detect a font containing iso8859-1 glyphs and
4026 register it in ft_iso8859_1_font_list. If the font is not
4027 scalable, assume it as BDF or PCF font and setup SIZE and RESY
4028 properties of the font from its properties.
4029 (add_font_list): If the font is not scalable, check if it is BDF
4030 or PCF font. If not, ignore it.
4031 (ft_select): If FAMILY is Mnil, return NULL only if the requested
4032 registry is not iso8859-1.
4033 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
4034 ft_iso8859_1_font_list.
4035 (ft_find_metric): If the font is not scalable, assume it as BDF
4036 or PCF, and get a metric from its properties.
4037 (mfont__ft_fini): Free ft_iso8859_1_font_list.
4039 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
4041 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
4042 (libm17n_la_LDFLAGS): Delete it.
4043 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
4044 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
4046 2004-05-06 Kenichi Handa <handa@m17n.org>
4048 * draw.c (compose_glyph_string): Fix previous change.
4050 2004-04-30 Kenichi Handa <handa@m17n.org>
4052 * font-ft.c (ft_list): Delete unused variable `result'.
4053 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
4055 2004-04-27 Kenichi Handa <handa@m17n.org>
4057 * m17n-X.c: Include config.h
4058 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
4059 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
4060 (MWDevice) [HAVE_XFT2]: New member xft_draw.
4061 (FRAME_CMAP, FRAME_VISUAL): New macros.
4062 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
4063 (xfont_driver): Make it static.
4064 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
4065 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
4066 info->xft_color_back.
4067 (MXftFontInfo) [HAVE_XFT2]: New type.
4068 (mwin__xft_close) [HAVE_XFT2]: New function.
4069 (mwin__xft_open) [HAVE_XFT2]: New function.
4070 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
4071 (mwin__xft_render) [HAVE_XFT2]: New function.
4073 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4074 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
4075 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
4078 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4080 * font-ft.c: Don't include FT_FREETYPE_H here.
4081 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
4082 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
4083 (MFTInfo): New member charmap_index.
4084 (MFTInfo) [HAVE_XFT2]: New member xft_info.
4085 (check_otf_filename): Renamed from check_filename. Return value
4087 (ft_set_property): This function deleted.
4088 (set_font_info): New function.
4089 (add_font_list): Argument changed. Add multiple fonts.
4090 (xft_list) [HAVE_XFT2]: New function.
4091 (ft_list) [not HAVE_XFT2]: New function.
4092 (ft_select): Add code for Xft.
4093 (close_ft): Likewise.
4094 (ft_open): Likewise.
4095 (ft_find_metric): Likewise.
4096 (ft_encode_char): Likewise.
4097 (ft_render): Likewise.
4099 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
4101 2004-04-26 Kenichi Handa <handa@m17n.org>
4103 * textprop.c (mtext_attach_property): Declare the return type as
4106 2004-04-21 Kenichi Handa <handa@m17n.org>
4108 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
4110 2004-04-09 Kenichi Handa <handa@m17n.org>
4112 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
4114 (load_command): Setup above members.
4116 2004-04-05 Kenichi Handa <handa@m17n.org>
4118 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
4120 2004-03-30 Kenichi Handa <handa@m17n.org>
4122 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
4125 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
4126 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
4128 2004-03-29 Kenichi Handa <handa@m17n.org>
4130 * Version 1.0 Patch Level 2 released.
4132 2004-03-29 Kenichi Handa <handa@m17n.org>
4134 * charset.c (make_charset): Set charset->fully_loaded and
4135 charset->simple correctly. Don't try to get charset->min_char and
4136 charset->max_char for a charset of method subset and superset.
4137 Don't load a mapping file here.
4138 (mcharset__init): Set unified_max.
4139 (mcharset__load_from_database): Free a working plist.
4141 * coding.c (mcoding__fini): Free all malloced data.
4143 * input-gui.c (win_create_ic): Set control.as_image for preediting
4146 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
4147 `count') to initialize the array.
4149 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
4152 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
4154 (mwin__create_window): Fix bug of setting a background pixel of a
4156 (mwin__adjust_window): Clear the window before drawing.
4158 * m17n-core.c (mdebug__report_object): Free array->objectes if
4160 (m17n_init_core): Don't set report_header_printed to 0 here.
4161 Fix debugging information.
4162 (m17n_fini_core): Set report_header_printed to 0 here.
4164 * m17n-core.h (mplist_deserialize): Extern it.
4166 * m17n-gui.c (m17n_fini_win): Fix debugging information.
4168 * m17n.c (m17n_fini): Fix debugging information.
4170 * mtext.c (mtext__adjust_foramt): New function.
4172 * mtext.h (mtext__adjust_foramt): Extern it.
4174 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
4176 * plist.h (mplist__deserialize): Don't extern it.
4178 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
4179 elements of symbol_table to NULL. Report about created and freed
4180 symbols if MDEBUG_FINI is set.
4182 2004-03-22 Kenichi Handa <handa@m17n.org>
4184 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
4186 * m17n.c (m17n_init): Fix the way of checking merror_code.
4188 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
4190 2004-03-22 Kenichi Handa <handa@m17n.org>
4192 * fontset.c (realize_font_group): Adjust the font size by
4193 mfont__resize before selecting a font.
4195 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
4197 2004-03-19 Kenichi Handa <handa@m17n.org>
4199 * Version 1.0 Patch Level 1 released.
4201 2004-03-19 Kenichi Handa <handa@m17n.org>
4203 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
4205 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
4207 2004-03-19 Kenichi Handa <handa@m17n.org>
4209 Re-apply the changes forgotten in the released version.
4211 * charset.c (mcharset__load_from_database): Call
4212 mchar_define_charset.
4214 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
4215 (mconv_encode_range): Put Mcoding text property.
4217 2004-03-18 Kenichi Handa <handa@m17n.org>
4219 * draw.c (Mdepth): New variable.
4220 (visual_order): Delete unused local var `pos'.
4221 (compose_glyph_string): Fix for the case that gstring->glyphs is
4222 realloced. Stop generating glyphs at TO. Fix handling of
4224 (layout_glyphs): Get metrics of all glyphs in advance. Set
4225 lbearing and rbearing of base of composition glyph correctly.
4226 Handle left-overhang glyphs correctly.
4227 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
4229 (dump_combining_code): Change the defualt off_x character to ".".
4230 (mdraw__init): Initialize Mdepth.
4232 * face.c (work_gstring): New variable
4233 (mface__init): Initialize work_gstring.
4234 (mface__fini): Free work_gstring.glyphs.
4235 (mface__realize): Don't handle videomode property here. Adjusted
4236 for the change of mfont__get_metric.
4237 (mface__for_chars): Adjusted for the change of mfont__get_metric.
4239 * face.h (enum face_gc): Moved to m17n-X.c.
4241 * font.h (struct MFontDriver): Arguments of find_metric changed.
4242 (mfont__select): Prototype adjusted.
4243 (mfont__get_metric): Likewise.
4244 (mfont__ft_drive_otf): Likewise.
4245 (mfont__flt_run): Likewise.
4247 * font.c (mfont__select): New argument layouter. If layouter is
4248 different in the registered font, make a new copy of realized
4250 (mfont__get_metric): Argument changed. Get metrics of multiple
4252 (mfont_find): Call mfont__select with layouter as Mnil.
4254 * font-flt.c (FontLayoutContext): New member rfont.
4255 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
4256 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
4258 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
4260 (NUM_POINTS): New macro.
4261 (MPointTable): New type.
4262 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
4263 (mfont__ft_drive_otf): New argument rfont.
4265 * fontset.c (realize_font_group): Adjusted for the changed of
4267 (check_fontset_element): This function deleted.
4269 * input-gui.c (adjust_window_and_draw): Locate a preedit window
4270 off the parent window if the preedit text is zero length.
4272 * internal-gui.h (struct MFrame): New members foreground,
4273 background, videomode, font.
4274 (struct MGlyphString): New member anti_alias.
4275 (MDrawPoint): New type.
4276 (mwin__draw_bitmap): Prototype deleted.
4277 (mwin__draw_points): Prototype added.
4279 * m17n-gui.h (MDrawControl): New member anti_alias.
4281 * m17n-gui.c (free_frame): Free frame->font.
4282 (mframe): Set the fontset of frame->face to the default fontset.
4284 * m17n-X.c (RGB_GC): New type.
4285 (enum gc_index): Renamed from enum face_gc. Member names changed.
4287 (struct MWDevice): Members foreground and background deleted. New
4288 member scratch_gc, gc_list.
4289 (DEFAULT_FONT, FALLBACK_FONT): New macros.
4290 (free_device): Free GCs in device->gc_list.
4291 (get_rgb_gc): New function.
4292 (get_gc): Renamed and argument changed from get_color.
4293 (get_gc_for_anti_alias): New function.
4294 (xfont_find_metric): Arguments changed. Get metrics of multiple
4296 (set_region): Argument changed. Caller changed.
4297 (xfont_render): Allways set a font in gc.
4298 (x_error_handler, x_io_error_handler): Define only if
4299 X_SET_ERROR_HANDLER is defined.
4300 (mwin__open_device): Create device->scratch_gc. Set members
4301 foreground, background, and videomode of frame. Call
4302 XSetErrorHandler and XSetIOErrorHandler only if
4303 X_SET_ERROR_HANDLER is defined.
4304 (struct gc_list): Deleted.
4305 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
4306 (mwin__realize_face): Adjusted for the change of the format of
4307 rface->info and the charge of set_region.
4308 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
4309 (mwin__draw_box): Likewise.
4310 (mwin__draw_bitmap): This function deleted.
4311 (mwin__draw_points): New function.
4312 (mwin__verify_region): Adjusted for the change of the format of
4313 rface->info and the charge of set_region.
4314 (mwin__create_window): Inherit backgound pixel from parent.
4315 (mwin__dump_gc): Adjusted for the change of the format of
4318 2004-03-16 Kenichi Handa <handa@m17n.org>
4320 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
4322 * input.c (M_key_alias): New variable.
4323 (handle_key): Try M_key_alias property of a key too.
4324 (minput__init): Initialize M_key_alias. Give that property to
4325 symbols in one_char_symbol. Fix bug of initializing
4328 * draw.c (compose_glyph_string): Don't handle
4329 ignore_formatting_char here. Include formatting characters in the
4330 range processed by a FTL.
4331 (layout_glyph_string): Handle ignore_formatting_char here.
4333 2004-03-12 Kenichi Handa <handa@m17n.org>
4335 * input-gui.c (win_create_ic): Enable bidi in status control.
4337 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
4339 2004-03-09 Kenichi Handa <handa@m17n.org>
4341 * input.c (load_input_method): If title is not specified, use the
4342 input method name as title.
4344 * m17n-X.c (get_color): Make it static.
4345 (xim_create_ic, xim_destroy_ic, x_error_handler)
4346 (x_io_error_handler): Likewise.
4348 2004-03-01 Kenichi Handa <handa@m17n.org>
4350 * Version 1.0 released.
4353 Copyright (C) 2003, 2004
4354 National Institute of Advanced Industrial Science and Technology (AIST)
4355 Registration Number H15PRO112
4357 This file is part of the m17n library.
4359 The m17n library is free software; you can redistribute it and/or
4360 modify it under the terms of the GNU Lesser General Public License
4361 as published by the Free Software Foundation; either version 2.1 of
4362 the License, or (at your option) any later version.
4364 The m17n library is distributed in the hope that it will be useful,
4365 but WITHOUT ANY WARRANTY; without even the implied warranty of
4366 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4367 Lesser General Public License for more details.
4369 You should have received a copy of the GNU Lesser General Public
4370 License along with the m17n library; if not, write to the Free
4371 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
4372 Boston, MA 02110-1301, USA.