1 2008-06-13 Harshula <harshula@gmail.com> (tiny change)
3 * Makefile.am (libm17n_gd_la_LIBADD): Add @FREETYPE_LD_FLAGS@.
5 2008-05-24 Kenichi Handa <handa@m17n.org>
7 * m17n-flt.c (mdebug_dump_flt): Change return value to (MFLT *).
9 2008-05-23 Kenichi Handa <handa@m17n.org>
11 * Makefile.am (libm17n_gui_la_LIBADD): Include libm17n-core.la.
12 (libm17n_X_la_LIBADD): Include libm17n-core.la, libm17n.la, and
14 (libm17n_gd_la_LIBADD): Likewise.
16 * input.c (take_action_list): Fix debug info.
18 2008-05-14 Kenichi Handa <handa@m17n.org>
20 * m17n-flt.c (run_rule): Check SRC_REGEX at first.
21 (run_stages): Fix index of g_indices.
23 2008-04-03 Kenichi Handa <handa@m17n.org>
25 * draw.c (compose_glyph_string): Don't run flt striding over the
27 (get_gstring): Don't use the cached gstring if cursor position is
30 2008-04-02 Kenichi Handa <handa@m17n.org>
32 * input.c (integer_value): Delete the 3rd arg VALUE.
33 (resolve_expression): Adjust the call of integer_value.
34 (take_action_list): Likewise.
36 2008-03-06 Kenichi Handa <handa@m17n.org>
38 * font-ft.c (ft_drive_otf): Don't ignore the otf-spec to apply all
41 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
43 * Version 1.5.1 released.
45 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
47 * draw.c (mdraw_glyph_list): Refer to mfont__ft_driver only when
48 HAVE_FREETYPE is defined.
50 * font.h (OTF_Tag): Be sure that it is defined in any cases.
52 2008-01-30 Kenichi Handa <handa@ni.aist.go.jp>
54 * font.h (enum MFontOpenTypeTable, MFontCapability): Define them
57 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
59 * input.c (parse_action_list): Handle the case "(insert INTEGER)".
61 2008-01-25 Kenichi Handa <handa@ni.aist.go.jp>
63 * input.c (parse_action_list): Check M_candidates.
64 (get_im_info): If key is Mnil, be sure to set im_info->states to a
67 2008-01-23 Kenichi Handa <handa@ni.aist.go.jp>
69 * input.c (integer_value): Fix interpretation of "@-N".
71 2008-01-17 Kenichi Handa <handa@ni.aist.go.jp>
73 * input.c (get_following_char): Fix interpretation of POS.
74 (get_following_char): Fix interpretation of "@+N".
76 2008-01-15 Kenichi Handa <handa@ni.aist.go.jp>
78 * font-ft.c (ft_drive_otf): Don't refer to otf_gstring if HAVE_OTF
81 * Makefile.am (FLT_SOURCES): Include internal-flt.h.
83 2008-01-07 Kenichi Handa <handa@ni.aist.go.jp>
85 * m17n-flt.c (UPDATE_CLUSTER_RANGE): Don't check if clustering
87 (run_rule): Call UPDATE_CLUSTER_RANGE when necessary.
88 (run_command): Check if clustering now before calling
91 2008-01-06 Kenichi Handa <handa@m17n.org>
93 * font.c (mfont__get_glyph_id): Return -1 if some code is invalid.
95 * font-ft.c (ft_drive_otf): Fix checking of negative feature.
97 * m17n-X.c (xft_find_metric): Set g->g.measured.
99 * m17n-flt.c (Mequal): New variable.
100 (m17n_init_flt): Initialize it.
101 (FontLayoutCmdRule): Merge members supported_glyph and otf_spec
102 into a new member facility.
103 (load_command): Modify parsing of Mfont_facility.
104 (run_rule): Adjuted for the change of FontLayoutCmdRule.
105 (run_otf): Adjusted metrics if a->back is nonzero.
107 2007-12-28 Kenichi Handa <handa@ni.aist.go.jp>
109 * Version 1.5.0 released.
111 2007-12-13 Kenichi Handa <handa@ni.aist.go.jp>
113 * m17n-core.c (m17n_init_core): Handle the lang. env. MDEBUG_FLT.
115 * m17n-flt.c (mdebug_flag): Set to MDEBUG_FLT.
116 (run_rule): Check if a font has the specific glyph correctly.
118 * internal.h (enum MDebugFlag): Delete MDEBUG_FONT_OTF, change
119 MDEBUG_FONT_FLT to MDEBUG_FLT.
121 * font.c (mfont__get_glyph_id): Encode g->g.code (not g->g.c).
123 * font-flt.c: Delete it.
125 2007-12-08 Kenichi Handa <handa@ni.aist.go.jp>
127 * m17n-flt.c (run_rule): Fix printing of debug info. Don't update
128 TO for the rule of SRC_HAS_GLYPH.
130 * draw.c (run_flt): Argument changed.
131 (compose_glyph_string): Adjusted for the above change.
133 2007-12-07 Kenichi Handa <handa@ni.aist.go.jp>
135 * plist.c (read_mtext_element): Don't free the malloced buffer.
137 2007-12-04 Kenichi Handa <handa@ni.aist.go.jp>
139 * m17n-core.h (merror_code): Extern it.
141 * m17n-misc.h (merror_code): Don't extern it.
143 * m17n.h: Handle the case of _M17N_FLT_H_ being defined.
145 * m17n-flt.h: Handle the case of _M17N_H_ being defined.
147 2007-11-22 Kenichi Handa <handa@ni.aist.go.jp>
149 * draw.c (compose_glyph_string): Check g->rface->layouter, not
150 g->rface->rfont->layouter.
152 * font-ft.c (ft_drive_otf): Fix setting of g->g.from and g->g.to.
154 * m17n-flt.c (FontLayoutContext): New member encoded_offset.
155 (run_rule): Use ctx->encoded_offset.
156 (run_command): Likewise.
157 (run_stages): Set ctx->encoded_offset.
159 2007-11-21 Kenichi Handa <handa@ni.aist.go.jp>
161 * m17n-flt.c (enum GlyphInfoMask): Adjusted for the change of
162 bit-size of MFLTGlyph->internal.
164 2007-11-20 Kenichi Handa <handa@ni.aist.go.jp>
166 * draw.c (visual_order): Exclude the last anchor glyph from the
169 * m17n-flt.h (MFLTGlyph): New member <adjusted>.
171 * m17n-flt.c (run_otf): Set adjusted flag of glyphs if necessary.
172 (run_stages): Likewise.
173 (load_flt): Unref top after checking plist.
175 * m17n-X.c (xft_render): Check adjusted flag of glyphs.
177 2007-11-12 Kenichi Handa <handa@ni.aist.go.jp>
179 * font-ft.c (ft_check_otf): Fix arg to OTF_check_features.
181 * m17n-flt.c (Mcombining): New variable.
182 (Mfont_facility): Renamed from Mfont_has. Referrer changed.
183 (enum FontLayoutCmdRuleSrcType): Delete SRC_EXIST, add
184 SRC_HAS_GLYPH and SRC_OTF_SPEC.
185 (FontLayoutCmdRule): Delete src.exist, add src.supported_glyph and
187 (load_command): Adjusted for the above changes.
188 (run_rule): Likewise.
189 (combining_code_from_class): Delete it.
190 (mflt_get): Check flt->name against Mcombining, not Mt.
192 * internal-flt.h (Mcombining): Extern it.
194 * draw.c (compose_glyph_string): Call run_flt with Mcombining for
195 combining characters.
197 2007-11-09 Kenichi Handa <handa@ni.aist.go.jp>
199 * face.c (mface__realize): Reset measured flag before calling
202 * m17n-flt.c (run_stages): Fix handing of off_x and off_y.
203 (setup_combining_coverage): New function.
204 (setup_combining_flt): New function.
205 (mflt_get): If flt is not found, return NULL. If name if Mt,
206 call setup_combining_flt.
207 (mflt_run): For debugging, print font family name.
209 * font-ft.c (ft_render): Fix handling of baseline_offset.
210 (ft_encapsulate): Set metrics in 26.6 fixed pixel.
211 (ft_render): Check pixel_mode to determine anti_alias.
213 * m17n-X.c (xfont_find_metric): Delete invalid "continue" line.
214 (xfont_find_metric): Set metrics in 26.6 fixed pixel.
215 (xfont_render): Set baseline_offset in pixel.
216 (xft_render): Fix handling of baseline_offset.
218 * draw.c (run_flt): Set font.font.family.
219 (compose_glyph_string): Fix handling of combining characters.
221 * fontset.c (try_font_list): Check if the named flt is surely
224 2007-11-07 Kenichi Handa <handa@ni.aist.go.jp>
226 * draw.c (analyse_bidi_level): New function.
227 (visual_order): Do reordering using the already decided
229 (compose_glyph_string): Decide bidi-level before calling flt.
231 * m17n-flt.c (mflt_run): Fix typo.
233 * font-ft.c (ft_drive_otf): Fix indexing gstring->glyphs.
235 2007-11-06 Kenichi Handa <handa@ni.aist.go.jp>
237 * draw.c (visual_order): Don't rely on the width of glyphs.
238 (run_flt): Fix culculation of g->g.to.
240 * m17n-flt.c (run_rule): Don't set error code here.
241 (run_cond): Likewise.
242 (run_otf): Fix culculation of xoff and yoff.
243 (run_command): Don't set error code here.
247 * m17n-X.c (xfont_open): Keep rfont's metrics in 26.6 fixed pixels.
248 (xfont_find_metric): Set glyph's yadv to 0.
249 (xft_find_metric): Likewise.
251 * font-ft.c (ft_open): Keep rfont's metrics in 26.6 fixed pixels.
252 (ft_find_metric): Adjust glyph's metrics.
253 (ft_encapsulate): Keep rfont's metrics in 26.6 fixed pixels.
254 (ft_drive_otf): Set mark glyph's xadv to 0.
256 * face.c (mface__for_chars): Adjusts the unit of face's ascent and
259 2007-10-29 Kenichi Handa <handa@m17n.org>
261 * m17n-flt.h (struct _MFLTOtfSpec): Adjusted for the new FLT handling.
262 (mflt_get): Adjusted for the argument change.
263 (mflt_name): Adjusted for the return value change.
265 * m17n-flt.c (Mgenerator, Mend): New variables.
266 (flt_min_coverage, flt_max_coverage): New variables.
269 (Mfont_has): Renamed from Mexist. Referrers chagned.
270 (gen_otf_tag): Handle the trailing whitespaces.
271 (otf_count_features, otf_store_features): Fix for negative features.
272 (parse_otf_command): Adjusted for the change of MFLTOtfSpec.
273 (load_otf_command): Likewise.
274 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
275 (load_flt): Argument changed. Caller changed.
276 (free_flt_list): New function.
277 (run_rule): Adjusted for the change of FontLayoutContext.
278 (mflt_run): Adjusted for the change of FontLayoutContext.
280 * m17n-gui.c (m17n_init_win): Call m17n_init_flt.
281 (m17n_fini_win): Call m17n_fini_flt.
283 * m17n-gui.h: Include m17n-flt.h.
285 * m17n-gd.c: Adusted for the change of MGlyph.
287 * m17n-X.c: Adusted for the change of MGlyph.
288 (xft_check_otf, xft_drive_otf): New functions.
290 * internal-gui.h (MGlyph): Modified for new FLT handling.
292 * fontset.c (try_font_list): Adusted for the change of MGlyph.
294 * font-ft.c: Adjusted for the change of MGlyph.
295 (ft_check_cap_otf): Renamed from ft_check_otf. Callers changed.
296 (get_glyph_metric): Deleted.
297 (ft_check_otf): New function.
298 (ft_drive_otf): New fucntion.
300 * font.c: Adjusted for the change of MGlyph.
301 (mfont__init): Don't call mfont__flt_init.
302 (mfont__fini): Don't call mfont__flt_fini.
303 (mfont__get_glyph_id, mfont__get_metrics): New functions.
305 * font.h (struct MRealizedFont): New members x_ppem and y_ppem.
306 (MFLTFontForRealized): New struct.
307 (struct MFontDriver): New members check_otf and drive_otf.
308 (mfont__get_glyph_id, mfont__get_metrics): Extern them.
310 * face.c: Adjusted for the change of MGlyph.
312 * draw.c: Adjusted for the change of MGlyph.
314 * m17n.c (m17n_init): Don't call mchar_init.
316 * m17n-core.c (m17n_init_core): Call mchar_init.
318 * m17n-core.h (mchartable_min_char, mchartable_max_char): Extern them.
320 * input.c: Include "m17n.h" instead of "m17n-gui.h".
322 * chartab.c (mchartable): Initialize table->min_char to -1.
323 (mchartable_min_char): New function.
324 (mchartable_max_char): New function.
326 * Makefile.am (GUI_SOURCES): Delete font-flt.c.
327 (libm17n_gui_la_LIBADD): Add ${top_builddir}/src/libm17n-flt.la.
329 2007-10-12 Kenichi Handa <handa@m17n.org>
331 * m17n-core.h (Mcharset): Extern it.
332 Move detabase related declarations from m17n.h.
334 * m17n-flt.h: Include m17n-core.h instead of m17n.h.
335 (struct _MFLTOtfFeatures): New struct.
336 (struct _MFLTOtfSpec): Delete gsub, gpos, etc, add gsub_gpos.
337 (struct _MFLTFont): Delete otf, add check_otf.
338 (MCHAR_INVALID_CODE): Define it.
340 * plist.c (read_mtext_element): Simplify the code.
342 * m17n.h: Move database related declarations to m17n-core.h
343 (Mharset): Don't extern it.
345 * m17n.c (m17n_init): Don't call mdatabase__init.
347 * m17n-gd.c (read_rgb_txt): Check also /etc/X11/rgb.txt. Downcase
350 * m17n-flt.c: Include m17n-core.h instead of m17n.h.
351 (Mexist): New variable.
352 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
353 (FontLayoutCmdRule): New member src.exist.
354 (parse_otf_command): Handle gsub_count and gpos_count separately.
355 (load_otf_command): Adjusted for the change of MFLTOtfSpec.
356 (load_command): Handle the command "exist".
357 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
358 (run_rule): Handle the case SRC_EXIST.
359 (run_otf): Adjusted for the change of MFLTOtfSpec.
360 (run_command): Check the range of FROM.
361 (check_otf_spec): Delete it.
362 (m17n_init_flt): Call m17n_init_core instead of m17n_init.
364 (m17n_fini_flt): Call m17n_fini_core instead of m17n_fiini.
365 (mflt_find): Call font->check_otf instead of check_otf_spec.
366 (mflt_run): Keep the metrics in 26.6 fixed point.
368 * m17n-core.c (mdatabase__finder, mdatabase__loader): Delete them.
369 (m17n_init_core): Call mdatabase__init.
371 * m17n-X.c (device_open): Use mplist_add, not mplist_push.
373 * internal.h (mdatabase__finder, mdatabase__loader): Delete externs
376 * font-flt.c (Mexist): New variable.
377 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
378 (FontLayoutCmdRule): New member src.exist.
379 (load_category_table): Use isalnum, not isalpha.
380 (load_command): Check the command "exist".
381 (run_rule): Hande the case SRC_EXIST.
382 (run_command): Check the range of FROM.
383 (mfont__flt_init): Initialize Mexist.
385 * draw.c (layout_glyphs): Fix calculation of off_x and off_y.
387 * database.h (mdatabase__load_charset_func): Extern it.
389 * database.c: Include m17n-core.h instead of m17n.h.
390 (load_chartable): Use mtext__from_data.
391 (load_charset): Moved to charset.c
392 (load_database): Call mdatabase__load_charset_func instead of
394 (mdatabase__load_charset_func): New variable.
395 (mdatabase__init): Initialize mdatabase__load_charset_func and
396 Mcharset. Don't set mdatabase__finder and mdatabase__loader.
397 (mdatabase__save): Use fwrite, not mconv_encode_stream.
398 (Mcharset): Declare it here.
400 * charset.c: Include "database.h.".
401 (load_charset): Moved from database.c.
402 (mcharset__init): Initialize mdatabase__load_charset_func, don't
405 * character.c (mchar_define_property): Call mdatabase_find directly.
406 (mchar_get_prop): Call mdatabase_add directly.
407 (mchar_put_prop): Call mdatabase_load directly.
408 (mchar_get_prop_table): Likewise.
410 * Makefile.am (libm17n_core_la_SOURCES): Add database.[ch].
411 (libm17n_la_SOURCES): Remove database.[ch].
412 (libm17n_flt_la_LIBADD): Delete libm17n.la, add libm17n-core.la.
414 2007-09-18 Kenichi Handa <handa@m17n.org>
416 * face.c (mface__realize): Try Freetype based font at first.
418 * font.c: Include <ctype.h>
420 2007-09-16 Kenichi Handa <handa@m17n.org>
422 * m17n-flt.c (load_flt): New arg full. If full is zero, load only
424 (run_otf): Call font->get_metrics, not font->get_metric.
425 (run_stages): Likewise.
426 (CHECK_FLT_COVERAGE): New macro.
427 (CHECK_FLT_STAGES): Call load_flt with the second arg 1.
428 (check_otf_spec): New function.
429 (m17n_fini_flt): Unref flt->coverage.
430 (mflt_find): Argument changed.
431 (mflt_name): New function.
432 (mflt_coverage): Use CHECK_FLT_COVERAGE.
434 * m17n-flt.h (MFLTFont): Member get_metrics renamed from get_metric.
435 (mflt_find): Prototype adjusted.
436 (mflt_name): Extern it.
438 2007-09-14 Kenichi Handa <handa@m17n.org>
440 * m17n-flt.h (struct _MFLTGlyph): Change signedness of members.
442 * font-flt.c (run_otf): Make debug info printing comaptible with
444 (run_command): Likewise.
445 (mfont__flt_run): Likewise.
447 * m17n-flt.c (UPDATE_CLUSTER_RANGE): ctx->cluster_begin_idx is
448 invalid only when it's negative.
450 (run_command): Likewise.
451 (mflt_run): Initialize ctx.cluster_begin_idx to -1.
453 2007-09-10 Kenichi Handa <handa@m17n.org>
455 * m17n-flt.h (struct _MFLTGlyph): New member encoded and measured.
456 (struct _MFLTFont): Prototype of get_glyph_id changed.
458 * m17n-flt.c (enum GlyphInfoMask): Delete EncodedMask and
460 (GAPPEND): Delete this macro.
461 (GET_ENCODED, SET_ENCODED, GET_MEASURED, SET_MEASURED): Adjusted
462 for the change of MFLTGlyph. Caller changed.
463 (run_otf): Simply calls font->get_glyph_id.
464 (run_command): Reset g->encoded and g->measured for direct code.
465 (positioning): Delete this function.
466 (run_stages): Simply calls font->get_glyph_id and font->get_metric.
468 2007-09-07 Kenichi Handa <handa@m17n.org>
470 * draw.c (compose_glyph_string): Improve script detection.
472 2007-09-06 Kenichi Handa <handa@m17n.org>
474 * m17n-flt.h (mflt_get): Extern it.
476 * m17n-flt.c (run_stages): Call positioning only if
477 font->get_metric is non-NULL.
478 (CHECK_FLT_STAGES): Fix typo.
479 (mflt_get): New function.
481 * font-flt.c (mfont__flt_run): Improve debug info printing.
483 2007-09-04 Kenichi Handa <handa@m17n.org>
485 * m17n-flt.c (MFontLayoutTable): Delete this type.
486 (struct _MFLT): New member mdb and coverage.
487 (list_flt): Set flt->mdb.
488 (load_generator): Argument and return value changed. Caller
490 (get_font_layout_table): Delete this function.
491 (run_stages): Argument changed. Caller changed.
492 (CHECK_FLT_STAGES): New macro.
493 (mfont__flt_encode_char): Argument changed.
494 (mflt_find): Likewise.
495 (mflt_coverage): New function.
496 (mflt_run): Argument changed.
497 (mdebug_dump_flt): Likewise.
499 * m17n-flt.h (mflt_coverage): Extern it.
500 (mflt_find): Prototype adjusted.
502 2007-09-03 Kenichi Handa <handa@m17n.org>
504 * internal.h (MTABLE_CALLOC_SAFE, MSTRUCT_CALLOC_SAFE): New macros.
506 * database.c (mdatabase__props): New function.
508 * database.h (mdatabase__props): Extern it.
510 * m17n-flt.h (struct _MFLTGlyphString): Delete user_data, add
512 (struct _MFLTFont): Add suitable_p.
513 (mflt_find): Extern it.
515 * m17n-flt.c: Include "database.h".
516 (struct _MFLT): New struct.
517 (list_flt): New function.
518 (load_flt): Don't update flt_list.
519 (get_font_layout_table): Use flt_list.
520 (m17n_init_flt): Don't initialize flt_list.
521 (m17n_fini_flt): Adjusted for the change of flt_list.
522 (mflt_find): New function.
523 (mflt_run): Fix debug printing.
525 2007-08-23 Kenichi Handa <handa@m17n.org>
527 * m17n-flt.c (run_otf): Remove #ifdef HAVE_OTF and #endi.
528 (run_stages): Print separator in encoded string as "|".
530 2007-08-23 Kenichi Handa <handa@m17n.org>
532 * font-flt.c (mfont__flt_run): Don't calculate a glyph metric if
533 the glyph is already handled by OTF.
535 2007-08-21 Kenichi Handa <handa@m17n.org>
537 * font-ft.c (ft_check_capability): Check cap->script_tag at first.
539 2007-08-20 Kenichi Handa <handa@m17n.org>
541 * font-flt.c (mfont__flt_run): Get glyph metrics before printing
544 2007-08-17 Kenichi Handa <handa@m17n.org>
546 * m17n-flt.h (struct _MFLTGlyphString): Member pointer renamed to
548 (MFLTOtfSpec): Renamed from MFLT_OTF_Spec.
549 (MFLTFont): Prototype of the member drive_otf adjusted.
551 * m17n-flt.c (run_stages): Fix handling of padding.
553 * font-ft.c (get_glyph_metric): New function.
554 (DEVICE_DELTA): Return 26.6 fixed point value.
555 (adjust_anchor): Likewise.
556 (mfont__ft_drive_otf): Use get_glyph_metric.
558 * font-flt.c (mfont__flt_run): Pay attention to padding on
561 2007-08-16 Kenichi Handa <handa@m17n.org>
563 * m17n-flt.c (run_stages): Fix typo.
565 * font-ft.c (adjust_anchor): Argument changed. Calculte based on
567 (mfont__ft_drive_otf): Don't call OTF_check_features for GPOS.
568 Adjusted for the argument change of adjust_anchor. Calculte based
571 2007-08-15 Kenichi Handa <handa@m17n.org>
573 * charset.c (mcharset__load_from_database): Set mdebug_flag
574 instead of mdebug_mask.
576 * coding.c (mcoding__load_from_database): Set mdebug_flag instead
579 * database.c (load_database): Set mdebug_flag instead of
581 (mdatabase__load_for_keys): Likewise.
583 * draw.c: Include "internal-flt.h".
584 (dump_combining_code): Don't subtract 128 from combining code
587 * font-flt.c: Include "internal-flt.h". Set mdebug_flag instead
589 (run_rule): Print debug info only when MDEBUG_FLAG is greater than
591 (run_cond): Likewise.
593 (run_command): Likewise.
594 (mfont__flt_run): Change format of debug info.
596 * font-ft.c: Include "internal-flt.h".
597 Set mdebug_flag instead of mdebug_mask.
598 (mfont__ft_drive_otf): Fix arg to OTF_check_features.
600 * input.c: Set mdebug_flag instead of mdebug_mask.
601 (shift_state): New MDEBUG_FLAG macro.
602 (preedit_commit): Likewise.
605 * internal-flt.h: New file.
607 * internal-gui.h (MAKE_COMBINING_CODE, COMBINING_CODE_OFF_Y)
608 (COMBINING_CODE_OFF_X, COMBINING_CODE_BASE_X)
609 (COMBINING_CODE_BASE_Y, COMBINING_CODE_ADD_X)
610 (COMBINING_CODE_ADD_Y, MAKE_COMBINING_CODE_BY_CLASS)
611 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
612 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P): Move
613 these macros to internal-flt.h.
615 * internal.h (M17N_OBJECT_ADD_ARRAY): Adjusted for the change of
617 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Likewise.
618 (enum MDebugMaskBit): Delete this enum.
619 (enum MDebugFlag): New enum.
620 (mdebug__flag): Don't extern it.
621 (mdebug__flags): Extern it.
622 (MDEBUG_FLAG): New macro.
623 (MDEBUG_PRINT0): Use the macro MDEBUG_FLAG.
624 (MDEBUG_DUMP, MDEBUG_PUSH_TIME, MDEBUG_POP_TIME)
625 (MDEBUG_PRINT_TIME): Likewise.
627 * m17n-X.c (xfont_open): Set mdebug_flag instead of mdebug_mask.
628 (xfont_list): Likewise.
630 * m17n-core.c (mdebug__flag): Delete this variable.
631 (mdebug__flags): New variable.
632 (SET_DEBUG_FLAG): Make it a function.
633 (m17n_init_core): Set mdebug_flag instead of mdebug_mask.
634 (m17n_fini_core): Likewise.
636 * m17n-gui.c (m17n_init_win): Set mdebug_flag instead of mdebug_mask.
637 (m17n_fini_win): Likewise.
639 * m17n-misc.h (enum MErrorCode): Add MERROR_FLT.
641 * m17n.c (m17n_init): Set mdebug_flag instead of mdebug_mask.
642 (m17n_fini): Likewise.
644 * symbol.c (msymbol__free_table): Adjusted for the change of
647 * Makefile.am (BASICBUILDS): Add libm17n-flt.la.
648 (BASICHEADERS): Add m17n-flt.h.
649 (FLT_SOURCES): New variable.
650 (libm17n_flt_la_SOURCES, libm17n_flt_la_LIBADD)
651 (libm17n_flt_la_LDFLAGS): Likewise.
653 * m17n-flt.h: New file.
655 * m17n-flt.c: New file created by modifying font-flt.c.
657 2007-07-13 Kenichi Handa <handa@m17n.org>
659 * Version 1.4.0 released.
661 2007-07-12 Kenichi Handa <handa@m17n.org>
663 * input.c: Fix doxygen @ref commands.
665 2007-07-10 Kenichi Handa <handa@m17n.org>
667 * m17n-core.h (M17NFunc): Fix typo of Doxygen directive.
669 2007-07-09 Kenichi Handa <handa@m17n.org>
671 * m17n-core.h (M17N_BEGIN_HEADER, M17N_END_HEADER): New macros.
673 * m17n.h: Include m17n-core.h if not yet done. Use macros
674 M17N_BEGIN_HEADER and M17N_END_HEADER.
676 * m17n-gui.h: Likewise.
678 * m17n-misc.h: Likewise.
680 2007-06-13 Kenichi Handa <handa@m17n.org>
682 * font-flt.c (load_command): Prepend "^" in the regular expression.
684 2007-06-11 Kenichi Handa <handa@m17n.org>
686 * language.c (mlanguage_name_list): Fix previous change.
688 * coding.c (mcoding__load_from_database): Add aliases in
689 coding_definition_list.
691 2007-06-10 Kenichi Handa <handa@m17n.org>
693 * language.c (mlanguage_name_list): Fix previous change.
695 2007-06-08 Kenichi Handa <handa@m17n.org>
697 * input.c (update_candidate): Copy candidate_list earlier.
698 (re_init_ic): Provide pseudo initialize state if none.
700 2007-06-05 Kenichi Handa <handa@m17n.org>
702 * input.c (preedit_insert): Print debug information.
704 * database.c (expand_wildcard_database): New function.
705 (mdatabase_list): Fix handling of wildcard database.
707 * language.c (load_lang_name): New function.
708 (mlang__fini): Cancel the last two changes.
709 (mlanguage_name_list): New arg script and territories. Use
712 * m17n.h (mlangauge_name_list): Adjusted.
714 2007-06-04 Kenichi Handa <handa@m17n.org>
716 * input.c (open_im): Check if the input method has at least one
719 2007-06-01 Kenichi Handa <handa@m17n.org>
721 * input.c (shift_state): Change the format of debug print.
722 (preedit_commit): New arg need_prefix. Caller changed.
723 (update_candidate): Copy candidate_list.
724 (take_action_list): Likewise.
725 (handle_key): Change the format of debug print.
727 * font-flt.c (load_flt): Ignore unknown directives.
729 2007-05-25 Kenichi Handa <handa@m17n.org>
731 * m17n-core.c (mdebug__unregister_object): Small optimization.
733 * database.c (find_file): Merged into get_database_file.
734 (get_database_file): New arg result. Caller changed.
735 (mdatabase__check): Fix the logic.
737 2007-05-24 Kenichi Handa <handa@m17n.org>
739 * database.c (find_database): If unprocessed wildcard database is
740 found, register database filed and recursively call find_database.
741 (free_db_info): Unref db_info->properties.
742 (register_database): New arg properties. Delete code for
743 initializing mdatabase__list.
744 (register_databases_in_files): Argument changed. Caller changed.
745 (mdatabase__update): Don't list files by glob here.
746 (mdatabase_list): If unprocessed wildcard database is found,
747 register database filed and recursively call mdatabase_list.
749 * database.h (enum MDatabaseStatus): New enum
750 MDB_STATUS_AUTO_WILDCARD.
752 * input.c (load_branch): Fix previous change.
753 (update_global_info): If the global database is not found, return -1.
755 2007-05-23 Kenichi Handa <handa@m17n.org>
757 * database.c (Mversion): New variable.
758 (mdatabase__init): Initialize it.
759 (register_database): New arg properties. Caller changed.
760 (register_databases_in_files): Don't check version here.
761 (mdatabase__update): Likewise.
763 * database.h (MDatabaseInfo): New member properties.
765 2007-05-21 Kenichi Handa <handa@m17n.org>
767 * language.c: Include <ctype.h>
768 (mlanguage__info): Use strncasecmp (not memcmp).
769 (mlanguage_name): Downcase language name for backward
772 * input.c (filter): Don't check Mlanguage property of
775 2007-05-18 Kenichi Handa <handa@m17n.org>
777 * language.c (mlanguage_name): Fix it to handle M-text English
780 * input.c (config_command): Set NAME before using it.
781 (load_branch): Try to resolve a map name by variables.
783 2007-05-17 Kenichi Handa <handa@m17n.org>
785 * language.c (mlang__fini): Fix previous change.
787 2007-05-16 Kenichi Handa <handa@m17n.org>
789 * plist.c (free_plist): Cancel the last change.
790 (write_element): Check if PLIST is nested.
791 (mplist__from_plist): Label a plist as nested if appropriate.
792 (mplist__from_alist): Label a plist as nested.
793 (mplist__conc): Check the value of PL before referring it. Label
794 a plist as nested if appropriate.
795 (mplist_copy): Label a plist as nested if appropriate.
796 (mplist_put_func): Return Mnil if KEY is a managing key.
797 (mplist_push): Label a plist as nested if appropriate.
799 * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
802 * language.c (mlang__fini): Unref each element of langname_list.
804 2007-05-14 Kenichi Handa <handa@m17n.org>
806 * language.c: Include <string.h> and <locale.h>.
807 (langname_list): New variable.
808 (load_lang_script_list): Exclude invalid list elements.
809 (mlang__init): Initialize langname_list.
810 (mlang__fini): Unref langname_list.
811 (mlanguage__info): Adjusted for the change of English
812 name (symbol->M-text).
813 (mlanguage_name): Label it as obsolete.
814 (mlanguage_name_list): New function.
816 * m17n.h (mlanguage_name_list): Extern it.
818 * locale.c (make_locale): Fix setting of members of locale.
820 * plist.c (free_plist): Unref also nested plist.
822 2007-05-11 Kenichi Handa <handa@m17n.org>
824 * coding.c (mconv_reset_converter): Set internal->used to 0.
826 2007-05-08 Kenichi Handa <handa@m17n.org>
828 * input.c (check_description): Force copying the translated text.
830 2007-05-02 Kenichi Handa <handa@m17n.org>
832 * input.c (minput_save_config): Unref unnecessary plist. Use
833 free_im_list to free im_config_list.
835 2007-04-20 Kenichi Handa <handa@m17n.org>
837 * input.c (config_command): Fix previous change again.
838 (config_variable): Likewise.
839 (minput_config_command): Fix for the case of setting back to
841 (minput_config_variable): Likewise.
842 (minput_save_config): Include nil as documentation of customized
845 2007-04-05 Kenichi Handa <handa@m17n.org>
847 * input.c (config_command): Fix previous change.
848 (config_variable): Likewise.
850 * plist.c (mplist_get_func): Fix for backward compatiblity.
852 2007-04-04 Kenichi Handa <handa@m17n.org>
854 * input.c (minput_get_command, minput_config_command): Fix example
857 2007-03-29 Kenichi Handa <handa@m17n.org>
859 These changes are to avoid unsafe casting of a function pointer.
861 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
862 (struct MFace): New member hook.
864 * face.c (serialize_face): Adjusted for the change of MFace.
865 (deserialize_face): Likewise.
866 (mface__init): Likewise. Use msymbol_put_func.
867 (mface__realize): Adjusted for the change of MFace. Avoid
869 (mface_get_prop): Adjusted for the change of MFace.
870 (mface_put_prop): Likewise.
871 (mface_get_hook): New function.
872 (mface_put_hook): New function.
873 (mface_update): Adjusted for the change of MFace.
875 * input-gui.c (win_callback): Use mplsit_get_func.
876 (minput__win_init): Use mplsit_put_func.
878 * input.c (take_action_list): Use mplist_get_func.
879 (init_ic_info): Likewise.
880 (fini_ic_info): Likewise.
881 (minput_callback): Likewise.
882 (minput__init): Use mplist_put_func.
884 * language.c (mlang__init): Use msymbol_put_func.
886 * m17n-core.h (M17NFunc): New function type.
887 (M17N_FUNC): New macro.
888 (msymbol_put_func, msymbol_get_func): Extern them.
889 (mplist_put_func, mplist_get_func): Extern them.
891 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
893 * m17n-gui.c (mframe): Add a proper casting.
895 * plist.h (struct MPlist): Make the member val a union.
896 (MPLIST_VAL): Adjusted for the above change.
897 (MPLIST_FUNC): New macro.
898 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
900 * plist.c (mplist_put_func, mplist_get_func): New functions.
902 * symbol.c (msymbol__fini): Use MPLIST_VAL.
903 (msymbol_put_func, msymbol_get_func): New functions.
905 * textprop.c (mtext_serialize): Use msymbol_get_func.
906 (mtext_deserialize): Likewise.
908 2007-03-28 Kenichi Handa <handa@m17n.org>
910 * input.c (get_candidate_list): Avoid unnecessary unref.
912 2007-03-23 Kenichi Handa <handa@m17n.org>
914 * database.c (mdatabase__update): Unref plist at the tail.
916 2007-03-21 Kenichi Handa <handa@m17n.org>
918 * input.c (update_custom_info): Fix for the case "name == Mnil &&
920 (config_command): Fix for the case that configuration is
922 (config_variable): Likewise.
923 (minput_config_command): If keyseqlist is an empty list, cancel
925 (minput_config_variable) If value is an empty list, cancel the
927 (minput_save_config): Handle cancellation of config and customize
930 2007-03-15 Kenichi Handa <handa@m17n.org>
932 * input.c (minput_config_variable): Check custom->vars (not
935 2007-03-01 Kenichi Handa <handa@m17n.org>
937 * input.c (reload_im_info): Setup cmds, vars, and title of
939 (check_variable_value): Fix the return value.
941 * database.c (mdatabase__check): If necessary, update database and
944 2007-02-28 Kenichi Handa <handa@m17n.org>
946 * database.c (get_dir_info): Set dir_info->status to
948 (check_version): New function.
949 (register_database): Don't call find_database.
950 (register_databases_in_files): Don't register a database of
952 (mdatabase__update): Likewise. Avoid unnecessary scanning.
954 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
955 and MDB_STATUS_OUTDATED.
957 * font.h (struct MFont): Types of members type, source, and
958 spacing changed to unsigned.
960 * internal-gui.h (struct): Types of members category and type
963 * internal.h (struct MText): Types of members format and coverage
966 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
967 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
969 2007-02-23 Kenichi Handa <handa@m17n.org>
971 * input.c (Mpop): New variable.
972 (fully_initialize): Initialize Mpop.
973 (parse_action_list): Handle Mpop.
974 (take_action_list): Likewise.
975 (handle_key): When a key is unhandled, shift to the initial state
976 only if the current state has no branch action.
978 2007-02-12 Kenichi Handa <handa@m17n.org>
980 * input.c (get_preceding_char): Unref mt if necessary.
981 (get_following_char): Likewise.
982 (parse_action_list): Fix handling of `insert' action as
984 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
985 (take_action_list): Check invalid candidate list.
987 2007-02-06 Kenichi Handa <handa@m17n.org>
989 * input.c (integer_value): Check also ic->produced for @-N.
991 2007-01-26 Kenichi Handa <handa@m17n.org>
993 * database.c (mdatabase__update): Check mdatabase__dir_list from
996 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
998 2007-01-12 Kenichi Handa <handa@m17n.org>
1000 * input.c (handle_key): Handle a branch action of the initial
1003 2007-01-10 Kenichi Handa <handa@m17n.org>
1005 * m17n-gd.c (gd_render): Delete superfluous line.
1007 2006-12-26 Kenichi Handa <handa@m17n.org>
1009 * m17n.h (minput_callback): Extern it.
1011 * input.h (minput__callback): Delte extern.
1013 * input.c (get_surrounding_text): Adjusted for the change of
1014 minput__callback to minput_callback.
1015 (delete_surrounding_text): Likewise.
1016 (minput_create_ic): Likewise.
1017 (minput_destroy_ic): Likewise.
1018 (minput_filter): Likewise.
1019 (minput_set_spot): Likewise.
1020 (minput_toggle): Likewise.
1021 (minput_reset_ic): Likewise.
1023 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
1024 and ic->candidate_to to 0.
1025 (minput_callback): Renamed from minput__callback.
1027 * input-gui.c (win_callback): Adjusted for the change of
1028 minput__callback to minput_callback.
1030 2006-12-15 Kenichi Handa <handa@m17n.org>
1032 * font-ft.c (ft_add_font): Fix typo.
1034 2006-12-06 Kenichi Handa <handa@m17n.org>
1036 * Version 1.3.4 released.
1038 2006-11-16 Kenichi Handa <handa@m17n.org>
1040 * input.c (parse_action_list): Allow (undo 0).
1041 (adjust_markers): New function.
1042 (preedit_insert, preedit_delete): Call adjust_markers.
1043 (preedit_replace): New function.
1044 (update_candidate): Call preedit_replace instead of preedit_insert
1046 (filter): When ic_info->commit_key_head is nonzero, shift input
1047 event keys even if there's no committed text.
1049 2006-11-10 Kenichi Handa <handa@m17n.org>
1051 * input.h (MInputContextInfo): New member commit_key_head.
1053 * input.c (preedit_commit): Update ic_info->commit_key_head.
1054 (take_action_list): Reset ic_info->commit_key_head on Mundo.
1055 (filter): When committed, shift keys by ic_info->commit_key_head.
1057 2006-10-30 Kenichi Handa <handa@m17n.org>
1059 * input.c (preedit_delete): Fix typo.
1060 (take_action_list): Print more debugging information. Allow
1061 variable in arg of 'select' and `pushback'.
1063 * database.c (gen_database_name): Don't put extra space.
1064 (load_database): Print debugging information.
1065 (register_databases_in_files): New arg headlen. Callers changed.
1066 (mdatabase__load_for_keys): Shorten debugging information.
1067 (mdatabase_load): Don't print debugging information here.
1069 2006-10-27 Kenichi Handa <handa@m17n.org>
1071 * input.c (marker_code): New arg surrounding. Callers changed.
1072 (surrounding_pos): Check if name[0] == '@'.
1073 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
1074 (take_action_list): Likewise.
1075 (get_preceding_char): If POS is zero, always call
1076 get_surrounding_text.
1078 2006-10-19 Kenichi Handa <handa@m17n.org>
1080 * input.c (load_variables): Fix setting of `global'.
1082 2006-10-16 Kenichi Handa <handa@m17n.org>
1084 * draw.c (draw_background): Be sure to set *to_x.
1085 (render_glyph_string): If from == to, just return.
1087 2006-10-18 Kenichi Handa <handa@m17n.org>
1089 * database.c (get_dir_info): Return NULL if the directory name is
1091 (register_databases_in_files): Call register_database with
1093 (mdatabase__update): Fix logic. Call register_database with
1095 (mdatabase_define): Call register_database with
1096 MDB_STATUS_EXPLICIT.
1098 * input.c (delete_surrounding_text): Be sure to set members
1099 preceding_text and following_text to NULL.
1100 (shift_state): Save variable values in ic_info->vars_saved.
1101 (preedit_commit): Don't print debug information here. Don't
1102 change ic_info->keys here.
1103 (get_candidate_list): Don't ref plist.
1104 (take_action_list): Don't unref return value of
1105 get_candidate_list. For undo, reset ic->produced and recover
1106 ic_info->vars. Be sure to set ic->candidate_list to NULL after
1108 (init_ic_info): Set ic_info->vars_saved.
1109 (fini_ic_info): Unref ic_info->vars_saved.
1110 (re_init_ic): Be sure to set ic->candidate_list to NULL after
1112 (filter): Be sure to set members preceding_text and following_text
1113 to NULL. Print debug information about produced text. Delete
1114 processed keys from ic_info->keys.
1116 * input.h (MInputContextInfo): New member vars_saved.
1118 2006-10-16 Kenichi Handa <handa@m17n.org>
1120 * database.c (mdatabase__update): Fix the way to get db_info.
1122 2006-10-02 Kenichi Handa <handa@m17n.org>
1124 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
1125 `size' changed to 24.
1127 * font.c (xlfd_unparse_name): Adjusted for the change of
1129 (font_score): Likewise.
1130 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
1132 * m17n-X.c (MFontX, _MFontX): Deleted.
1133 (SET_SIZE, HAVE_SIZE): Deleted.
1134 (free_display_info): Adjusted for the change of
1135 disp_info->font_list format.
1136 (xfont_registry_list): Likewise.
1137 (xfont_open): Likewise.
1138 (xfont_list): Likewise.
1139 (xfont_encode_char): Ignore size to find a realized font.
1140 (MRealizedFontXft): Change the order of members to make it
1141 compatible with MRealizedFontFT.
1143 2006-09-27 Kenichi Handa <handa@m17n.org>
1145 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
1146 (mfont_close): Add comments.
1148 * mtext-lbrk.c (mtext_line_break): Add comment.
1150 2006-09-26 Kenichi Handa <handa@m17n.org>
1152 * input.c (minput_get_description): Handle description about
1153 inclusion-only input methods.
1155 2006-09-21 Kenichi Handa <handa@m17n.org>
1157 * input.c (M_gettext): New variable.
1158 (fully_initialize): Initialize M_gettext.
1159 (check_description): New function.
1160 (load_commands): Call check_description.
1161 (config_all_commands): Be sure to unref pl.
1162 (load_variables): Call check_description.
1163 (config_all_variables): Be sure to unref pl.
1164 (load_im_info): Call check_description.
1166 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
1168 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
1169 and bind_textdomain_codeset.
1171 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
1173 2006-09-15 Kenichi Handa <handa@m17n.org>
1175 * input.c (reload_im_info): Update custom and global info.
1176 (init_ic_info): Fix previous change.
1178 2006-09-14 Kenichi Handa <handa@m17n.org>
1180 * database.c: Include <libgen.h>.
1181 (mdatabase__lock): Make a directory if necessary.
1183 * input.c (resolve_command): Adjusted for the format change of
1184 configured_cmds member.
1185 (load_commands, load_variables): Fix for errornous data handling.
1186 (config_command, config_variable): New function.
1187 (config_all_commands, config_all_variables): Renamed from
1188 config_commands and config_variables. Utilize the above function.
1189 (check_variable_value): Argument changed. Callers changed.
1190 (load_im_info): Call config_all_commands and config_all_variables.
1191 (init_ic_info): Adjusted for the format change of configured_vars
1193 (minput__init): Initialize Mcustomized, Mconfigured, and
1195 (Mcustomized, Mconfigured, Minherited): New variables.
1196 (minput_get_command): Be sure to return NULL if an input method
1197 use no local command.
1198 (minput_get_variable): Be sure to return NULL if an input method
1199 use no local variable.
1200 (minput_config_command, minput_config_variable)
1201 (minput_save_config): Adjusted for the format change of
1202 configured_cmds and configured_vars members.
1204 * plist.c (write_element): Delete superfluous ':'.
1206 2006-09-13 Kenichi Handa <handa@m17n.org>
1208 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
1209 (minput_config_file): Extern it.
1211 * draw.c (Minherited): Declaration moved to input.c.
1212 (mdraw__init): Don't initialize Minherited here.
1214 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
1216 2006-09-07 Kenichi Handa <handa@m17n.org>
1218 * textprop.c (mtext_serialize): Call mplist__serialize with the
1221 * plist.h (mplist__serialize): Prototype adjusted.
1222 (mplist__assq): Extern it.
1224 * plist.c: Include <ctype.h>
1225 (PUTC, PUTS): New macros.
1226 (write_symbol): New function.
1227 (write_element): New arg indent.
1228 (dump_string, dump_plist_element): Delete them.
1229 (mplist__from_string): New arg pretty.
1230 (mplist__assq): New function.
1231 (mdebug_dump_plist): Use write_element.
1233 * mtext.c (mtext_cat_char): Allocate more memory.
1234 (mdebug_dump_mtext): Don't escal a newline character.
1236 * m17n.h (minput_get_command, minput_get_variable)
1237 (minput_config_command, minput_config_variable)
1238 (minput_save_config): Extern them.
1240 * m17n-core.c: Include <string.h>.
1241 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
1242 use the stream stdout instead of a file of that name.
1244 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
1247 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
1248 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1249 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
1250 (MDEBUG_DUMP): Flush the stream.
1252 * input.h (struct _MInputMethodInfo): Delete member im. New
1253 members mdb, language, name, extra, cmds, configured_cmds,
1254 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
1255 (MInputContextInfo): New member tick.
1257 * input.c: Big change to improve user-side input method
1258 customization. Here, list just public API changes.
1259 (minput_get_commands, minput_get_variables)
1260 (minput_assign_command_keys, minput_set_variable): Label them
1262 (minput_get_command, minput_get_variable)
1263 (minput_config_command, minput_config_variable)
1264 (minput_save_config): New functions.
1266 * database.h (PATH_MAX): Define it if not yet defined.
1267 (PATH_SEPARATOR): Likewise.
1268 (enum MDatabaseStatus): New enum.
1269 (struct MDatabaseInfo): Moved from database.c. New members status,
1270 time, lock_file, and uniq_file.
1271 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
1272 (mdatabase__unlock): Extern them.
1274 * database.c: Include <time.h>.
1275 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
1276 (GEN_PATH): Args changed. Callers changed.
1277 (struct MDatabaseInfo): Moved to database.h.
1278 (struct MDatabase, mdb_list): Deleted.
1279 (mdatabase__list): New var.
1280 (get_database_filename): Deleted. Callers changed to use
1282 (find_file, get_database_file): New files.
1283 (get_dir_info): Initialize new members of MDatabaseInfo.
1284 (find_database): Arg chagnded. Callers changed.
1285 (free_db_info, register_database, register_databases_in_files):
1287 (update_database_list): Deleted.
1288 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
1289 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
1290 (mdatabase__update): New function.
1291 (mdatabase__check): Return value changed.
1292 (mdatabase__file, mdatabase__lock, mdatabase__save)
1293 (mdatabase__unlock): New functions.
1295 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
1297 * input.c (get_surrounding_text): Return -2 when surrounding text
1299 (get_following_char): Likewise.
1300 (get_preceding_char): Likewise.
1301 (minput__callback): Return 0 if there is a callback function,
1304 2006-08-17 Kenichi Handa <handa@m17n.org>
1306 * input.c (reset_ic): Use shift_state to setup the current state.
1308 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
1310 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
1311 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
1312 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
1314 2006-08-02 Kenichi Handa <handa@m17n.org>
1316 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
1318 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
1320 * font-ft.c (ft_encapsulate): Add code for debugging.
1321 (mfont__ft_drive_otf): Be sure to encode character before getting
1324 2006-07-21 Kenichi Handa <handa@m17n.org>
1326 * draw.c (mdraw_text_extents): Fix previous typo.
1328 2006-07-19 Kenichi Handa <handa@m17n.org>
1330 * draw.c (gstring_width): New arg lbearing.
1331 (render_glyph_string): Adjusted for the change of gstring_width.
1332 (mdraw_text_extents): Fix lbearing of ink and line metrics.
1334 * m17n-core.h (Mlanguage): Extern it.
1336 * m17n.h (Mlanguage): Extern deleted.
1338 * mtext.c (mtext__init): Initialize Mlanguage.
1339 (Mlanguage): Declaration moved from locale.c
1341 * locale.c (mlocale__init): Don't initialize Mlanguage here.
1342 (Mlanguage): Declaration moved to mtext.c.
1344 * language.c (mlang__init): Don't initialize Mlanguage here.
1346 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
1348 2006-07-14 Kenichi Handa <handa@m17n.org>
1350 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
1351 (MRealizedFontFT): New member face_encapsulated.
1352 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
1353 (ft_gen_font): New function.
1354 (ft_add_font): Use ft_gen_font.
1355 (ft_list_script): Store lists in ft_script_list.
1356 (ft_check_otf): New arg ft_face. Caller changed.
1357 (ft_check_language): Likewise.
1358 (ft_check_script): Likewise.
1359 (ft_encapsulate, ft_close): New functions.
1360 (mfont__ft_driver): Initialize members encapsulate and close.
1361 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
1363 * font.h (struct MRealizedFont): New member encapsulating.
1364 (struct MFontDriver): New members encapsulate and close.
1366 * font.c (mfont__match_p): If FONT is realized, check capability
1367 by font drivers's check_capability method.
1368 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
1371 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
1372 declarations of foundry and fam local vars.
1373 (xft_driver): Make it static.
1375 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
1376 (mfont_close): Extern them.
1378 * m17n-gd.c (device_open): Don't specify foundry and family of the
1381 2006-07-11 Kenichi Handa <handa@m17n.org>
1383 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
1385 2006-07-13 Kenichi Handa <handa@m17n.org>
1387 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
1389 (ft_check_script): Delete unused var.
1390 (ft_list_capability): Likewise.
1392 * font.c (mfont__get_capability): Setup cap->otf.
1393 (Motf): Make it global.
1394 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
1396 * font.h (MFontCapability): New member otf.
1398 * language.c (mlang__fini): Delete unused vars.
1400 * m17n-gui.h (Motf): Extern it.
1402 * database.c (update_database_list): Delete unused vars.
1404 2006-07-07 Kenichi Handa <handa@m17n.org>
1406 * font-ft.c (DEVICE_DELTA): Fix typo.
1408 2006-07-06 Kenichi Handa <handa@m17n.org>
1410 * fontset.c (mfont__lookup_fontset): Don't ignore family and
1413 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1415 * database.c: Update comments.
1417 2006-07-05 Kenichi Handa <handa@m17n.org>
1419 * database.c (PATH_MAX): Define it if not yet defined.
1420 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
1422 (get_database_filename): Use GEN_PATH.
1423 (get_dir_info): Don't include the last '/' in directory name.
1424 (register_database): New function.
1425 (update_database_list): Use register_database. Search all
1426 directories in mdatabase__dir_list for wildcard databases.
1427 (mdatabase__init): Check "~/.m17n.d".
1429 2006-07-03 Kenichi Handa <handa@m17n.org>
1431 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
1432 push reverse property.
1434 * plist.c (dump_plist_element): Fix previous change.
1436 2006-06-28 Kenichi Handa <handa@m17n.org>
1438 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
1441 * draw.c (MbidiNSM): New variable.
1442 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
1443 attention to bidi type NSM.
1444 (mdraw__init): Initialize MbibiNSM.
1446 * language.c (mscript__char_list): Fix finding a char-list element.
1448 * plist.c (dump_string): Return number of printed characters.
1449 (dump_plist_element): Print elements more compactly.
1451 2006-06-23 Kenichi Handa <handa@m17n.org>
1453 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
1454 (include_HEADERS): Likewise.
1456 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
1458 * language.c: Update documentation.
1460 2006-06-23 Kenichi Handa <handa@m17n.org>
1462 * font-ft.c (struct MFontFT): Delete member lang.
1463 (free_ft_info): Don't unref member lang. Destroy members langset
1465 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
1466 changed. Set members langset and charset.
1467 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
1469 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
1471 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
1472 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
1473 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
1474 characters at first. If it fails, try listing by language names.
1475 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
1476 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
1477 change of MFontCapability.
1478 (ft_list_capability): Likewise. Try listing by languages, then by
1479 scripts. Check OTF at last.
1480 (ft_check_script): New function.
1481 (ft_select): Adjusted for the check of MFontCapability.
1482 (ft_list_family_names): New function.
1483 (ft_check_capability): If cap->script is not Mnil, call
1485 (mfont__ft_driver): Initialize with ft_list_family_names.
1487 * font.h (struct MFontDriver): New member list_fmaily_names.
1488 (struct): Change member "MSymbol *lang" to "MSymbol language".
1490 * font.c: Include "language.h".
1491 (Motf): New variable.
1492 (otf_script_list, load_otf_script_list): Delete it.
1493 (find_script_from_otf_tag): Delete it.
1494 (merge_capability): New function.
1495 (mfont__init): Init Motf.
1496 (mfont__fini): Don't unref otf_script_list.
1497 (free_font_capability): Check cap->script_tag to determine if
1498 OTF-related capability is set.
1499 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
1500 the change of type MFontCapability.
1501 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
1502 and Motf properties.
1503 (mfont_list): Call merge_capability for LANGUAGE arg.
1504 (mfont_list_family_names): New function.
1506 * input-gui.c: Typo in comments fixed.
1508 * input.c: Typo in comments fixed.
1510 * language.h (mlanguage__list): Delete it.
1511 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
1514 * language.c: Include "mtext.h".
1515 (M_script_lang_list): Delete it.
1516 (language_list, script_list): New variables.
1517 (load_lang_script_list, init_language_list, init_script_list): New
1519 (mlang__init): Don't load language database here.
1520 (mlang__fini): Unref language_list and script_list if not NULL.
1521 (mlanguage__list): Delete it.
1522 (mlanguage__info, mscript__info, mscript__char_list)
1523 (mscript__otf_tag, mscript__from_otf_tag): New functions.
1524 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
1525 (mscript_list, mscript_language_list): New functions.
1527 * m17n-gui.h (mfont_list_family_names): Extern it.
1529 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
1530 (mlanguage_text, mscript_list, mscript_language_list): Extern
1533 2006-06-21 Kenichi Handa <handa@m17n.org>
1535 * m17n-X.c (xfont_driver): Initialize with
1536 xfont_list_family_names.
1537 (xfont_list_family_names): New function.
1538 (xft_driver): Initialize with NULL for list_family_names member.
1539 (device_init): Set list_family_names member of xft_driver to that
1540 of mfont__ft_driver.
1542 2006-06-06 Kenichi Handa <handa@m17n.org>
1544 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
1546 2006-03-24 Kenichi Handa <handa@m17n.org>
1548 * font-ft.c (ft_open): Improve debug message.
1550 * fontset.c (mfontset__get_font): Fix for the case that no font in
1551 per_script list is available.
1553 2006-02-06 Kenichi Handa <handa@m17n.org>
1555 * Version 1.3.3 released.
1557 2006-02-22 Kenichi Handa <handa@m17n.org>
1559 * textprop.c: Fix some typos in documentation.
1561 * plist.c: Fix some typos in documentation.
1563 * m17n-core.h: Fix some typos in documentation.
1564 (M17NLIB_PATCH_LEVEL): Updated to 3.
1565 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
1567 * symbol.c: Fix some typos in documentation.
1569 * mtext.c: Fix some typos in documentation.
1571 * input.c: Fix several typos in documentation.
1573 2006-02-06 Kenichi Handa <handa@m17n.org>
1575 * Version 1.3.2 released.
1577 2006-02-03 Kenichi Handa <handa@m17n.org>
1579 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
1580 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
1582 * font.c (xlfd_parse_name): Fix handling of the name "nil".
1584 * draw.c (layout_glyphs): Fix handling left_padding of
1587 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
1589 2006-02-02 Kenichi Handa <handa@m17n.org>
1591 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
1592 if WITH_GUI is true.
1594 2006-01-25 Kenichi Handa <handa@m17n.org>
1596 * input.c (resolve_expression): If the value of PLIST is a plist,
1597 but the first element is not symbol, return 0.
1599 2006-01-17 Kenichi Handa <handa@m17n.org>
1601 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
1602 HAVE_GD is 2 or the greater.
1604 2006-01-16 Kenichi Handa <handa@m17n.org>
1606 * Version 1.3.1 released.
1608 2006-01-16 Kenichi Handa <handa@m17n.org>
1610 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
1611 simulating anti-aliasing.
1613 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
1614 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
1616 2006-01-12 Kenichi Handa <handa@m17n.org>
1618 * input.c (get_surrounding_text): Always pop ic->plist.
1619 (reset_ic): Don't reset ic->plist.
1621 2006-01-10 Kenichi Handa <handa@m17n.org>
1623 * input.c (preedit_commit): For debugging, print only commiting
1624 charactes. Don't set ic->candidate_show to 0.
1625 (handle_key): Don't run branch-actions just by shifting to the
1627 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
1628 Reset vars and plist.
1630 2006-01-07 Kenichi Handa <handa@m17n.org>
1632 * input.c (load_branch): Confirm that maps is not NULL.
1634 2006-01-05 Kenichi Handa <handa@m17n.org>
1636 * input-gui.c (win_filter): Try to convert arg to key only when
1639 * plist.c (read_integer_element): If '#' and '-' are followed by
1640 non-integer-constituent, read them as a part of a symbol.
1641 (read_symbol_element): New arg C.
1642 (read_element): Adjust args to read_symbol_element.
1644 * input.c (load_macros): On overwriting a macro, free the old
1646 (minput__init): Store Mmap in load_im_info_keys.
1647 (minput_get_title_icon): If the input method has no title, be sure
1649 (minput_get_description): If the input method has no description,
1650 be sure to return NULL.
1651 (minput_get_variables): Fix documentation.
1652 (handle_key): Pay attention to the case that key is Mnil.
1653 (filter): Likewise. Fix handling of such symbol as S-A.
1655 2005-12-22 Kenichi Handa <handa@m17n.org>
1657 * Version 1.3.0 released.
1659 2005-12-22 Kenichi Handa <handa@m17n.org>
1661 * font-ft.c (ft_list): If the specified font has no property,
1664 2005-12-20 Kenichi Handa <handa@m17n.org>
1666 * character.c (mchar_get_prop): Check char_prop_list.
1667 (mchar_put_prop, mchar_get_prop_table): Likewise.
1669 2005-12-18 Kenichi Handa <handa@m17n.org>
1671 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
1672 file name sans language.
1674 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
1676 * input.c: Fix typo in comments.
1678 2005-12-14 Kenichi Handa <handa@m17n.org>
1680 * input.c (minput_get_title_icon): Check the default icon for the
1683 2005-12-13 Kenichi Handa <handa@m17n.org>
1685 * input.c (Mless_equal, Mgreater_equal): New variables.
1686 (parse_expression, resolve_expression, parse_action_list)
1687 (take_action_list): Handle the aboves.
1688 (filter): Treat key S-X as X.
1689 (minput__init): Initialize Mless_equal and Mgreater_equal.
1690 (minput_get_title_icon): New function.
1692 * m17n.h (minput_get_title_icon): Extern it.
1694 * database.c (get_database_filename): Return a filename instead of
1696 (load_database): Adjusted for the above change.
1697 (mdatabase__load_for_keys): Likewise.
1698 (mdatabase__find_file): New function.
1700 * database.h (mdatabase__find_file): Extern it.
1702 * font.h (mfont__resize): Delete extern.
1704 * font.c (mfont__list): Check resize ratio.
1705 (mfont__resize): Delete it.
1706 (mfont_resize_ratio): Include the code of mfont__resize.
1708 * font-ft.c (ft_open): Check resize ratio.
1710 * m17n-X.c (xfont_open): Check resize ratio.
1711 (xft_open): Likewise.
1713 2005-12-07 Kenichi Handa <handa@m17n.org>
1715 * input.c (take_action_list): If take_action_list return -1,
1717 (handle_key): Likewise.
1719 * face.c (mface__for_chars): When font is specified and layouter
1720 is found for it, if the layouter doesn't support one of a
1721 character, use a face sans layouter for it.
1723 2005-12-06 Kenichi Handa <handa@m17n.org>
1725 * fontset.c (mfont__lookup_fontset): If only a fallback font is
1726 found, don't use it for more than one character.
1728 2005-12-05 Kenichi Handa <handa@m17n.org>
1730 * face.c (mface__realize): Set rfont->layouter to Mnil.
1731 (mface__for_chars): Fix handling of layouter.
1733 * character.h (mchar__define_prop): Extern it.
1735 * database.c (update_database_list): Call mchar__define_prop if
1738 * character.c (mchar__init): Don't call mchar_define_property.
1739 Instead just initialize property keys.
1740 (mchar__fini): Free char_prop_list only if it's not NULL.
1741 (mchar__define_prop): New function.
1742 (mchar_define_property): Call mchar__define_prop.
1744 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
1747 2005-12-02 Kenichi Handa <handa@m17n.org>
1749 * language.c (mlang__init): Handle extra chars.
1751 * m17n-gui.h (mfont_check): Adjust prototype.
1753 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
1754 (xfont_check_capability): New function.
1755 (xft_driver): Specify xft_check_capability.
1756 (xft_check_capability): New function.
1758 * font-ft.c (M0_3): Delete it.
1760 (ft_get_charmaps): Refer to M0.
1761 (fc_parse_pattern): Fix previous change.
1762 (ft_list_language): Check also extra chars.
1763 (ft_check_otf): Define it even if HAVE_OTF is undef.
1764 (ft_check_lang): Check the result of FcLangSetHasLang against
1765 FcLangDifferentLang. Check also extra chars.
1766 (ft_list_capability): Delete ifdef HAVE_OTF.
1767 (ft_select): Likewise.
1768 (ft_open): Improve debug information.
1769 (ft_check_capability): New function.
1770 (mfont__ft_driver): Specify ft_check_capability.
1771 (mfont__ft_init): Initialize M0.
1773 * fontset.c (get_font_from_group): New function.
1774 (mfontset__get_font): New function.
1776 * fontset.h (mfontset__get_font): Extern it.
1778 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
1779 (mfont__fini): Delete ifdef HAVE_OTF.
1780 (free_font_capability): Likewise.
1781 (mfont__get_capability): Likewise.
1782 (mfont__check_capability): New function.
1783 (mfont_check): Change the order of arguments. Use
1786 * font.h (struct MFontDriver): New member check_capability.
1787 (MFontCapability): Delete ifdef HAVE_OTF.
1788 (mfont__check_capability): Extern it.
1790 * face.c (mface__realize): Fix handling of FONT arg.
1791 (mface__for_chars): Fix handling of explicitly specified font.
1793 2005-11-25 Kenichi Handa <handa@m17n.org>
1795 * font-flt.c (run_command): Print debug info for
1798 * draw.c (layout_glyphs): Fix handling of left/right_padding.
1800 * face.c (mface__for_chars): Check rfont before accessing the
1803 2005-11-21 Kenichi Handa <handa@m17n.org>
1805 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
1808 * fontset.c (fontset_table): New variable.
1809 (free_fontset): Call M17N_OBJECT_UNREGISTER.
1810 (mfont__fontset_init): Add fontset_table as an object array.
1811 (mfont__realize_fontset): Ref FONTSET.
1812 (mfont__free_realized_fontset): Unref REALIZED->fontset.
1813 (mfontset): Call M17N_OBJECT_REGISTER.
1814 (mfontset_copy): Likewise.
1816 * input.c (handle_key): For debugging, print information about
1818 (filter): Add an alias for Meta and Alt modifiers.
1819 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
1821 (minput__init): Initialize them.
1822 (parse_expression): New function.
1823 (resolve_expression): New function.
1824 (parse_action_list): Handle expressions by parse_expression.
1825 (take_action_list): Handle expressions by resolve_expression.
1826 (parse_nested_list_value): Fix previous change.
1827 (resolve_command): Fix handling of the return value of
1830 2005-11-18 Kenichi Handa <handa@m17n.org>
1832 * font-ft.c (ft_check_otf, otf_script_list): Define only when
1833 HAVE_OTF is defined.
1834 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
1836 (ft_select): Likewise.
1838 * font.c (mfont_list): Fix for the case that FONT is NULL.
1839 (OTF_tag): Delete it.
1840 (load_otf_script_list): Define only when HAVE_OTF is defined.
1841 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
1844 * draw.c (truncate_gstring): Be sure to truncate at
1845 glapheme-cluster boundary.
1847 2005-11-11 Kenichi Handa <handa@m17n.org>
1849 * input.c (delete_surrounding_text): Clear cache if necessary.
1851 2005-11-09 Kenichi Handa <handa@m17n.org>
1853 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
1854 glyph prev is also supported by the current flt.
1856 2005-11-08 Kenichi Handa <handa@m17n.org>
1858 * m17n-X.c (xft_render): Cancel previous change.
1860 2005-11-07 Kenichi Handa <handa@m17n.org>
1862 * input.c: Include <stdlib.h>.
1863 (get_surrounding_text, delete_surrounding_text)
1864 (get_preceding_char, get_following_char): New functions.
1865 (integer_value): New arg surrounding. If it is nonzero, try to
1866 get a surrounding character. Callers changed.
1867 (take_action_list): Check `value' before setting an element.
1868 (destroy_ic): Unref ic_info->preceding_text and
1869 ic_info->following_text.
1870 (minput__init): Initialize Minput_get_surrounding_text and
1871 Minput_delete_surrounding_text.
1872 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
1874 (filter): Unref ic_info->preceding_text and
1875 ic_info->following_text.
1877 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
1880 * input.h (MInputContextInfo): New members preceding_text and
1883 2005-11-04 Kenichi Handa <handa@m17n.org>
1885 * input.c (parse_nested_list_value): Fix handling of the global
1887 (get_nested_list): Get global definitions by load_partial_im_info.
1888 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
1889 MInputCandidatesChanged.
1890 (take_action_list): Likewise.
1891 (reset_ic): Likewise.
1892 (create_ic): Don't pay special attention to
1893 Mcandidates_group_size.
1894 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
1895 (minput_set_variable): Get a definition of varible by
1896 mplist_find_by_value, not mplist_get.
1898 * m17n.h (enum MInputCandidatesChanged): New enum.
1900 2005-11-01 Kenichi Handa <handa@m17n.org>
1902 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
1904 (mwin__destroy_window): If xft_draw's drawable is win, change it
1905 to device->drawable before destroying win.
1907 2005-10-31 Kenichi Handa <handa@m17n.org>
1909 * input.c (load_im_info): Fix adding of state.
1911 * m17n-core.c (m17n_fini_core): Fix reporting of module
1914 * m17n.c (m17n_fini): Fix reporting of module finalization.
1916 * m17n-gui.c (m17n_init_win): Fix reporting of module
1919 2005-10-29 Kenichi Handa <handa@m17n.org>
1921 * input.c (get_candidate_list): Fix the timing of referring plist.
1923 2005-10-28 Kenichi Handa <handa@m17n.org>
1925 * input.c (load_branch): Ignore an undefined map name.
1926 (load_im_info): Set im_info->title from `name' only if it's not
1928 (shift_state): Always update ic->status.
1929 (adjust_candidates): Renamed from adjust_candidate_command.
1930 Argument changed. Caller changed.
1931 (get_candidate_list, regularize_action): New functions.
1932 (take_action_list): Use them. On handling Munhandle, don't set
1934 (handle_key): If KEY is not handled by MAP, and MAP has
1935 branch_actions, perform them.
1937 * database.c (mdatabase__fini): Free dir_info->filename;
1939 2005-10-20 Kenichi Handa <handa@m17n.org>
1941 * input.c (marker_code): Accept '@@'.
1942 (integer_value): Handle '@@'.
1943 (parse_action_list): Accept a symbol argument.
1944 (take_action_list): Resolve the symbol argument. Handle the
1947 2005-10-18 Kenichi Handa <handa@m17n.org>
1949 * input.c: Include "charset.h".
1950 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
1952 (MIMState): New member (M17NObject control).
1953 (lookup_nested_list, set_nested_list, parse_nested_list_value)
1954 (get_nested_list, resolve_variable): New functions.
1955 (integer_value): New arg (MPlist **value). Set it to the plist
1956 element containing the value.
1957 (resolve_command): New function.
1958 (load_translation): New arg (MPlist *map_actions).
1959 (load_branch): New args language and name. If `keylist' is a
1960 symbol, resolved that as a command name.
1961 (free_map): New arg top. Free map->map_actions only if top is
1963 (free_state): New function.
1964 (load_state): New arg name.
1965 (im_info_list): New variable.
1966 (free_im_info, get_im_info_by_tags): New functions.
1967 (load_im_info): Arg key changed to plist. Handle `include'.
1968 Return (MInputMethodInfo *).
1969 (preedit_commit): Ref ic->candidate_list.
1970 (get_select_charset, adjust_candidate_command): New functions.
1971 (take_action_list): Handle `include'. Adjust candidate action
1972 properly. Handle control variables `candidates-charset' and
1973 `candidates-group-size'.
1974 (open_im): Use get_im_info.
1975 (create_ic): Get global variables.
1976 (load_partial_im_info): New function.
1977 (get_im_info): New function.
1978 (check_command_keyseq, check_command_list, check_variable_list):
1980 (minput__init): Don't handle M_database_hook and Mdetail_text.
1981 Initialize M_candidates, Mcandidates_group_size,
1982 Mcandidates_charset.
1983 (parse_variable_list, get_variable_list, parse_command_list)
1984 (get_command_list): Delete them.
1985 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
1986 (minput__fini): Simply unref command_list and variable_list.
1987 (minput_get_description): Adjusted for the new form of description.
1988 (minput_get_commands): Use get_nested_list.
1989 (minput_assign_command_keys): Likewise.
1990 (minput_get_variables, minput_set_variable): Likewise.
1992 * input.h (MInputMethodInfo): New members im and maps.
1994 * database.h (M_database_hook): Delete extern.
1995 (MDatabaseHookFunc): Delete extern.
1996 (mdatabase__check): Extern it.
1998 * database.c: Include <glob.h>.
1999 (MAX_TIME): New macro.
2000 (Masterisk): New variable.
2001 (get_database_stream): Argument changed to (MDatabaseInfo *).
2003 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
2004 (find_database): New function.
2005 (update_database_list): New function.
2006 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
2007 calling update_database_list.
2008 (mdatabase__check): New function.
2009 (mdatabase_find): Use update_database and find_database. Don't
2010 handle MDatabaseHookFunc.
2011 (mdatabase_list): Call update_database at first.
2012 (mdatabase_define): Adjusted for the change of mdb->extra_info.
2013 (MDatabaseList): New type.
2015 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
2017 * m17n.h (Mdetail_text): Delete extern.
2019 * m17n-core.h (mplist_conc): Delete extern.
2021 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
2023 (mplist_conc): Renamed to mplist__conc.
2024 (mplist__pop_unref): New function.
2026 2005-10-14 Kenichi Handa <handa@m17n.org>
2028 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
2030 (read_element): If keys is an empty plist, return any element
2032 (dump_plist_element): Check if plist is nested.
2033 (mplist_conc): Always ref tail.
2034 (mplist_set): If key is a managing key, ref val in advance.
2036 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
2037 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
2038 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
2041 * fontset.c (free_fontset): Unref fontset_list if necessary.
2042 (mfont__fontset_fini): Don't free fontset_list. Unref
2044 (mfont__realize_fontset): Initialize request.
2045 (mfontset): Ref default_fontset or fontset only if necessary.
2046 (mfontset_copy): Don't ref copy.
2048 * draw.c (render_glyphs): Check gend->type before checking
2051 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
2052 unrefed plists to NULL.
2054 2005-10-04 Kenichi Handa <handa@m17n.org>
2056 * textprop.c (mtext_serialize): Be sure to make mt
2057 MTEXT_FORMAT_UTF_8 and NULL terminated.
2059 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
2061 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
2063 2005-10-03 Kenichi Handa <handa@m17n.org>
2065 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
2066 is not at the beginning of line.
2068 2005-09-22 Kenichi Handa <handa@m17n.org>
2070 * input.c: Include <sys/stat.h> and <unistd.h>.
2071 (Minclude, Mcommit, Munhandle): New variables.
2072 (minput__init): Initialize them. Push only Mstate to
2073 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
2074 (parse_action_list): Allow integer arg for undo. Handle Mcommit
2076 (load_input_method): Handle "include" directive. If no states are
2078 (shift_state): If state_name is Mt, shift back to the previous
2079 state. Call preedit_commit to commit preedit text.
2080 (preedit_commit): New function.
2081 (take_action_list): Improve debug printing. Handle commit and
2083 (handle_key): Check the return value of take_action_list. Don't
2084 take branch_actions just after changing to the root map.
2085 (reset_ic): Reset all ic_info members.
2086 (filter): When a key is not handled, just move ic_info->keys
2087 instead fo calling reset_ic.
2088 (load_im_info): If key is not Mstate, push Mmap to
2090 (MDatabaseStatList): New type.
2091 (imdir_stat_list): New variable.
2092 (input_method_hook): Don't cancel the hook. Check the
2093 modification time of directories.
2094 (minput__fini): Free imdir_stat_list;
2096 * input.h (MInputContextInfo): New member prev_state.
2098 * m17n-core.h (mplist_conc): Extern it.
2100 * plist.c (mplist_conc): New function.
2102 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
2104 * font.h (MRealizedFont): New member average_width.
2106 * font-ft.c (ft_open): Set rface->average_width.
2108 * font.c (xlfd_unparse_name): Print '*' before registry name.
2110 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
2111 (xfont_open): Set rfont->average_width.
2112 (xft_open): Likewise.
2113 (device_open): Initialize disp_info->AVERAGE_WIDTH.
2115 * internal-gui.h (struct MFrame): New member average_width.
2117 * m17n-gui.c (mframe): Fix setting of frame->rfont.
2118 (mframe_get_prop): Return the average_width of a font.
2120 * face.c (mface__realize): Set rface->average_width.
2121 (mface__update_frame_face): Set frame->average_width.
2123 * face.h (MRealizedFace): New member average_width.
2125 2005-09-19 Kenichi Handa <handa@m17n.org>
2127 * font.c (xlfd_unparse_name): New arg full_xlfd.
2128 (mfont__encode_char): Use shortcut only for X core fonts.
2129 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
2130 (mfont_put_prop): Handle `language' property.
2131 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
2132 Print file can capability info too.
2134 * m17n-core.c (mdebug__output): New variable.
2135 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
2136 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
2137 (m17n_fini_core): Close mdebug__output if it's not stderr.
2139 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
2140 (xfont_open): Handle baseline_offset.
2141 (xfont_find_metric): Likewise.
2142 (xfont_render): Likewise.
2143 (xft_open): Likewise.
2144 (xft_render): Likewise.
2146 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
2147 (mdebug__output): Extern it.
2148 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
2149 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
2150 (MDEBUG_DUMP): New macro.
2151 (MDEBUG_PRINT_TIME): Print to medebug__output.
2153 * font.h (MRealizedFont): New member baseline_offset.
2155 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
2157 (fc_weight_table): Add FC_WEIGHT_REGULAR.
2158 (ft_list_family): Check alias.
2159 (ft_list_language): If language is "en", don't try to the second
2161 (ft_default_list): New variable.
2162 (ft_list_default): New function.
2163 (ft_select): If family is not specified, try only the default
2164 fonts. Treat the weights normal and medium same.
2165 (ft_open): Fix debug message. If registry is not specified, try
2166 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
2167 (ft_find_metric): Likewise.
2168 (ft_render): Likewise.
2169 (ft_list): Fix debug message. Accept the registring iso8859-1.
2170 If family is not specified, try only the default fonts.
2172 * face.c (mface__realize): Fix logic of opening a font.
2174 2005-09-16 Kenichi Handa <handa@m17n.org>
2176 * face.c (mface__realize):
2178 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
2181 * input.c (shift_state): Fix the condition of taking init actions.
2182 (take_action_list): Fix handling of pushback action.
2183 (handle_key): Don't change key while checking its alias.
2184 (minput__init): Initialize new variables.
2185 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
2188 2005-09-12 Kenichi Handa <handa@m17n.org>
2190 * mtext.c (mtext__uppercase): Add proper open/close parens.
2191 (mtext_titlecase): Add proper casting.
2193 * input.c (parse_action_list): Handle the case that the arg is a
2194 key sequence (MText or MPlist).
2195 (take_action_list): Likewise.
2196 (shift_state): Shorter debug message.
2197 (handle_key): Terminate a debug message by "\n".
2198 (reset_ic): Don't take initial actions here.
2199 (minput_open_im): Print a debug message.
2200 (minput_close_im): Likewise.
2201 (minput_create_ic): Likewise.
2202 (minput_destroy_ic): Likewise.
2204 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
2206 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
2209 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
2210 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
2213 * character.c: Add Japanese documentation for
2214 mchar_get_prop_table ().
2216 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
2218 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
2219 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
2220 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
2222 (init_case_conversion): New function.
2223 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
2224 (uppercase_precheck, lowercase_precheck, final_sigma)
2225 (after_soft_dotted, more_above, before_dot, after_i)
2226 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
2228 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
2230 * plist.c (read_mtext_element): Fix previous change.
2232 2005-09-05 Kenichi Handa <handa@m17n.org>
2234 * plist.c (read_mtext_element): Handle \uXXXX notation.
2236 * internal.h (MTABLE_MALLOC): Don't use a local variable.
2237 (MTABLE_ALLOCA): Change the name of local variable.
2239 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
2240 HAVE_FREETYPE are defined.
2242 * m17n-X.c: Check HAVE_X11.
2244 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
2245 directory listing libraries.
2246 (noinst_PROGRAMS): Define it only in maintainer mode.
2248 2005-09-02 Kenichi Handa <handa@m17n.org>
2250 * m17n-gui.h (mdraw_line_break_option): Extern it.
2252 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
2253 end of the first glyph.
2254 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
2256 (mdraw_line_break_option): New variable.
2257 (mdraw_default_line_break): Use mtext_line_break.
2259 * mtext.h (wordseg_func_table): Don't extern it.
2260 (mtext__wseg_fini): Extern it.
2262 * mtext.c: Don't include word-thai.h.
2263 (wordseg_func_table): Delete this variable.
2264 (mtext__init): Don't initialize above. Don't call
2265 mtext__word_thai_init.
2266 (mtext__fini): Don't free wordseg_func_table. Call
2267 mtext__wseg_fini instead fo mtext__word_thai_fini.
2268 (MTextWordsegFunc): Don't typedef it.
2269 (mtext__word_segment): Moved to mtext-wseg.c.
2271 * m17n-core.h (enum MTextLineBreakOption): New enum.
2272 (mtext_line_break): Extern it.
2274 * mtext-wseg.c: New file.
2276 * mtext-lbrk.c: New file.
2278 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
2279 add mtext-lbrk.c and mtext-wseg.c.
2281 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
2282 the case that head is NULL.
2284 2005-09-01 Kenichi Handa <handa@m17n.org>
2286 * word-thai.c (wordseg_propertize): If the property value is nil,
2287 don't make the property no-merge.
2288 (thai_wordseg): Don't require *from and *to are set a priori. Pay
2289 attention to the case that they are NULL.
2290 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
2293 * character.c (mchar_get_prop_table): New function.
2295 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
2297 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
2298 (mchar_get_prop_table): Extern it.
2300 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
2301 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
2303 * internal.h (enum MTextCoverage): New enum.
2304 (MText): New member coverage.
2306 * mtext.c (FORMAT_COVERAGE): New macro.
2307 (insert): Copy mt2->coverage.
2308 (mtext__from_data): Initialize mt->coverage.
2309 (mtext__adjust_format): Update mt->coverage.
2310 (mtext): Initialize mt->coverage.
2311 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
2312 Update mt->coverage if necessary.
2313 (mtext_duplicate): Copy mt->coverage.
2314 (mtext_insert, mtext_replace): New functions.
2315 (mtext_dup): Use mtext_duplicate.
2316 (mtext__word_segment): Don't set *from and *to if a word
2317 segmentation funcion is not found.
2318 (mtext_ins_char): Fix typo.
2320 2005-08-25 Kenichi Handa <handa@m17n.org>
2322 * font.h (MFont): New member for_full_width.
2324 * font.c (compare_font_score): Prefer a font of not
2327 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
2328 registry charset of a font is one of CJK charsets.
2330 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
2331 supports some of CJK.
2333 2005-08-24 Kenichi Handa <handa@m17n.org>
2335 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
2337 * m17n-gui.c (null_device_open): Check Mresolution param and set
2340 * m17n-gd.c (device_open): Check Mresolution param and set
2343 * m17n-X.c (MWDevice): New member resy.
2344 (xfont_open): Set ascent, descent, and max_advance members of
2346 (xft_open): Likewise.
2347 (device_open): Compare also screen_num to find a device. Set
2348 device->resy and frame->dpi.
2350 * internal-gui.h (MFrame): New member dpi.
2352 * font.h (MRealizedFont): New member max_advance.
2354 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
2355 (mfont__init): Don't initialize Mascent, Mdescent.
2356 (Mascent, Mdescent): Delete these variables.
2357 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
2358 Mfont_descent instead of Mascent and Mdescent.
2359 (mfont_put_prop): Allow negative size.
2360 (mfont_find): Handle the case of spec->size < 0. Fix previous
2362 (mfont_list): Handle the case of spec->size < 0.
2363 (mfont_check): Likewise.
2365 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
2366 (fc_get_pattern): Handle the case of font->size < 0.
2367 (ft_open): Set ascent, descent, and max_advance members of rfont.
2368 (ft_find_metric): Improve rounding.
2369 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
2372 * face.c (mface__realize): Handle the case of font->size < 0.
2374 2005-08-22 Kenichi Handa <handa@m17n.org>
2376 * coding.c (MConverterStatus): Change the member buf to union.
2377 (mconv_buffer_converter): Add const to the arg buf.
2378 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2379 (mconv_decode): Adjusted for the change of MConverterStatus.
2380 (mconv_encode_range): Likewise.
2382 * m17n.h (mconv_buffer_converter): Prototype adjusted.
2383 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2385 2005-08-20 Kenichi Handa <handa@m17n.org>
2387 * m17n-gui.h (mfont_from_name): Prototype adjusted.
2388 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
2390 * m17n-X.c (xfont_open): Set members ascent, descent, and
2391 max_advance of rfont.
2392 (xft_open): Likewise.
2394 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
2396 (mfont__ft_parse_name): Add const to the arg name.
2398 * font.c (xlfd_parse_name): Add const to the arg name. Call
2399 mfont__set_property instead of mfont_set_spec. Set font->spacing.
2400 (xlfd_unparse_name): Handle spacing.
2401 (mfont__init): Initialize new variables.
2402 (mfont__id): Handle spacing.
2403 (mfont__merge): Likewise.
2404 (mfont__set_spec): This function deleted.
2405 (mfont__parse_name_into_font): Add const to the arg name. Fix the
2406 condition of calling mfont__ft_parse_name.
2407 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
2408 (mfont_get_prop): Handle properties spacing, ascent, descent,
2410 (mfont_find): Return a realized font.
2411 (mfont_from_name): Add const to the arg name.
2413 * font.h (enum MFontProperty): New member MFONT_SPACING.
2414 (enum MFontSpacing): New enum.
2415 (MFont): New members spacing and max_advance.
2416 (mfont__ft_parse_name): Prototype adjusted.
2417 (mfont__set_spec): Extern deleted.
2418 (mfont__parse_name_into_font): Prototype adjusted.
2420 2005-08-19 Kenichi Handa <handa@m17n.org>
2422 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
2424 * font.c (mfont_list): If FONT is null, use a temporary font.
2425 (mfont_parse_name): Add const to the arg name.
2427 2005-08-18 Kenichi Handa <handa@m17n.org>
2429 * word-thai.c: Surround code by #ifdef and #endif to escape from
2432 * font-ft.c: Mostly re-written.
2434 * font-flt.c (FontLayoutCmdOTF): This type deleted.
2435 (FontLayoutCmd): Type of the member otf changed..
2436 (load_otf_command): Adjusted for the format change of otf command.
2437 (load_command): Likewise.
2438 (free_flt_command): Unref cmd->body.otf.
2439 (run_otf): Ajusted for the type change of otf_cmd.
2440 (run_command): Ajusted for the type change of otf_cmd. On
2441 debugging, print ctx->combining_code.
2442 (mfont__flt_run): Initialize ctx's members code_offset,
2443 combining_code, and left_padding to 0.
2445 * face.h (struct MRealizedFace): New member font.
2446 (mface__realize): Prototype adjusted.
2448 * face.c (find_realized_face): New arg font.
2449 (find_realized_face): Adjusted for the change of MFont.
2450 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
2451 (mface__fini): Don't call mdebug__report_object.
2452 (mface__realize): New arg font.
2453 (mface__for_chars): Adjusted for the change of mfont__encode_char.
2454 Optimize the latin case.
2455 (mface__free_realized): Free rface->font.
2456 (mface__update_frame_face): Adjusted for the change of mface__realize.
2457 (mface_equal): New function.
2459 * draw.c (Mcommon): New variable.
2460 (visual_order): Args to mfont__encode_char changed.
2461 (compose_glyph_string): Handle Mfont text property.
2462 (layout_glyphs): Adjusted for the change of MFont.
2463 (mdraw__init): Initialize Mcommon.
2464 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
2466 * font.h (enum MFontType): Members completely changed.
2467 (enum MFontProperty): Move MFONT_SIZE to the tail.
2468 (enum MFontSource): New enum.
2469 (struct MFont): New members type, source, sizes, file, capability,
2471 (struct MRealizedFont): Type of member font changed. Members
2472 score, status, and encoding deleted.
2473 (MFontScore): New type.
2474 (MFontList): Member changed.
2475 (struct MFontDriver): New member has_char. Types of members
2477 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2478 (Mapple_roman): Extern them.
2479 (OTF_Tag): Typedefed if not HAVE_OTF.
2480 (enum MFontOpenTypeTable): New enum.
2481 (MFontCapability): New type.
2482 (mfont__ft_drive_otf): Prototype adjusted.
2483 (mfont__score): Extern deleted.
2484 (mfont__merge): Extern it.
2485 (mfont__has_char): Extern it.
2486 (mfont__encode_char): Prototype adjusted.
2487 (mfont__open): Extern it.
2488 (mfont__set_spec): Prototype adjusted.
2489 (mfont__get_capability): Extern it.
2491 * font.c: Include "fontset.h".
2492 (M_font_capability, M_font_list, M_font_list_len): New variables.
2493 (font_score_priority): Change order of initial elements.
2494 (font_score_shift_bits): Fix array size.
2495 (common_weight): Add "thin", "semibold", and "heavy".
2496 (common_stretch): Add "ultracondensed", "extracondensed",
2497 "extraexpanded", and "utltraexpand".
2498 (font_weight_regular, font_weight_normal, font_weight_medium): New
2500 (gen_font_name): This function deleted.
2501 (find_encoding): Set font->encoding.
2502 (OTF_tag): New function.
2503 (otf_script_list): New variable.
2504 (load_otf_script_list): New function.
2505 (find_script_from_otf_tag): New function.
2506 (xlfd_parse_name): Set font->type and font->source.
2507 (mfont__free_realized): Free chains rfonts.
2508 (font_score): Renamed from mfont__score.
2509 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2510 (Mapple_roman): New variables.
2511 (mfont__init): Initilize new variables. Initalize
2512 default_encoding.encoding_name and
2513 default_encoding.encoding_charset to Municode_full and
2514 mcharset__unicode. Use SAFE* macros for allocating filepath
2516 (mfont__fini): Free otf_script_list.
2517 (mfont__id): New function.
2518 (mfont__match_p): Check also capability member of MFont.
2519 (mfont__merge): New funciton.
2520 (mfont__set_spec_from_face): Set type and source members.
2521 (mfont__set_spec_from_plist): Set capability and type members.
2522 (mfont__select): Argument changed.
2523 (mfont__available): New function.
2524 (compare_font_score): New function.
2525 (mfont__list): New function.
2526 (mfont__open): Return a realized font.
2527 (mfont__resize): Adjusted for the change of MFont.
2528 (mfont__has_char): New function.
2529 (mfont__encode_char): Argument changed.
2530 (mfont__set_spec): Argument changed.
2531 (free_font_capability): New function.
2532 (mfont__get_capability): New function.
2533 (MFontfile): New variable.
2534 (mfont_get_prop): Adjusted for the change of MFont.
2535 (mfont_put_prop): Likewise.
2536 (mfont_set_selection_priority): Fix the way of setting
2537 font_score_priority[].
2538 (mfont_find): Use mfont__list instead of mfont__select.
2539 (mfont_resize_ratio): Adjusted for the change of MFont.
2540 (mfont_list): Use mfont__list.
2541 (mfont_check): New function.
2542 (font_score): Make it static.
2544 * fontset.h (mfont__realize_fontset): Prototype adjusted.
2545 (mfont__lookup_fontset): Likewise.
2547 * fontset.c (struct MFontset): Delete member font_spec_list.
2548 (struct MRealizedFontset): Type of member spec changed. New
2550 (load_font_group): Arg spec_list deleted.
2551 (load_fontset_contents): Adjusted for the change of fontset_def.
2552 (free_fontset): Fix the way of freeing fontset elements.
2553 (realize_fontset_elements): Argument changed.
2554 (get_per_script): New function.
2555 (free_realized_fontset_elements): Fix the way of feeing rfontset
2557 (update_fontset_elements): Fix args to realize_fontset_elements.
2558 (mfont__realize_fontset): New arg spec.
2559 (try_font_list): New function.
2560 (try_font_group): New arg request. Use try_font_list.
2561 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
2563 (mfontset): Adjusted for the change of MFontset.
2564 (mfontset_copy): Likewise. Don't share plists.
2565 (mfontset_modify_entry): Adjusted for the change of MFontset.
2566 (mfontset_lookup): Call get_per_script.
2567 (mdebug_dump_fontset): Print also the address of fonts.
2569 * input.c (shift_state): Don't reset ic_info->vars.
2570 (take_action_list): Call MDEBUG_PRINT fore calling
2573 * internal-gui.h (MFontDriver): Don't typedef it here.
2575 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
2576 (MXFont): This type deleted.
2578 (struct _MFontX): New struct.
2579 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
2580 (MDisplayInfo): Member base_font_list deleted.
2581 (DEFAULT_FONT): Definition changed.
2582 (FALLBACK_FONT): This maclr deleted.
2583 (free_display_info): Adjusted for the change of MDisplayInfo.
2584 (free_device): Argument to mfont__free_realized changed.
2585 (xfont_driver): Adjusted for the change of MFontDriver.
2586 (xfont_registry_list): Use MFontX instead of MXFont.
2587 (MRealizedFontX): Renamed from MXFontInfo.
2588 (xfont_select): Return the font found first.
2589 (close_xfont): Change MXFontInfo to MRealizedFontX.
2590 (xfont_open): Return the realized font.
2591 (xfont_find_metric): Get xfont from rfont->fontp.
2592 (xfont_has_char): New function.
2593 (xfont_encode_char): Adjusted for the argument change.
2594 (xfont_render): Get xfont from rfont->fontp.
2595 (xfont_list): Adjusted for the argument change.
2596 (MRealizedFontXft): Renamed from MXftFontInfo.
2597 (xft_driver): Ajusted for the change of MFontDriver.
2598 (close_xft): Change MXtfFontInfo to MRealizedFontXft
2599 (xft_open_font): Argument changed.
2600 (xft_open): Argument changed. Return the realized font.
2601 (xft_find_metric): Get xft_font from rfont->fontp.
2602 (xft_has_char, xft_encode_char): New functions.
2603 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
2604 font if not yet opened.
2605 (device_open): Don't set frame->font.
2607 * m17n-gd.c (gd_font_driver): Adjusted for the change of
2609 (gd_font_open): New function.
2610 (gd_render): Don't use the local variable ft_info.
2611 (device_init): Adjusted for the change of gd_font_driver.
2613 * textprop.c (mtext__prop_init): Initialize text_property_table.
2614 Call M17N_OBJECT_ADD_ARRAY.
2615 (mtext__prop_fini): Don't call mdebug__report_object.
2617 * plist.c (mplist__init): Initialize plist_table.
2618 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
2619 (mplist__fini): Don't call mdebug__report_object.
2621 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
2622 (mtext__fini): Don't call mdebug__report_object.
2623 (MTEXT_FORMAT_UTF_16): Correct type.
2624 (mtext_data): New function.
2625 (mtext_text): Fix calculation of limit and args to
2628 * language.c: Include "plist.h".
2629 (M_script_lang_list): New variable.
2630 (mlang__init): Read languages and their information from m17n
2632 (mlanguage__list): New function.
2633 (Miso639_1, Miso639_2): New variables.
2635 * language.h (mlanguage__list): Extern it.
2637 * database.c (get_database_stream): Use SAFE_* macros for
2638 allocating and freeing path.
2639 (mdatabase__init): Likewise.
2641 * symbol.c (msymbol__fini): Don't free symbols here.
2642 (msymbol__free_table): New function.
2643 (msymbol_is_managing_key): New function.
2645 * symbol.h (msymbol__free_table): Extern it.
2646 (msymbol__list): Extern it.
2648 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
2650 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
2651 (struct _M17NObjectArray): New member name and next.
2652 (mdebug__add_object_array): Extern it.
2653 (M17N_OBJECT_ADD_ARRAY): New macro.
2654 (mdebug__report_object): Don't extern it.
2656 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
2658 * m17n-gui.c (free_frame): Don't free frame->font.
2659 (null_device_fini): Fix code for freeing
2660 null_device.realized_font_list.
2661 (m17n_fini_win): Free interface.
2662 (mframe): Cast the return value of dlsym. Set frame->font here.
2663 (mframe_get_prop): Check frame->rface->rfont before accessing the
2666 * m17n-gui.h (Mfontfile): Extern it.
2667 (mfont_check): Extern it.
2668 (mface_equal): Extern it.
2670 * m17n-core.c: Include "symbol.h".
2671 (report_header_printed): This variable deleted.
2672 (object_array_root): New variable.
2673 (report_object_array): New function.
2674 (mdebug__report_object): This function deleted.
2675 (mdebug__add_object_array): New function.
2676 (m17n_init_core): Call mchartable_init () before mtext_init ().
2677 (m17n_fini_core): Call report_object_array (if necessary) and
2678 msymbol__free_atable at the end.
2680 * m17n-core.h (msymbol_is_managing_key): Extern it.
2681 (mtext_data): Extern it.
2682 (MTEXT_FORMAT_UTF_16): Correct type.
2683 (M17NLIB_MINOR_VERSION): Changed to 3.
2684 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
2686 * chartab.c (mchartable__init): Initalize chartable_table.count.
2687 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
2688 mdebug__report_object.
2690 2005-05-26 Kenichi Handa <handa@m17n.org>
2692 * m17n.h (Miso639_1, Miso639_2): Extern them.
2694 * symbol.h (msymbol__list): Extern it.
2696 * symbol.c (msymbol__list): New function.
2698 2005-05-19 Kenichi Handa <handa@m17n.org>
2700 * input-gui.c (minput__win_init): Don't change the value of
2703 2005-05-16 Kenichi Handa <handa@m17n.org>
2705 * m17n-core.c (m17n_object): Be sure to initialize all members.
2707 * font-ft.c (fc_decode_prop): Fix args to msymbol.
2709 2005-05-09 Kenichi Handa <handa@m17n.org>
2711 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
2713 2005-04-27 Kenichi Handa <handa@m17n.org>
2715 * language.c (mlang__init): Add "an" (Aragonese).
2717 * word-thai.c: Add support for libthai.
2718 (mtext__word_thai_init): Initialize wordseg library conditionaly.
2719 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
2721 * mtext.c: Include "word-thai.h" conditionaly.
2722 (mtext__init): Call mtext__word_thai_init conditionaly.
2723 (mtext__fini): Call mtext__word_thai_fini conditionaly.
2725 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
2726 not WORDCUT_LD_FLAGS.
2728 2005-04-19 Kenichi Handa <handa@m17n.org>
2730 * word-thai.c (wordseg_propertize): Always unref the attached
2732 (thai_wordseg): Don't unref the property.
2734 2005-04-18 Kenichi Handa <handa@m17n.org>
2736 * word-thai.c: Include stdlib.h.
2737 (wordseg_propertize): Add dummy function for the case that wordcut
2738 library doesn't exist.
2739 (wordseg_propertize): Fix for old wordcut library.
2741 2005-04-16 Kenichi Handa <handa@m17n.org>
2743 * word-thai.c: Include <stdio.h>.
2745 2005-04-15 Kenichi Handa <handa@m17n.org>
2747 * draw.c: Include mtext.h.
2748 (linebreak_table, M_break_at_space, M_break_at_word)
2749 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
2750 (compose_glyph_string): Check POS before getting Mface text
2752 (truncate_gstring): Give correct TO arg to line_break function.
2753 (GET_LB_TYPE): New macro.
2754 (find_break_backward, find_break_forward): New functions.
2755 (mdraw__init): Initialize the above new variables.
2756 (mdraw__fini): Free linebreak_table.
2757 (mdraw_default_line_break): Use find_break_backward and
2760 * word-thai.c: New file.
2762 * word-thai.h: New file.
2764 * mtext.c: Include word-thai.h.
2765 (wordseg_func_table): New variable.
2766 (mtext__init): Initialize wordseg_func_table and call
2767 mtext__word_thai_init.
2768 (mtext__fini): Call mtext__word_thai_fini, free
2770 (MTextWordsegFunc): New type.
2771 (mtext__word_segment): New function.
2773 * mtext.h (wordseg_func_table): Extern it.
2774 (mtext__word_segment): Extern it.
2776 * m17n.c (m17n_init): Fix typo (== -> =).
2778 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
2779 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
2781 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
2782 (MTEXTPROP_VAL): New macros.
2784 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
2786 2005-04-07 Kenichi Handa <handa@m17n.org>
2788 * database.c (load_chartable): Fix pursing of symbol name.
2790 2005-03-24 Kenichi Handa <handa@m17n.org>
2792 * m17n.c (m17n_init): Fix typo (== -> =).
2794 2005-03-11 Kenichi Handa <handa@m17n.org>
2796 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
2798 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
2800 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
2803 2005-03-09 handa <handa@m17n.org>
2805 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
2806 calling m17n_init ().
2808 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
2809 calling m17n_init_core ().
2811 2005-02-28 Kenichi Handa <handa@m17n.org>
2813 * font-flt.c (mfont__flt_run): Add resulting code sequence in
2816 2005-02-17 Kenichi Handa <handa@m17n.org>
2818 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
2819 (M_description, M_command, M_variable): New variables.
2820 (load_im_info_keys): New variables.
2821 (load_im_info, check_command_keyseq, get_description_advance)
2822 (parse_command_list, get_command_list, parse_variable_list)
2823 (get_variable_list, input_method_hook): New functions.
2824 (command_list, variable_list): New variables.
2825 (minput__init): Put input_method_hook to Minput_method.
2826 Initialize M_description, M_command, M_variable, Mdetail_text,
2827 load_im_info_keys, command_list, variable_list.
2828 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
2829 (Mdetail_text): New variable.
2830 (minput_get_description, minput_get_commands)
2831 (minput_assign_command_keys, minput_get_variables)
2832 (minput_set_variable): New functions.
2834 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
2835 (minput_assign_command_keys, minput_get_variables)
2836 (minput_set_variable): Extern them.
2838 * plist.c (UNGETC): Just decrement st->p.
2839 (read_mtext_element): New arg skip.
2840 (read_integer_element): Likewise.
2841 (read_symbol_element): Likewise.
2842 (read_element): New arg KEYS.
2843 (mplist__from_plist): Don't increment ref-count of NULL object.
2844 (mplist__from_file): New arg KEYS.
2845 (mplist_put): Don't increment ref-count of NULL object.
2846 (mplist_add): Likewise.
2847 (mplist_push): Likewise.
2848 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
2850 * plist.h (mplist__from_file): Prototype adjusted.
2852 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
2853 (get_database_stream): New function.
2854 (load_database): Use get_database_stream.
2855 (M_database_hook): New variable
2856 (mdatabase__init): Initialize M_database_hook.
2857 (mdatabase__load_for_keys): New function.
2858 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
2860 (mdatabase_define): Free mdb->extra_info if necessary.
2862 * database.h (mdatabase__dir_list, M_database_hook)
2863 (mdatabase__load_for_keys): Extern them.
2864 (MDatabaseHookFunc): New type.
2866 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
2868 2004-12-27 Kenichi Handa <handa@m17n.org>
2870 * Version 1.2.0 released.
2872 2004-12-27 Kenichi Handa <handa@m17n.org>
2874 * input.c (minput_filter): Don't reset ic->xxx_changed.
2876 * mtext.c (mtext_from_data): Fix documentation.
2878 2004-12-25 Kenichi Handa <handa@m17n.org>
2880 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
2881 (M17NLIB_VERSION_NAME): Update to "1.2.".
2883 2004-12-24 Kenichi Handa <handa@m17n.org>
2885 * input.c (reset_ic): Set key_unhandled to 0.
2887 2004-12-21 Kenichi Handa <handa@m17n.org>
2889 * m17n-gui.h (mfont_from_spec): Delete extern.
2891 * input-gui.c (win_callback): Handle Minput_reset.
2892 (minput__win_init): Register reset_ic as a callback for
2895 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
2896 changed. At first, shift to the initial state.
2897 (minput__init): Initialize Minput_reset. Register reset_ic as a
2898 callback for Minput_reset.
2899 (Minput_reset): New variable.
2900 (minput_filter): Always set ic->xxx_changed to 0.
2901 (minput_reset_ic): New function.
2902 (integer_value): Fix typo ('>' -> '<') and calculation of length
2905 * m17n-core.c (merror_code): Change type to `int'.
2907 * m17n-misc.h (merror_code): Adjust type.
2909 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
2911 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
2912 (mtext_change_prop): Delete extern.
2914 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
2915 to `int'. Move the documents to m17n-core.h.
2917 2004-12-13 Kenichi Handa <handa@m17n.org>
2919 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
2920 (MTextProperty): Document it.
2922 2004-12-09 Kenichi Handa <handa@m17n.org>
2924 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
2926 2004-12-03 Kenichi Handa <handa@m17n.org>
2928 * internal.h (m17n__core_initialized, m17n__shell_initialized,
2929 m17n__gui_initialized): New externs.
2931 * m17n-core.h (enum M17NStatus): New enum.
2932 (m17n_status): Extern it.
2934 * m17n-core.c (core_initialized): Delete this variable.
2935 (m17n__core_initialized, m17n__shell_initialized,
2936 m17n__gui_initialized): New variables.
2937 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
2938 instead of core_initialized.
2939 (m17n_status): New function.
2941 * m17n.c (shell_initialized): Delete this variable.
2942 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
2945 * m17n-gui.h (m17n_init_win): Adjust the prototype.
2947 * m17n-gui.c (win_initialized): Delete this variable.
2948 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
2949 instead of gui_initialized.
2951 2004-11-19 Kenichi Handa <handa@m17n.org>
2953 * input.c (reset_ic): Check if ic_info->state is NULL.
2954 (filter): If ic_info->state is NULL, return 0.
2955 (load_input_method): Don't unref `maps' it it's not created.
2957 2004-11-15 Kenichi Handa <handa@m17n.org>
2959 * input.c (find_candidates_group): If INDEX is -1, find the last
2961 (take_action_list): If the previous of the first candidate is
2962 requested, select the last candidate.
2964 2004-11-08 Kenichi Handa <handa@m17n.org>
2966 * m17n-X.c (device_open): Try at most 32 fonts to find a
2967 non-autoscaled font.
2969 * font.c (xlfd_parse_name): Fix previous change.
2971 2004-11-05 Kenichi Handa <handa@m17n.org>
2973 * font.c: (commont_style): Include dummy elements "slanted" and
2974 "rslanted" to prefer "o" to "r" if "i" is requested.
2976 * font-ft.c (ft_to_prop): Fix "oblique" entry.
2978 2004-10-29 Kenichi Handa <handa@m17n.org>
2980 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
2982 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
2983 New members smallest and larger.
2984 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
2985 (xfont_registry_list): Likewise.
2986 (xfont_select): Likewise.
2989 2004-10-28 Kenichi Handa <handa@m17n.org>
2991 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
2992 font name comparison.
2993 (xfont_select): Fix logic for selecting a larger size font.
2995 2004-10-25 Kenichi Handa <handa@m17n.org>
2997 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
3000 2004-10-22 Kenichi Handa <handa@m17n.org>
3002 * input.c (update_candidate): Renamed from udpate_candidate.
3003 (take_action_list): Show more debugging info on arithmetic commands.
3005 * m17n-X.c (device_open): Fix previous change.
3007 * draw.c (compose_glyph_string): Don't get face property at the
3010 2004-10-21 Kenichi Handa <handa@m17n.org>
3012 * draw.c (compose_glyph_string): Fix for the case of category
3015 2004-10-19 Kenichi Handa <handa@m17n.org>
3017 * input.c (mdebug_mask): New variable.
3018 (shift_state): Print debug information.
3019 (take_action_list): Likewise.
3020 (handle_key): Likewise.
3022 2004-10-14 Kenichi Handa <handa@m17n.org>
3024 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
3026 2004-10-13 Kenichi Handa <handa@m17n.org>
3028 * m17n-X.c (device_open): Be sure to register at least one font
3031 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
3032 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
3034 2004-10-12 Kenichi Handa <handa@m17n.org>
3036 * draw.c (alloc_gstring): Fix previous change.
3038 * font-ft.c (ft_list_generic): Fix for the case of not
3041 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
3043 * font.c (mfont_list): If no font is found, return NULL.
3044 (load_font_encoding_table): Put entries of nil registry first.
3045 (find_encoding): Adjust for the above change.
3047 2004-10-11 Kenichi Handa <handa@m17n.org>
3049 * m17n-gui.h (mfont_list): Adjust prototype.
3051 * m17n-X.c (xfont_list): New arg maxnum.
3053 * font.h (struct MFontDriver): Change prototype of <list>.
3055 * font-ft.c (fc_generic_family_list): Delete it.
3056 (Mserif, Msans_serif, Mmonospace): Delete them.
3057 (M_generic_family_info): New variable.
3058 (enum GenericFamilyType): New enum.
3059 (struct GenericFamilyInfo): New struct.
3060 (generic_family_table): New variable.
3061 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
3063 (add_font_info): Get style here.
3064 (ft_list_family): Don't initialize fc_config here. Don't list
3066 (ft_list_generic): New function.
3067 (ft_select): Pay attention to generic familes here.
3068 (ft_open): Fix calculation of ascent and descent.
3069 (ft_list): Pay attention to generic families.
3070 (mfont__ft_init): Initialize M_generic_family_info,
3071 generic_family_table, and fc_config..
3072 (mfont__ft_fini): Finalize generic_family_table.
3074 * draw.c (compose_glyph_string): Use more constant font for
3075 glyphs. Adjust for the member change in MGlyph.
3076 (layout_glyph_string): Adjust for the member change in MGlyph.
3077 (alloc_gstring): Intilize scracth_glyph to avoid
3078 compose_glyph_string on it.
3079 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
3080 (mdraw_coordinates_position): Fix previous change.
3082 * internal-gui.h (glyph_category): New enum.
3083 (MGlyph): Change type of <category> to enum glyph_category.
3085 * face.c (mface__realize): Delete args langauge and charset.
3086 (mface__for_chars): Fix for the case that glyphs have different
3088 (mface__update_frame_face): Adjust for mface__realize change.
3090 * face.h (mface__realize): Adjust prototype.
3092 2004-10-05 Kenichi Handa <handa@m17n.org>
3094 * language.c (mlang__init): Add Akan.
3096 2004-10-04 Kenichi Handa <handa@m17n.org>
3098 * font-ft.c (add_font_info): Add instead of push the element.
3099 (ft_list_family): For generic fonts, try all
3100 substituted. families.
3102 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
3103 (run_rule): Don't update cluster range here.
3104 (run_command): Update cluster range on appending a glyph.
3105 (run_otf): Update cluster range for glyphs generated by OTF.
3107 2004-10-02 Kenichi Handa <handa@m17n.org>
3109 * m17n-X.c (device_open): Handle Mfont key in PLIST.
3111 2004-09-30 Kenichi Handa <handa@m17n.org>
3113 * font-ft.c (ft_select): Ignore family on calling mfont__score.
3115 2004-09-30 Kenichi Handa <handa@m17n.org>
3117 * font.h: Include <fontconfig/fontconfig.h>.
3118 (MFTInfo): New member langset.
3119 (mfont__encoding_list): Extern it.
3121 * font.c (mfont__encoding_list): New function.
3122 (mdebug_dump_font_list): New function.
3124 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
3125 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
3127 (ft_family_list): New variable.
3128 (set_font_info): New arg basep. Callers changed.
3129 (fc_list): Check the return value of FcPatternGetString.
3130 (add_font_info): New arg plist. Callers changed. Update
3132 (ft_list_family): New function (merged fc_list and ft_list_all).
3133 (ft_select): Use ft_list_family.
3134 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
3136 (mfont__ft_init): Initialize above new variables.
3137 (mfont__ft_fini): Free ft_family_list.
3138 (STRDUP_LOWER): New macro.
3139 (set_font_info): Use STRDUP_LOWER.
3140 (ft_list_family): Avoid duplicate addition of font path. Use
3142 (fc_decode_prop): Fix typo.
3144 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
3145 (xfont_registry_list): Change argument disp_info to frame.
3147 (xfont_list_all): New function.
3148 (xfont_list): If FONT is not NULL, check all fonts.
3150 2004-09-28 Kenichi Handa <handa@m17n.org>
3152 * m17n-X.c (MXFont, MXFontList): New types.
3153 (MDisplayInfo): Delete members font_registry_list,
3154 iso8859_1_family_list, iso10646_1_family_list, new members
3155 font_list, base_font_list.
3156 (free_display_info): Adusted for the change of MDisplayInfo.
3157 (xfont_driver): Initialize with xfont_list.
3158 (font_compare): New function.
3159 (build_font_list): Deleted.
3160 (xfont_registry_list): New function.
3161 (xfont_select): Use xfont_registry_list.
3162 (xfont_list): New function.
3163 (device_open): Adusted for the change of MDisplayInfo.
3165 * font-ft.c (add_font_info): New arg languages. Callers changed.
3166 (fc_list): Get languages from fonts..
3167 (ft_list_all): Renamed from ft_list. Callers changed.
3168 (ft_list): New function.
3169 (mfont__ft_driver): Initalize with ft_list.
3171 * font.c (mfont_list): New function.
3173 * font.h (struct MFontDriver): New member `list'.
3174 (MFTInfo): New member languages.
3176 * m17n-gui.h (mfont_list): Extern it.
3178 2004-09-27 Kenichi Handa <handa@m17n.org>
3180 * internal-gui.h (struct MGlyphString): Delete members mt,
3181 sub_width, sub_lbrearing, sub_rbearing, and region.
3183 * draw.c (MSubTextExtents): New type.
3184 (layout_glyphs): New arg extents. Set its members.
3185 (layout_glyph_string): Adjusted for the above change.
3186 (alloc_gstring): Don't set gstring->mt.
3187 (truncate_gstring): Call line_break function with mt instead of
3190 2004-09-22 Kenichi Handa <handa@m17n.org>
3192 * mtext.c (count_utf_16_chars): Count each code of invalid
3195 2004-09-19 Kenichi Handa <handa@m17n.org>
3197 * mtext.c (default_utf_16, default_utf_32): Rename them to
3198 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
3201 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
3204 2004-09-13 Kenichi Handa <handa@m17n.org>
3206 * draw.c (Mlatin): Don't declare it here.
3207 (visual_order): Fix reordering of combining characters.
3208 (compose_glyph_string): Fix detection of script.
3209 (layout_glyphs): Don't fix reordering of combining characters
3211 (layout_glyph_string): Pay attention to
3212 control->disable_overlapping_adjustment.
3213 (truncate_gstring): Include at least on character in a line.
3214 (get_gstring): Always scan one full line.
3215 (mdraw__init): Don't initialize Mlatin here.
3216 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
3217 have a font, use ascent/descent of an ASCII font. Allow
3218 ink_array_return and logical_array_return to be NULL.
3219 (mdraw_coordinates_position): Fix iteration.
3221 * font-ft.c (MFTtoProp): Member completely changed.
3222 (ft_to_prop): Adjusted for the above change.
3223 (ft_to_prop_size): Likewise.
3224 (set_font_info): Adjusted for the change of MFTtoProp.
3225 (fc_generic_family_list): New variable.
3226 (fc_list): Add special handling of generic font names.
3227 (mfont__ft_init): Adjusted for the change of MFTtoProp.
3228 Initialize fc_generic_family_list.
3229 (mfont__ft_fini): Don't free ft_to_prop. Free
3230 fc_generic_family_list.
3231 (FC_vs_M17N_font_prop): New type.
3232 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
3233 (fc_decode_prop, fc_encode_prop): New functions.
3234 (mfont__ft_parse_name): Use fc_decode_prop.
3235 (mfont__ft_unparse_name): Use fc_encode_prop.
3237 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
3238 (MWDevice): Add member realized_font_list.
3239 (free_display_info): Don't free disp_info->realized_font_list.
3240 (free_device): Free device->realized_fontset_list.
3241 (xft_find_metric): Use gstring->frame instead of rfont->frame.
3242 (device_open): Don't initialize disp_info->realized_font_list.
3243 (device_open): Initialize device->realized_font_list and set it to
3244 frame->realized_font_list.
3246 * fontset.c (try_font_group): New function.
3247 (mfont__lookup_fontset): Use try_font_group.
3249 * font.c (common_weight): Change the order of "regular".
3251 * face.c (Mlatin): Don't make it static.
3252 (mface__realize): Be sure to set work_gstring.frame.
3253 (mface__for_chars): Likewise.
3255 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
3258 * internal-gui.h (Mlatin): Extern it.
3260 * m17n-gui.h (MDrawControl): New member
3261 disable_overlapping_adjustment.
3263 2004-09-06 Kenichi Handa <handa@m17n.org>
3265 * font-flt.c (run_otf): Fix typo ('}'->']').
3267 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
3268 (COMBINING_PRECOMPUTED_P): New macros.
3270 * draw.c (layout_glyphs): Handle precomputed combining code.
3272 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
3273 precomupted combining code.
3275 2004-09-03 Kenichi Handa <handa@m17n.org>
3277 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
3280 2004-08-27 Kenichi Handa <handa@m17n.org>
3282 * face.c (mface_put_prop): If the new value is the same as the
3283 current one, don't increment frame->tick.
3285 2004-08-25 Kenichi Handa <handa@m17n.org>
3287 * fontset.c (mfontset): Initialize font_spec_list member.
3288 (mfontset_copy): Load fontset if necessary.
3290 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
3291 'metrics' to for C++.
3293 * draw.c (mdraw_glyph_info): Adjusted for the member name change
3296 2004-08-16 Kenichi Handa <handa@m17n.org>
3298 * Version 1.1.0 released.
3300 2004-08-13 Kenichi Handa <handa@m17n.org>
3302 * language.c (mlang__init): Add Dhivehi.
3304 * m17n-gui.c (Mx, Mfreetype): Delete it.
3305 (m17n_init_win): Don't initialize Mx and Mfreetype here.
3307 * m17n-gui.h (Mfreetype, Mxft): Extern them.
3308 (mfont_resize_ratio): Extern it.
3309 (MDrawGlyphInfo): New member logical_width;
3310 (MDrawGlyph): New type.
3311 (mdraw_glyph_list): Prototype adjusted.
3313 * m17n-X.c (xfont_open): Set type and fontp members.
3314 (xft_open): Likewise.
3316 * internal-gui.h (Mx, Mfreetype): Delete extern.
3318 * font.h (struct MRealizedFont): New member type and fontp.
3320 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
3321 (Mx, Mfreetype): Declare here.
3322 (Mxft): New variable.
3323 (mfont_resize_ratio): New function.
3325 * font-ft.c (ft_open): Set type and fontp members.
3327 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
3330 2004-08-11 Kenichi Handa <handa@m17n.org>
3332 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
3335 2004-08-06 Kenichi Handa <handa@m17n.org>
3337 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
3340 * font-flt.c (run_otf): Print debugging information if necessary.
3342 2004-08-05 Kenichi Handa <handa@m17n.org>
3344 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
3345 positioning_type 5 and 6. Switch simplified.
3347 2004-08-04 Kenichi Handa <handa@m17n.org>
3349 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
3351 2004-08-02 Kenichi Handa <handa@m17n.org>
3353 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
3354 set val to 1 even if it is greater than 1.
3356 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
3358 2004-07-29 Kenichi Handa <handa@m17n.org>
3360 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
3361 debugging information.
3363 * internal.h (MDEBUG_PRINT5): New macro.
3365 * draw.c (layout_glyphs): Don't combine a zero width glyph with
3366 the previous one if the zero width glyph has left or right
3369 2004-07-26 Kenichi Handa <handa@m17n.org>
3371 * m17n-X.c (xft_render): Pay attention to members left_padding and
3372 right_padding of MGlyph.
3374 * draw.c (visual_order): Allocate one more elements for arrays as
3375 a workaround of fribidi bug.
3376 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
3377 instead of MGlyph->bidi_sensitive.
3378 (layout_glyph_string): Pay attentinon to
3379 control->orientation_reversed when padding at the head or tail.
3380 Fix adjustment of space glyph width.
3381 (get_gstring): If cursor_width or cursor_bidi is changed, don't
3384 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
3385 instead of MGlyph->bidi_sensitive.
3387 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
3389 2004-07-26 Kenichi Handa <handa@m17n.org>
3391 * draw.c (visual_order): Don't treat combined glyphs specially.
3392 (layout_glyphs): Don't get metrics glyphs that are already ready.
3393 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
3394 width with the previous one.
3395 (draw_background): Fix bar cursor position on a r2l glyph.
3397 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
3398 (run_rule): Fix place of updating cluster_begin_pos and
3399 cluster_end_pos here.
3400 (run_otf): Don't set left_padding.
3402 * font-ft.c (adjust_anchor): Type of argument `code' changed.
3404 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
3405 Fix handling of GPOS.
3406 (mfont__ft_drive_gpos): Delete this function.
3408 * font.h (mfont__ft_drive_otf): Renamed back from
3409 mfont__ft_drive_gsub.
3410 (mfont__ft_drive_gpos): Delete extern.
3412 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
3413 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
3415 2004-07-23 Kenichi Handa <handa@m17n.org>
3417 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
3418 the same bidi level.
3420 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
3422 2004-07-22 Kenichi Handa <handa@m17n.org>
3424 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
3426 2004-07-20 Kenichi Handa <handa@m17n.org>
3428 * draw.c (render_glyphs): Fix checking of g->code validity.
3430 * face.c (mface__realize): Set g.type.
3432 2004-07-18 Kenichi Handa <handa@m17n.org>
3434 * Makefile.am: Prepend ${top_srcdir} to all *.la in
3437 * m17n-gui.c (mframe): Print error message give by dlopen to
3440 2004-07-16 Kenichi Handa <handa@m17n.org>
3442 * draw.c (compose_glyph_string): Improve the way of deciding a
3443 script. For a character that doesn't have script property, use
3444 the last non-latin script.
3446 * font-ft.c (fc_list): Cancel previous change.
3447 (mfont__ft_init): Add more entries in ft_to_prop_name.
3449 2004-07-15 Kenichi Handa <handa@m17n.org>
3451 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
3452 previous or next character glyphs.
3454 2004-07-14 Kenichi Handa <handa@m17n.org>
3456 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
3457 of type GLYPH_SPACE.
3459 * fontset.c (mfont__lookup_fontset): If glyph type is
3460 GLYPH_SPACE, get codes for SPACE.
3462 * internal-gui.h (Mfont): Delete extern.
3464 * m17n-gui.h (Mfont): Delete duplicated extern.
3466 2004-07-13 Kenichi Handa <handa@m17n.org>
3468 * font-ft.c (DEVICE_DELTA): New macro.
3469 (adjust_anchor): New function.
3470 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
3472 (mfont__ft_drive_gpos): New function.
3474 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
3475 (FontLayoutContext): Delete member `rfont'.
3476 (run_otf): Set g->otf_cmd. Call
3477 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
3478 only whne HAVE_OTF is defined.
3480 * fontset.c: Include "config.h".
3482 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
3483 (MGlyph): New member otf_cmd.
3485 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
3486 (mfont__ft_drive_gpos): Extern it.
3488 * face.c: Include "config.h".
3490 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
3492 * input-gui.c: Include "config.h".
3494 * plist.c: Include "config.h".
3496 2004-07-06 Kenichi Handa <handa@m17n.org>
3498 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
3499 internal-gui.h: Cancel previous changes.
3501 * m17n-gd.h: Delete it.
3503 * Makefile.am (libm17n_core_la_LIBADD): New variable.
3504 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
3505 @XML2_LD_FLAGS@ to above.
3506 (libm17n_la_LIBADD): Add -ldl.
3507 (libm17n_la_LDFLAGS): Add -export-dynamic.
3508 (X_LD_FLAGS): Fix the order of linking.
3509 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
3510 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
3511 (libm17n_X_la_LDFLAGS): Add -module.
3512 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
3513 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3514 (libm17n_gd_la_LDFLAGS): Add -module.
3515 (include_HEADERS): Delete m17n-gd.h.
3517 2004-06-30 Kenichi Handa <handa@m17n.org>
3519 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
3520 (MDeviceLibraryInterface): Delete it.
3521 (register_device_library): Delete it.
3522 (m17n__device_library_list): Renamed from device_library_list.
3524 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
3525 (m17n_init_win): Adjust prototype.
3527 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
3528 (m17n_init_gd): New function.
3530 * m17n-gd.h: New file.
3532 * m17n-X.h: Include <m17n-gui.h>.
3533 (m17n_init_X): Extern it.
3534 (M17N_INIT): Redefine it.
3536 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
3537 (m17n_init_X): New function.
3539 * internal-gui.h (m17n__device_library_list): Extern it.
3540 (struct MDeviceDriver): New members initialized, init, and fini.
3542 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
3544 (libm17n_X_la_LIBADD): Delete aboves.
3545 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
3546 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3547 (libm17n_gd_la_LDFLAGS): Delete it.
3548 (include_HEADERS): Add m17n-gd.h.
3550 2004-06-25 Kenichi Handa <handa@m17n.org>
3552 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
3553 (libm17n_gd_la_LDFLAGS): Cancel previous change.
3555 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
3557 * font-ft.c (fc_list): If FcFontList finds no font, try
3560 * draw.c (compose_glyph_string): Terminate the last loop after
3561 doing default combining if necessary.
3563 2004-06-24 Kenichi Handa <handa@m17n.org>
3565 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
3567 * character.c (mchar_define_property): Add const to an arg.
3569 * charset.c (mchar_define_charset): Add const to an arg.
3571 * coding.c (MCodingSystem): Add const to an arg or decoder.
3572 (finish_decoding): Add const to an arg.
3573 (decode_coding_charset, decode_coding_utf_8)
3574 (decode_coding_utf_16, decode_coding_utf_32)
3575 (decode_coding_iso_2022, decode_coding_sjis)
3576 (mconv_define_coding): Likewise.
3578 * m17n-X.c (xft_find_metric): Delete unused variable.
3580 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
3583 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
3586 * mtext.c (count_utf_8_chars, count_utf_16_chars)
3587 (mtext__from_data, mtext_from_data): Add `const' to an arg.
3589 * mtext.h (mtext__from_data): Ajust prototype.
3591 2004-06-23 Kenichi Handa <handa@m17n.org>
3593 * draw.c (compose_glyph_string): Always get glyph codes by
3595 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
3596 (mdraw_glyph_list): New function.
3598 * font-flt.c (mfont__flt_run): Be sure to call
3599 rfont->driver->encode_char.
3601 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
3602 (ft_encode_char): Delete arg C.
3603 (ft_render): Don't call FT_Get_Char_Index.
3605 * font.c (mfont__encodable_p): Delete it.
3606 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
3608 * font.h (struct MFontDriver): Delete arg C of encode_char.
3609 (mfont__encodable_p): Delete extern.
3611 * m17n-X.c (xfont_encode_char): Delete arg C.
3612 (xft_find_metric): Don't cal FT_Get_Char_Index.
3613 (xft_render): Likewise.
3615 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
3617 (mdraw_glyph_list): Extern it.
3619 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
3621 2004-06-22 Kenichi Handa <handa@m17n.org>
3623 * m17n-gui.h (mfontset_lookup): Extern it.
3625 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
3627 * fontset.c (realize_fontset_elements)
3628 (free_realized_fontset_elements, update_fontset_elements): New
3630 (mfont__realize_fontset): Call realize_fontset_elements.
3631 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
3632 (mfont__lookup_fontset): If a fontset was modified, update
3633 the realized fontset.
3634 (mfontset_modify_entry): Increment fontset->tick.
3635 (mfontset_lookup): New function.
3637 2004-06-21 Kenichi Handa <handa@m17n.org>
3639 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
3641 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
3642 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
3643 length of source text 0.
3645 2004-06-21 Kenichi Handa <handa@m17n.org>
3647 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
3648 (compare): Pay attention to format other than utf-8.
3649 (copy): Delete this function.
3650 (count_by_utf_8, count_by_utf_16, insert): New functions.
3651 (count_utf_16_chars): Fix handling of a surrogate pair.
3652 (find_char_forward, find_char_backward): Likewise.
3653 (mtext__from_data): Delete unnecessary check. Fix number of
3655 (mtext_from_data): Don't count items.
3656 (mtext_ref_char): Optimize the code.
3657 (mtext_set_char): Pay attention to format other than utf-8.
3658 (mtext_cat_char): Likewise.
3659 (mtext_dup): Don't call copy, instead do allocation here.
3660 (mtext_cat): Call insert instead of copy.
3661 (mtext_ncat): Likewise.
3662 (mtext_cpy): Delete character at first and call insert instead of
3664 (mtext_ncpy): Likewise.
3665 (mtext_copy): Likewise.
3666 (mtext_duplicate): Call insert instead of copy.
3667 (mtext_del): Pay attention to format other than utf-8.
3668 (mtext_ins): Simply call insert.
3669 (mtext_ins_char): Pay attention to format other than utf-8.
3670 (mtext_tok): Call insert instead of copy.
3671 (mtext_text): Call UNIT_BYTES.
3673 * textprop.c (mtext__adjust_plist_for_change): New function.
3675 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
3676 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
3677 (CHAR_UNITS_AT): Fix typo.
3678 (CHAR_UNITS_BY_HEAD): Fix typo.
3679 (STRING_CHAR_AND_UNITS): Fix typo.
3681 * internal.h (MTEXT_READ_ONLY_P): New macro.
3683 * mtext.h (mtext__replace): Delete the extern.
3684 (mtext__adjust_foramt): Adjust prototype.
3686 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
3687 if possible. Otherwise make a copy of mmt.
3689 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
3692 2004-06-18 Kenichi Handa <handa@m17n.org>
3694 * character.h (CHAR_STRING_UTF16): Fix syntax.
3696 2004-06-16 Kenichi Handa <handa@m17n.org>
3698 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
3699 (libm17n_X_la_LIBADD): Delete it.
3700 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
3702 * m17n-X.c (device_open): Add parens in `if' condition.
3704 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
3705 (DEC_POSITION): Likewise.
3706 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
3708 2004-06-15 Kenichi Handa <handa@m17n.org>
3710 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
3713 * draw.c (compose_glyph_string): If langauge is specified, call
3714 mface__for_chars even if a text is all latin. Fix condition for
3715 setting non_ascii_found.
3717 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
3719 * m17n.h (minput_char_to_key): Delete extern.
3721 * m17n-gui.h (minput_event_to_key): Cancel previous change.
3723 * m17n-gui.c (null_device_open): Set several members of frame.
3725 2004-06-14 Kenichi Handa <handa@m17n.org>
3727 * m17n-gui.h (minput_event_to_key): Delete extern.
3729 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
3731 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
3733 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
3735 2004-06-08 Kenichi Handa <handa@m17n.org>
3737 * character.c (mchar_put_prop): Don't increment the ref-count of
3740 2004-06-04 Kenichi Handa <handa@m17n.org>
3742 * m17n-core.c (mdebug__register_object): New function.
3743 (mdebug__unregister_object): Likewise.
3745 * internal.h (mdebug__register_object, mdebug__unregister_object):
3747 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
3750 * charset.c (mcharset__load_from_database): Don't call
3751 mconv__register_charset_coding here.
3753 * coding.c (find_coding): Get a real name from an element of
3754 coding_definition_list.
3755 (mconv__register_charset_coding): Set the real name at the top of
3757 (mcoding__load_from_database): Likewise.
3758 (mconv_list_codings): Adjusted for the above change.
3760 2004-06-03 Kenichi Handa <handa@m17n.org>
3762 * coding.c (find_coding): Find by canonicalized name. Don't have
3763 to modify the element of coding_definition_list by
3765 (mconv__define_coding_from_charset): Delete it.
3766 (mconv__register_charset_coding): Canonicalize sym.
3767 (mcoding__load_from_database): Register plist modified by
3770 * coding.h (mconv__define_coding_from_charset): Don't extern it.
3772 * font-ft.c (ft_open): Fix setting of rfont->descent.
3774 2004-06-02 Kenichi Handa <handa@m17n.org>
3776 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
3777 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
3778 (xlfd_unparse_name): Renamed from xfont_build_name.
3779 (mfont__init): Initialized Mfontconfig.
3780 (mfont__free_realized): Unconditionally unref rfont->info.
3781 (mfont__select): Free `this' if it's not best.
3782 (mfont__open): Don't check frame->realized_font_list.
3783 (mfont__parse_name_into_font): New function.
3784 (Mfontconfig): New variable.
3785 (mfont_from_name): Call mfont_parse_name.
3786 (mfont_name): Call mfont_unparse_name.
3787 (mdebug_dump_font): Likewise.
3789 * font.h (struct MFontDriver): Delete members parse_name and
3791 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
3792 (mfont__parse_name_into_font): Extern it.
3794 * font-ft.c: Include "symbol.h".
3795 (close_ft): Unconditionally free filename and charmap_list of
3797 (ft_open): Duplicate base->filename. Increment ref-count of
3798 ft_info->charmap_list. Free ft_info->charmap_list and
3799 ft_info->filename on error.
3800 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
3802 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
3804 (enum xlfd_field_idx): Moved to font.c.
3805 (split_font_name, build_font_name): Likewise.
3806 (build_font_list): Call mfont__parse_name_info_font.
3807 (xfont_open): Call mfont__unparse_name. Free name.
3808 (xfont_parse_name, xfont_build_name): Moved to font.c
3809 (xft_select): Prototype deleted.
3810 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
3811 Call mfont_pase_name.
3813 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
3814 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
3817 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
3820 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
3822 2004-06-01 Kenichi Handa <handa@m17n.org>
3824 * fontset.c (mfontset_modify_entry): Pay attention to the case
3825 that fontset->font_spec_list is NULL.
3827 2004-05-31 Kenichi Handa <handa@m17n.org>
3829 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3831 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3833 * font.c (mfont__select): Print score the a font for debugging.
3835 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
3837 * coding.c (reset_coding_sjis): Check kanji and kana instead of
3838 kanji_sym and kana_sym.
3840 2004-05-28 Kenichi Handa <handa@m17n.org>
3842 * Makefile.am (VINFO): New variable.
3843 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
3844 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
3846 2004-05-27 Kenichi Handa <handa@m17n.org>
3848 The following chanages are to make device dependent functions
3849 accessible only from MDeviceDriver structure, and to add GD and
3850 null device drivers. Font drivers get also device dependent.
3852 * m17n.c (m17n_init): Increament shell_initialized.
3853 (m17n_fini): Decremented shell_initialized.
3855 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
3857 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
3858 (Mwidget, Mcolormap, Mx): Extern them.
3860 * m17n-gui.c: Include <dlfcn.h> and "config.h".
3861 (free_frame): Call frame->driver->close instead of
3863 (DLOPEN_SHLIB_EXT): New macro.
3864 (MDeviceLibraryInterface): New type.
3865 (device_library_list): New variable.
3866 (register_device_library): New function.
3867 (null_device): New variable.
3868 (null_device_close, null_device_get_prop)
3869 (null_device_realize_face, null_device_free_realized_face): New
3871 (null_driver): New variable.
3872 (null_device_init, null_device_fini, null_device_open): New
3874 (null_interface): New variable.
3875 (Mfreetype, Mdevice): Declare them.
3876 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
3877 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
3878 Mwin__Close_Device. Register drivers for Mx and Mgd.
3879 (m17n_fini_win): Decremented win_initialized. Call "fini"
3880 function of all opened devices. Don't call mwin__fini.
3881 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
3883 (mframe): Handle Mdevice key of PLIST.
3884 (mframe_get_prop): Call frame->device->get_prop instead of
3885 mwin__device_get_prop.
3887 * m17n-gd.c: New file.
3889 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
3890 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
3892 * m17n-core.c (m17n_init_core): Increate core_initialized.
3893 (m17n_fini_core): Decremented core_initialized.
3895 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
3896 (Mcolormap): Don't extern them here.
3898 * m17n-X.c (FRAME_DEVICE): New macro.
3899 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
3900 (free_display_info): Use MPLIST_DO.
3901 (free_device): Free rface->info.
3902 (xft_close): Delete it.
3903 (device_init): Renamed from mwin__init.
3904 (device_fini): Renamed from mwin__fini.
3905 (device_open): Renamed from mwin__open_device.
3906 (x_driver): New variable.
3907 (MXFontInfo): Delete member frame, add member display.
3908 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
3909 Don't declare them here.
3911 * internal-gui.h (MDeviceType): New enum.
3912 (MWDefice): Delete it.
3913 (struct MFrame): Change type of device to void *. New members
3914 device_type, driver, font_driver_list.
3915 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
3916 (MDeviceDriver): New type.
3917 (Mx, Mgd, Mfreetype): Extern them.
3918 (mwin__XXX): Delete all of them.
3920 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
3922 (win_destroy_ic): Likewise.
3923 (adjust_window_and_draw): Likewise.
3924 (win_callback): Likewise.
3925 (Mxim): Declare it here.
3926 (minput_event_to_key): Call M_CHECK_READABLE.
3928 * fontset.c (mfont__lookup_fontset): Delete local variable
3931 * font.h (struct MFontDriver): Delete member close, add members
3932 parse_name and build_name.
3933 (mfont__driver_list): Delete extern.
3934 (mfont__close): Delete extern.
3936 * font.c (mfont__init): Don't set mfont__driver_list.
3937 (mfont__fini): Don't unref mfont__driver_list.
3938 (mfont__select): Try font drivers in frame->font_driver_list. Set
3939 driver member of a realized font.
3940 (mfont__close): Delete it.
3941 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
3942 functions of the default frame.
3944 * font-ft.c (close_ft): Check ft_info->ft_face and work
3946 (add_font_info): Allocate ft_info by M17N_OBJECT.
3947 (ft_close): Delete it.
3948 (mfont__ft_driver): Don't set ft_close.
3949 (ft_select): Increment ref-count of best_font.
3950 (ft_open): Decremented ref-count of base. On error, call
3951 FT_Done_Face and free ft_info.
3952 (ft_find_metric): Always use XXX_MONO in load_flags.
3953 (ft_render): Fix setting of width. Call
3954 frame->driver->draw_points instead of mwin__draw_points.
3955 (ft_to_prop): Don't set mfont__driver_list.
3956 (mfont__ft_fini): Just unref ft_info.
3958 * face.c (mface__init): Exchange foreground and background of
3959 mface__default. Call mface_put_prop to set hline of
3961 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
3962 (mface__free_realized): Don't call mwin__free_realized_face.
3964 * draw.c (Mdepth): Don't declare it here.
3965 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
3966 (render_glyphs, render_glyph_string): Likewise.
3967 (mdraw__init): Don't set Mdepth.
3968 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
3970 (mdraw_text_per_char_extents): Return 0 on success and -1 on
3972 (mdraw_text_items): Check FRAME is writable.
3973 (mdraw_per_char_extents): Implement body.
3975 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
3977 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
3978 (GUI_SOURCES): Delete it.
3979 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
3980 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
3981 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
3982 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
3983 (linkgui_LDADD): Set to libm17n-gui.la
3984 (linkgui_LDFLAGS): New target.
3985 (SRC): Include ${libm17n_gui_la_SOURCES} and
3986 ${libm17n_gd_la_SOURCES}.
3988 2004-05-24 Kenichi Handa <handa@m17n.org>
3990 * draw.c (draw_background): Don't draw background even if
3991 rface->face.property[MFACE_BACKGROUND] is not Mnil.
3993 2004-05-22 Kenichi Handa <handa@m17n.org>
3995 * m17n-X.c (xft_open_font): Fix anti_alias setting.
3997 2004-05-20 Kenichi Handa <handa@m17n.org>
3999 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
4001 * m17n-gui.c: Include "plist.h".
4002 (mframe): If PLIST is NULL, initialize it to emply plist.
4004 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
4005 (xft_driver): New variable.
4006 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
4007 (xft_find_metric, xft_render): New function.
4008 (mwin__init): Adjusted for the new mfont__driver_list.
4009 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
4010 generated face to PARAM.
4011 (mwin__realize_face): Fix setting of box colors. Don't call hook
4013 (mwin__draw_hline): New function.
4014 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
4015 (mwin__xft_render): Delete these function.
4017 * internal-gui.h (struct MFrame): New member tick.
4018 (struct MGlyphString): New member tick.
4019 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
4020 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
4021 (mwin__xft_render): Delete extern.
4023 * fontset.c (mfont__lookup_fontset): Make the code simpler.
4024 (mfontset): Always increment the reference count of returned
4027 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
4028 (MFTInfo): Moved to font.h.
4029 (ft_iso8859_1_font_list): Delete this variable.
4030 (set_font_info): Don't set font->property[MFONT_TYPE].
4031 (set_font_info): Don't udpate ft_iso8859_1_font_list.
4032 (add_font_info): Change type to void.
4033 (fc_list): Change anme from xft_list. Caller changed. Include
4034 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
4035 (mfont__ft_driver): Change name from ft_driver. Caller changed.
4036 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
4037 (close_ft): Don't call mwin__xft_close. Unref
4038 ft_info->extra_info.
4039 (ft_open): Don't setup ft_info->fontname. Don't call
4041 (ft_find_metric): Don't call mwin__xft_get_metric.
4042 (ft_encode_char): Call rfont->driver->open instead of ft_open.
4043 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
4044 (mfont__ft_init): Adjusted for new mfont__driver_list.
4045 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
4047 * font.c (mfont__driver_list): Make it MPlist.
4048 (mfont__init): Adjust initialization of mfont__driver_list.
4049 (mfont__fini): Free mfont__driver_list.
4050 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
4051 (mfont__select): Adjusted for the new mfont__driver_list.
4053 * font.h (enum MFontProperty): Delete MFONT_TYPE.
4054 (mfont__drirver_list): Adjust prototype.
4055 (MFTInfo): Move to here from fron.c. Deleve member fontname.
4057 * face.h (struct MFace): Delete member realized_face_list, add
4059 (struct MRealizedFace): Delete member need_update
4060 andnofont_rface, add member non_ascii_list.
4061 (mface__update_frame_face): Extern it.
4063 * face.c (hline_prop_list, box_prop_list, noop_hook): New
4065 (get_hline_create, get_box_create): New functions.
4066 (find_realized_face): Cancel previous change. Arg RFONT deleted.
4068 (free_face): Cancep previous change. Free face->frame_list.
4069 (serialize_hline): Do nothing if hline->width is zero.
4070 (serialize_box): Do nothing if box->width is zero.
4071 (mface__init): Setup all properties of mface__default.
4072 (mface__fini): Free hline_prop_list and box_prop_list.
4073 (mface__realize): Cancel previous change. Update
4074 face->frame_list. Setup rface->non_ascii_list.
4075 (mface__for_chars): Update rface->non_ascii_list.
4076 (mface__free_realized): Free rface->non_ascii_list.
4077 (mface__update_frame_face): New function.
4078 (mface): Initialize face->frame_list.
4079 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
4081 (mface_merge): Likewise.
4082 (mface_put_prop): If key is Mhline or Mbox, get value by
4083 get_hline_create or get_box_create respectively.
4084 (mface_put_prop): Update frame->tick and call
4085 mface__update_frame_face if necessary.
4086 (mface_update): Do nothing if func is noop_hook.
4088 * draw.c (render_glyphs): If a font is not found, use
4089 mwin__draw_empty_boxes.
4090 (alloc_gstring): Initialize gstring->tick.
4091 (get_gstring): Check gstring->tick.
4093 2004-05-17 Kenichi Handa <handa@m17n.org>
4095 * face.c (find_realized_face): Return value changed. If RFONT is
4096 NULL, avoid unnecessary checking.
4097 (free_face): Free face->realized_face_list.
4098 (mface__realize): Adjusted for the change of find_realized_face.
4099 If it returns a realized face that needs update, free it and
4100 realize a new one. Push a new realized face to
4101 frame->realized_face_list instead of appending.
4102 (mface__for_chars): Adjusted for the change of find_realized_face.
4103 Short cut if the required font is in rface->ascii_rface.
4104 (mface_put_prop): Free old value if necessary. Set need_update
4105 member of realized faces to 1.
4107 * face.h (struct MFace): Delete member tick, add member
4109 (struct MRealizedFace): Delete member tick, add member
4112 2004-05-13 Kenichi Handa <handa@m17n.org>
4114 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
4116 2004-05-12 Kenichi Handa <handa@m17n.org>
4118 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
4120 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
4121 parse it XftNameParse.
4123 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
4124 (all_fonts_scaned): New variable.
4125 (set_font_info): FAMILY may be Mnil.
4126 (add_font_info): Argument changed.
4127 (xft_list): Call add_font_info in it.
4128 (ft_list): Likewise.
4129 (ft_select): Make it work in the case family is Mnil.
4130 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
4131 (mfont__ft_fini): Set all_fonts_scaned to 0.
4133 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
4134 that is failed to open.
4136 2004-05-10 Kenichi Handa <handa@m17n.org>
4138 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
4139 device's depth is 1 (i.e. monochrome).
4141 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
4142 to work around the problem of libtool.
4144 * font-ft.c: Include <freetype/ftbdf.h>.
4145 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
4147 (mfont__ft_init): Initialize them.
4148 (ft_iso8859_1_font_list): New variable.
4149 (set_font_info): Detect a font containing iso8859-1 glyphs and
4150 register it in ft_iso8859_1_font_list. If the font is not
4151 scalable, assume it as BDF or PCF font and setup SIZE and RESY
4152 properties of the font from its properties.
4153 (add_font_list): If the font is not scalable, check if it is BDF
4154 or PCF font. If not, ignore it.
4155 (ft_select): If FAMILY is Mnil, return NULL only if the requested
4156 registry is not iso8859-1.
4157 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
4158 ft_iso8859_1_font_list.
4159 (ft_find_metric): If the font is not scalable, assume it as BDF
4160 or PCF, and get a metric from its properties.
4161 (mfont__ft_fini): Free ft_iso8859_1_font_list.
4163 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
4165 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
4166 (libm17n_la_LDFLAGS): Delete it.
4167 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
4168 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
4170 2004-05-06 Kenichi Handa <handa@m17n.org>
4172 * draw.c (compose_glyph_string): Fix previous change.
4174 2004-04-30 Kenichi Handa <handa@m17n.org>
4176 * font-ft.c (ft_list): Delete unused variable `result'.
4177 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
4179 2004-04-27 Kenichi Handa <handa@m17n.org>
4181 * m17n-X.c: Include config.h
4182 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
4183 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
4184 (MWDevice) [HAVE_XFT2]: New member xft_draw.
4185 (FRAME_CMAP, FRAME_VISUAL): New macros.
4186 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
4187 (xfont_driver): Make it static.
4188 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
4189 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
4190 info->xft_color_back.
4191 (MXftFontInfo) [HAVE_XFT2]: New type.
4192 (mwin__xft_close) [HAVE_XFT2]: New function.
4193 (mwin__xft_open) [HAVE_XFT2]: New function.
4194 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
4195 (mwin__xft_render) [HAVE_XFT2]: New function.
4197 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4198 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
4199 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
4202 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4204 * font-ft.c: Don't include FT_FREETYPE_H here.
4205 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
4206 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
4207 (MFTInfo): New member charmap_index.
4208 (MFTInfo) [HAVE_XFT2]: New member xft_info.
4209 (check_otf_filename): Renamed from check_filename. Return value
4211 (ft_set_property): This function deleted.
4212 (set_font_info): New function.
4213 (add_font_list): Argument changed. Add multiple fonts.
4214 (xft_list) [HAVE_XFT2]: New function.
4215 (ft_list) [not HAVE_XFT2]: New function.
4216 (ft_select): Add code for Xft.
4217 (close_ft): Likewise.
4218 (ft_open): Likewise.
4219 (ft_find_metric): Likewise.
4220 (ft_encode_char): Likewise.
4221 (ft_render): Likewise.
4223 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
4225 2004-04-26 Kenichi Handa <handa@m17n.org>
4227 * textprop.c (mtext_attach_property): Declare the return type as
4230 2004-04-21 Kenichi Handa <handa@m17n.org>
4232 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
4234 2004-04-09 Kenichi Handa <handa@m17n.org>
4236 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
4238 (load_command): Setup above members.
4240 2004-04-05 Kenichi Handa <handa@m17n.org>
4242 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
4244 2004-03-30 Kenichi Handa <handa@m17n.org>
4246 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
4249 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
4250 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
4252 2004-03-29 Kenichi Handa <handa@m17n.org>
4254 * Version 1.0 Patch Level 2 released.
4256 2004-03-29 Kenichi Handa <handa@m17n.org>
4258 * charset.c (make_charset): Set charset->fully_loaded and
4259 charset->simple correctly. Don't try to get charset->min_char and
4260 charset->max_char for a charset of method subset and superset.
4261 Don't load a mapping file here.
4262 (mcharset__init): Set unified_max.
4263 (mcharset__load_from_database): Free a working plist.
4265 * coding.c (mcoding__fini): Free all malloced data.
4267 * input-gui.c (win_create_ic): Set control.as_image for preediting
4270 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
4271 `count') to initialize the array.
4273 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
4276 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
4278 (mwin__create_window): Fix bug of setting a background pixel of a
4280 (mwin__adjust_window): Clear the window before drawing.
4282 * m17n-core.c (mdebug__report_object): Free array->objectes if
4284 (m17n_init_core): Don't set report_header_printed to 0 here.
4285 Fix debugging information.
4286 (m17n_fini_core): Set report_header_printed to 0 here.
4288 * m17n-core.h (mplist_deserialize): Extern it.
4290 * m17n-gui.c (m17n_fini_win): Fix debugging information.
4292 * m17n.c (m17n_fini): Fix debugging information.
4294 * mtext.c (mtext__adjust_foramt): New function.
4296 * mtext.h (mtext__adjust_foramt): Extern it.
4298 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
4300 * plist.h (mplist__deserialize): Don't extern it.
4302 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
4303 elements of symbol_table to NULL. Report about created and freed
4304 symbols if MDEBUG_FINI is set.
4306 2004-03-22 Kenichi Handa <handa@m17n.org>
4308 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
4310 * m17n.c (m17n_init): Fix the way of checking merror_code.
4312 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
4314 2004-03-22 Kenichi Handa <handa@m17n.org>
4316 * fontset.c (realize_font_group): Adjust the font size by
4317 mfont__resize before selecting a font.
4319 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
4321 2004-03-19 Kenichi Handa <handa@m17n.org>
4323 * Version 1.0 Patch Level 1 released.
4325 2004-03-19 Kenichi Handa <handa@m17n.org>
4327 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
4329 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
4331 2004-03-19 Kenichi Handa <handa@m17n.org>
4333 Re-apply the changes forgotten in the released version.
4335 * charset.c (mcharset__load_from_database): Call
4336 mchar_define_charset.
4338 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
4339 (mconv_encode_range): Put Mcoding text property.
4341 2004-03-18 Kenichi Handa <handa@m17n.org>
4343 * draw.c (Mdepth): New variable.
4344 (visual_order): Delete unused local var `pos'.
4345 (compose_glyph_string): Fix for the case that gstring->glyphs is
4346 realloced. Stop generating glyphs at TO. Fix handling of
4348 (layout_glyphs): Get metrics of all glyphs in advance. Set
4349 lbearing and rbearing of base of composition glyph correctly.
4350 Handle left-overhang glyphs correctly.
4351 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
4353 (dump_combining_code): Change the defualt off_x character to ".".
4354 (mdraw__init): Initialize Mdepth.
4356 * face.c (work_gstring): New variable
4357 (mface__init): Initialize work_gstring.
4358 (mface__fini): Free work_gstring.glyphs.
4359 (mface__realize): Don't handle videomode property here. Adjusted
4360 for the change of mfont__get_metric.
4361 (mface__for_chars): Adjusted for the change of mfont__get_metric.
4363 * face.h (enum face_gc): Moved to m17n-X.c.
4365 * font.h (struct MFontDriver): Arguments of find_metric changed.
4366 (mfont__select): Prototype adjusted.
4367 (mfont__get_metric): Likewise.
4368 (mfont__ft_drive_otf): Likewise.
4369 (mfont__flt_run): Likewise.
4371 * font.c (mfont__select): New argument layouter. If layouter is
4372 different in the registered font, make a new copy of realized
4374 (mfont__get_metric): Argument changed. Get metrics of multiple
4376 (mfont_find): Call mfont__select with layouter as Mnil.
4378 * font-flt.c (FontLayoutContext): New member rfont.
4379 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
4380 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
4382 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
4384 (NUM_POINTS): New macro.
4385 (MPointTable): New type.
4386 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
4387 (mfont__ft_drive_otf): New argument rfont.
4389 * fontset.c (realize_font_group): Adjusted for the changed of
4391 (check_fontset_element): This function deleted.
4393 * input-gui.c (adjust_window_and_draw): Locate a preedit window
4394 off the parent window if the preedit text is zero length.
4396 * internal-gui.h (struct MFrame): New members foreground,
4397 background, videomode, font.
4398 (struct MGlyphString): New member anti_alias.
4399 (MDrawPoint): New type.
4400 (mwin__draw_bitmap): Prototype deleted.
4401 (mwin__draw_points): Prototype added.
4403 * m17n-gui.h (MDrawControl): New member anti_alias.
4405 * m17n-gui.c (free_frame): Free frame->font.
4406 (mframe): Set the fontset of frame->face to the default fontset.
4408 * m17n-X.c (RGB_GC): New type.
4409 (enum gc_index): Renamed from enum face_gc. Member names changed.
4411 (struct MWDevice): Members foreground and background deleted. New
4412 member scratch_gc, gc_list.
4413 (DEFAULT_FONT, FALLBACK_FONT): New macros.
4414 (free_device): Free GCs in device->gc_list.
4415 (get_rgb_gc): New function.
4416 (get_gc): Renamed and argument changed from get_color.
4417 (get_gc_for_anti_alias): New function.
4418 (xfont_find_metric): Arguments changed. Get metrics of multiple
4420 (set_region): Argument changed. Caller changed.
4421 (xfont_render): Allways set a font in gc.
4422 (x_error_handler, x_io_error_handler): Define only if
4423 X_SET_ERROR_HANDLER is defined.
4424 (mwin__open_device): Create device->scratch_gc. Set members
4425 foreground, background, and videomode of frame. Call
4426 XSetErrorHandler and XSetIOErrorHandler only if
4427 X_SET_ERROR_HANDLER is defined.
4428 (struct gc_list): Deleted.
4429 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
4430 (mwin__realize_face): Adjusted for the change of the format of
4431 rface->info and the charge of set_region.
4432 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
4433 (mwin__draw_box): Likewise.
4434 (mwin__draw_bitmap): This function deleted.
4435 (mwin__draw_points): New function.
4436 (mwin__verify_region): Adjusted for the change of the format of
4437 rface->info and the charge of set_region.
4438 (mwin__create_window): Inherit backgound pixel from parent.
4439 (mwin__dump_gc): Adjusted for the change of the format of
4442 2004-03-16 Kenichi Handa <handa@m17n.org>
4444 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
4446 * input.c (M_key_alias): New variable.
4447 (handle_key): Try M_key_alias property of a key too.
4448 (minput__init): Initialize M_key_alias. Give that property to
4449 symbols in one_char_symbol. Fix bug of initializing
4452 * draw.c (compose_glyph_string): Don't handle
4453 ignore_formatting_char here. Include formatting characters in the
4454 range processed by a FTL.
4455 (layout_glyph_string): Handle ignore_formatting_char here.
4457 2004-03-12 Kenichi Handa <handa@m17n.org>
4459 * input-gui.c (win_create_ic): Enable bidi in status control.
4461 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
4463 2004-03-09 Kenichi Handa <handa@m17n.org>
4465 * input.c (load_input_method): If title is not specified, use the
4466 input method name as title.
4468 * m17n-X.c (get_color): Make it static.
4469 (xim_create_ic, xim_destroy_ic, x_error_handler)
4470 (x_io_error_handler): Likewise.
4472 2004-03-01 Kenichi Handa <handa@m17n.org>
4474 * Version 1.0 released.
4477 Copyright (C) 2003, 2004
4478 National Institute of Advanced Industrial Science and Technology (AIST)
4479 Registration Number H15PRO112
4481 This file is part of the m17n library.
4483 The m17n library is free software; you can redistribute it and/or
4484 modify it under the terms of the GNU Lesser General Public License
4485 as published by the Free Software Foundation; either version 2.1 of
4486 the License, or (at your option) any later version.
4488 The m17n library is distributed in the hope that it will be useful,
4489 but WITHOUT ANY WARRANTY; without even the implied warranty of
4490 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4491 Lesser General Public License for more details.
4493 You should have received a copy of the GNU Lesser General Public
4494 License along with the m17n library; if not, write to the Free
4495 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
4496 Boston, MA 02110-1301, USA.