1 2008-01-23 Kenichi Handa <handa@ni.aist.go.jp>
3 * Version 1.5.1 released.
5 2008-01-23 Kenichi Handa <handa@ni.aist.go.jp>
7 * input.c (integer_value): Fix interpretation of "@-N".
9 2008-01-17 Kenichi Handa <handa@ni.aist.go.jp>
11 * input.c (get_following_char): Fix interpretation of POS.
12 (get_following_char): Fix interpretation of "@+N".
14 2008-01-15 Kenichi Handa <handa@ni.aist.go.jp>
16 * font-ft.c (ft_drive_otf): Don't refer to otf_gstring if HAVE_OTF
19 * Makefile.am (FLT_SOURCES): Include internal-flt.h.
21 2008-01-07 Kenichi Handa <handa@ni.aist.go.jp>
23 * m17n-flt.c (UPDATE_CLUSTER_RANGE): Don't check if clustering
25 (run_rule): Call UPDATE_CLUSTER_RANGE when necessary.
26 (run_command): Check if clustering now before calling
29 2008-01-06 Kenichi Handa <handa@m17n.org>
31 * font.c (mfont__get_glyph_id): Return -1 if some code is invalid.
33 * font-ft.c (ft_drive_otf): Fix checking of negative feature.
35 * m17n-X.c (xft_find_metric): Set g->g.measured.
37 * m17n-flt.c (Mequal): New variable.
38 (m17n_init_flt): Initialize it.
39 (FontLayoutCmdRule): Merge members supported_glyph and otf_spec
40 into a new member facility.
41 (load_command): Modify parsing of Mfont_facility.
42 (run_rule): Adjuted for the change of FontLayoutCmdRule.
43 (run_otf): Adjusted metrics if a->back is nonzero.
45 2007-12-28 Kenichi Handa <handa@ni.aist.go.jp>
47 * Version 1.5.0 released.
49 2007-12-13 Kenichi Handa <handa@ni.aist.go.jp>
51 * m17n-core.c (m17n_init_core): Handle the lang. env. MDEBUG_FLT.
53 * m17n-flt.c (mdebug_flag): Set to MDEBUG_FLT.
54 (run_rule): Check if a font has the specific glyph correctly.
56 * internal.h (enum MDebugFlag): Delete MDEBUG_FONT_OTF, change
57 MDEBUG_FONT_FLT to MDEBUG_FLT.
59 * font.c (mfont__get_glyph_id): Encode g->g.code (not g->g.c).
61 * font-flt.c: Delete it.
63 2007-12-08 Kenichi Handa <handa@ni.aist.go.jp>
65 * m17n-flt.c (run_rule): Fix printing of debug info. Don't update
66 TO for the rule of SRC_HAS_GLYPH.
68 * draw.c (run_flt): Argument changed.
69 (compose_glyph_string): Adjusted for the above change.
71 2007-12-07 Kenichi Handa <handa@ni.aist.go.jp>
73 * plist.c (read_mtext_element): Don't free the malloced buffer.
75 2007-12-04 Kenichi Handa <handa@ni.aist.go.jp>
77 * m17n-core.h (merror_code): Extern it.
79 * m17n-misc.h (merror_code): Don't extern it.
81 * m17n.h: Handle the case of _M17N_FLT_H_ being defined.
83 * m17n-flt.h: Handle the case of _M17N_H_ being defined.
85 2007-11-22 Kenichi Handa <handa@ni.aist.go.jp>
87 * draw.c (compose_glyph_string): Check g->rface->layouter, not
88 g->rface->rfont->layouter.
90 * font-ft.c (ft_drive_otf): Fix setting of g->g.from and g->g.to.
92 * m17n-flt.c (FontLayoutContext): New member encoded_offset.
93 (run_rule): Use ctx->encoded_offset.
94 (run_command): Likewise.
95 (run_stages): Set ctx->encoded_offset.
97 2007-11-21 Kenichi Handa <handa@ni.aist.go.jp>
99 * m17n-flt.c (enum GlyphInfoMask): Adjusted for the change of
100 bit-size of MFLTGlyph->internal.
102 2007-11-20 Kenichi Handa <handa@ni.aist.go.jp>
104 * draw.c (visual_order): Exclude the last anchor glyph from the
107 * m17n-flt.h (MFLTGlyph): New member <adjusted>.
109 * m17n-flt.c (run_otf): Set adjusted flag of glyphs if necessary.
110 (run_stages): Likewise.
111 (load_flt): Unref top after checking plist.
113 * m17n-X.c (xft_render): Check adjusted flag of glyphs.
115 2007-11-12 Kenichi Handa <handa@ni.aist.go.jp>
117 * font-ft.c (ft_check_otf): Fix arg to OTF_check_features.
119 * m17n-flt.c (Mcombining): New variable.
120 (Mfont_facility): Renamed from Mfont_has. Referrer changed.
121 (enum FontLayoutCmdRuleSrcType): Delete SRC_EXIST, add
122 SRC_HAS_GLYPH and SRC_OTF_SPEC.
123 (FontLayoutCmdRule): Delete src.exist, add src.supported_glyph and
125 (load_command): Adjusted for the above changes.
126 (run_rule): Likewise.
127 (combining_code_from_class): Delete it.
128 (mflt_get): Check flt->name against Mcombining, not Mt.
130 * internal-flt.h (Mcombining): Extern it.
132 * draw.c (compose_glyph_string): Call run_flt with Mcombining for
133 combining characters.
135 2007-11-09 Kenichi Handa <handa@ni.aist.go.jp>
137 * face.c (mface__realize): Reset measured flag before calling
140 * m17n-flt.c (run_stages): Fix handing of off_x and off_y.
141 (setup_combining_coverage): New function.
142 (setup_combining_flt): New function.
143 (mflt_get): If flt is not found, return NULL. If name if Mt,
144 call setup_combining_flt.
145 (mflt_run): For debugging, print font family name.
147 * font-ft.c (ft_render): Fix handling of baseline_offset.
148 (ft_encapsulate): Set metrics in 26.6 fixed pixel.
149 (ft_render): Check pixel_mode to determine anti_alias.
151 * m17n-X.c (xfont_find_metric): Delete invalid "continue" line.
152 (xfont_find_metric): Set metrics in 26.6 fixed pixel.
153 (xfont_render): Set baseline_offset in pixel.
154 (xft_render): Fix handling of baseline_offset.
156 * draw.c (run_flt): Set font.font.family.
157 (compose_glyph_string): Fix handling of combining characters.
159 * fontset.c (try_font_list): Check if the named flt is surely
162 2007-11-07 Kenichi Handa <handa@ni.aist.go.jp>
164 * draw.c (analyse_bidi_level): New function.
165 (visual_order): Do reordering using the already decided
167 (compose_glyph_string): Decide bidi-level before calling flt.
169 * m17n-flt.c (mflt_run): Fix typo.
171 * font-ft.c (ft_drive_otf): Fix indexing gstring->glyphs.
173 2007-11-06 Kenichi Handa <handa@ni.aist.go.jp>
175 * draw.c (visual_order): Don't rely on the width of glyphs.
176 (run_flt): Fix culculation of g->g.to.
178 * m17n-flt.c (run_rule): Don't set error code here.
179 (run_cond): Likewise.
180 (run_otf): Fix culculation of xoff and yoff.
181 (run_command): Don't set error code here.
185 * m17n-X.c (xfont_open): Keep rfont's metrics in 26.6 fixed pixels.
186 (xfont_find_metric): Set glyph's yadv to 0.
187 (xft_find_metric): Likewise.
189 * font-ft.c (ft_open): Keep rfont's metrics in 26.6 fixed pixels.
190 (ft_find_metric): Adjust glyph's metrics.
191 (ft_encapsulate): Keep rfont's metrics in 26.6 fixed pixels.
192 (ft_drive_otf): Set mark glyph's xadv to 0.
194 * face.c (mface__for_chars): Adjusts the unit of face's ascent and
197 2007-10-29 Kenichi Handa <handa@m17n.org>
199 * m17n-flt.h (struct _MFLTOtfSpec): Adjusted for the new FLT handling.
200 (mflt_get): Adjusted for the argument change.
201 (mflt_name): Adjusted for the return value change.
203 * m17n-flt.c (Mgenerator, Mend): New variables.
204 (flt_min_coverage, flt_max_coverage): New variables.
207 (Mfont_has): Renamed from Mexist. Referrers chagned.
208 (gen_otf_tag): Handle the trailing whitespaces.
209 (otf_count_features, otf_store_features): Fix for negative features.
210 (parse_otf_command): Adjusted for the change of MFLTOtfSpec.
211 (load_otf_command): Likewise.
212 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
213 (load_flt): Argument changed. Caller changed.
214 (free_flt_list): New function.
215 (run_rule): Adjusted for the change of FontLayoutContext.
216 (mflt_run): Adjusted for the change of FontLayoutContext.
218 * m17n-gui.c (m17n_init_win): Call m17n_init_flt.
219 (m17n_fini_win): Call m17n_fini_flt.
221 * m17n-gui.h: Include m17n-flt.h.
223 * m17n-gd.c: Adusted for the change of MGlyph.
225 * m17n-X.c: Adusted for the change of MGlyph.
226 (xft_check_otf, xft_drive_otf): New functions.
228 * internal-gui.h (MGlyph): Modified for new FLT handling.
230 * fontset.c (try_font_list): Adusted for the change of MGlyph.
232 * font-ft.c: Adjusted for the change of MGlyph.
233 (ft_check_cap_otf): Renamed from ft_check_otf. Callers changed.
234 (get_glyph_metric): Deleted.
235 (ft_check_otf): New function.
236 (ft_drive_otf): New fucntion.
238 * font.c: Adjusted for the change of MGlyph.
239 (mfont__init): Don't call mfont__flt_init.
240 (mfont__fini): Don't call mfont__flt_fini.
241 (mfont__get_glyph_id, mfont__get_metrics): New functions.
243 * font.h (struct MRealizedFont): New members x_ppem and y_ppem.
244 (MFLTFontForRealized): New struct.
245 (struct MFontDriver): New members check_otf and drive_otf.
246 (mfont__get_glyph_id, mfont__get_metrics): Extern them.
248 * face.c: Adjusted for the change of MGlyph.
250 * draw.c: Adjusted for the change of MGlyph.
252 * m17n.c (m17n_init): Don't call mchar_init.
254 * m17n-core.c (m17n_init_core): Call mchar_init.
256 * m17n-core.h (mchartable_min_char, mchartable_max_char): Extern them.
258 * input.c: Include "m17n.h" instead of "m17n-gui.h".
260 * chartab.c (mchartable): Initialize table->min_char to -1.
261 (mchartable_min_char): New function.
262 (mchartable_max_char): New function.
264 * Makefile.am (GUI_SOURCES): Delete font-flt.c.
265 (libm17n_gui_la_LIBADD): Add ${top_builddir}/src/libm17n-flt.la.
267 2007-10-12 Kenichi Handa <handa@m17n.org>
269 * m17n-core.h (Mcharset): Extern it.
270 Move detabase related declarations from m17n.h.
272 * m17n-flt.h: Include m17n-core.h instead of m17n.h.
273 (struct _MFLTOtfFeatures): New struct.
274 (struct _MFLTOtfSpec): Delete gsub, gpos, etc, add gsub_gpos.
275 (struct _MFLTFont): Delete otf, add check_otf.
276 (MCHAR_INVALID_CODE): Define it.
278 * plist.c (read_mtext_element): Simplify the code.
280 * m17n.h: Move database related declarations to m17n-core.h
281 (Mharset): Don't extern it.
283 * m17n.c (m17n_init): Don't call mdatabase__init.
285 * m17n-gd.c (read_rgb_txt): Check also /etc/X11/rgb.txt. Downcase
288 * m17n-flt.c: Include m17n-core.h instead of m17n.h.
289 (Mexist): New variable.
290 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
291 (FontLayoutCmdRule): New member src.exist.
292 (parse_otf_command): Handle gsub_count and gpos_count separately.
293 (load_otf_command): Adjusted for the change of MFLTOtfSpec.
294 (load_command): Handle the command "exist".
295 (free_flt_command): Adjusted for the change of MFLTOtfSpec.
296 (run_rule): Handle the case SRC_EXIST.
297 (run_otf): Adjusted for the change of MFLTOtfSpec.
298 (run_command): Check the range of FROM.
299 (check_otf_spec): Delete it.
300 (m17n_init_flt): Call m17n_init_core instead of m17n_init.
302 (m17n_fini_flt): Call m17n_fini_core instead of m17n_fiini.
303 (mflt_find): Call font->check_otf instead of check_otf_spec.
304 (mflt_run): Keep the metrics in 26.6 fixed point.
306 * m17n-core.c (mdatabase__finder, mdatabase__loader): Delete them.
307 (m17n_init_core): Call mdatabase__init.
309 * m17n-X.c (device_open): Use mplist_add, not mplist_push.
311 * internal.h (mdatabase__finder, mdatabase__loader): Delete externs
314 * font-flt.c (Mexist): New variable.
315 (enum FontLayoutCmdRuleSrcType): New enum SRC_EXIST.
316 (FontLayoutCmdRule): New member src.exist.
317 (load_category_table): Use isalnum, not isalpha.
318 (load_command): Check the command "exist".
319 (run_rule): Hande the case SRC_EXIST.
320 (run_command): Check the range of FROM.
321 (mfont__flt_init): Initialize Mexist.
323 * draw.c (layout_glyphs): Fix calculation of off_x and off_y.
325 * database.h (mdatabase__load_charset_func): Extern it.
327 * database.c: Include m17n-core.h instead of m17n.h.
328 (load_chartable): Use mtext__from_data.
329 (load_charset): Moved to charset.c
330 (load_database): Call mdatabase__load_charset_func instead of
332 (mdatabase__load_charset_func): New variable.
333 (mdatabase__init): Initialize mdatabase__load_charset_func and
334 Mcharset. Don't set mdatabase__finder and mdatabase__loader.
335 (mdatabase__save): Use fwrite, not mconv_encode_stream.
336 (Mcharset): Declare it here.
338 * charset.c: Include "database.h.".
339 (load_charset): Moved from database.c.
340 (mcharset__init): Initialize mdatabase__load_charset_func, don't
343 * character.c (mchar_define_property): Call mdatabase_find directly.
344 (mchar_get_prop): Call mdatabase_add directly.
345 (mchar_put_prop): Call mdatabase_load directly.
346 (mchar_get_prop_table): Likewise.
348 * Makefile.am (libm17n_core_la_SOURCES): Add database.[ch].
349 (libm17n_la_SOURCES): Remove database.[ch].
350 (libm17n_flt_la_LIBADD): Delete libm17n.la, add libm17n-core.la.
352 2007-09-18 Kenichi Handa <handa@m17n.org>
354 * face.c (mface__realize): Try Freetype based font at first.
356 * font.c: Include <ctype.h>
358 2007-09-16 Kenichi Handa <handa@m17n.org>
360 * m17n-flt.c (load_flt): New arg full. If full is zero, load only
362 (run_otf): Call font->get_metrics, not font->get_metric.
363 (run_stages): Likewise.
364 (CHECK_FLT_COVERAGE): New macro.
365 (CHECK_FLT_STAGES): Call load_flt with the second arg 1.
366 (check_otf_spec): New function.
367 (m17n_fini_flt): Unref flt->coverage.
368 (mflt_find): Argument changed.
369 (mflt_name): New function.
370 (mflt_coverage): Use CHECK_FLT_COVERAGE.
372 * m17n-flt.h (MFLTFont): Member get_metrics renamed from get_metric.
373 (mflt_find): Prototype adjusted.
374 (mflt_name): Extern it.
376 2007-09-14 Kenichi Handa <handa@m17n.org>
378 * m17n-flt.h (struct _MFLTGlyph): Change signedness of members.
380 * font-flt.c (run_otf): Make debug info printing comaptible with
382 (run_command): Likewise.
383 (mfont__flt_run): Likewise.
385 * m17n-flt.c (UPDATE_CLUSTER_RANGE): ctx->cluster_begin_idx is
386 invalid only when it's negative.
388 (run_command): Likewise.
389 (mflt_run): Initialize ctx.cluster_begin_idx to -1.
391 2007-09-10 Kenichi Handa <handa@m17n.org>
393 * m17n-flt.h (struct _MFLTGlyph): New member encoded and measured.
394 (struct _MFLTFont): Prototype of get_glyph_id changed.
396 * m17n-flt.c (enum GlyphInfoMask): Delete EncodedMask and
398 (GAPPEND): Delete this macro.
399 (GET_ENCODED, SET_ENCODED, GET_MEASURED, SET_MEASURED): Adjusted
400 for the change of MFLTGlyph. Caller changed.
401 (run_otf): Simply calls font->get_glyph_id.
402 (run_command): Reset g->encoded and g->measured for direct code.
403 (positioning): Delete this function.
404 (run_stages): Simply calls font->get_glyph_id and font->get_metric.
406 2007-09-07 Kenichi Handa <handa@m17n.org>
408 * draw.c (compose_glyph_string): Improve script detection.
410 2007-09-06 Kenichi Handa <handa@m17n.org>
412 * m17n-flt.h (mflt_get): Extern it.
414 * m17n-flt.c (run_stages): Call positioning only if
415 font->get_metric is non-NULL.
416 (CHECK_FLT_STAGES): Fix typo.
417 (mflt_get): New function.
419 * font-flt.c (mfont__flt_run): Improve debug info printing.
421 2007-09-04 Kenichi Handa <handa@m17n.org>
423 * m17n-flt.c (MFontLayoutTable): Delete this type.
424 (struct _MFLT): New member mdb and coverage.
425 (list_flt): Set flt->mdb.
426 (load_generator): Argument and return value changed. Caller
428 (get_font_layout_table): Delete this function.
429 (run_stages): Argument changed. Caller changed.
430 (CHECK_FLT_STAGES): New macro.
431 (mfont__flt_encode_char): Argument changed.
432 (mflt_find): Likewise.
433 (mflt_coverage): New function.
434 (mflt_run): Argument changed.
435 (mdebug_dump_flt): Likewise.
437 * m17n-flt.h (mflt_coverage): Extern it.
438 (mflt_find): Prototype adjusted.
440 2007-09-03 Kenichi Handa <handa@m17n.org>
442 * internal.h (MTABLE_CALLOC_SAFE, MSTRUCT_CALLOC_SAFE): New macros.
444 * database.c (mdatabase__props): New function.
446 * database.h (mdatabase__props): Extern it.
448 * m17n-flt.h (struct _MFLTGlyphString): Delete user_data, add
450 (struct _MFLTFont): Add suitable_p.
451 (mflt_find): Extern it.
453 * m17n-flt.c: Include "database.h".
454 (struct _MFLT): New struct.
455 (list_flt): New function.
456 (load_flt): Don't update flt_list.
457 (get_font_layout_table): Use flt_list.
458 (m17n_init_flt): Don't initialize flt_list.
459 (m17n_fini_flt): Adjusted for the change of flt_list.
460 (mflt_find): New function.
461 (mflt_run): Fix debug printing.
463 2007-08-23 Kenichi Handa <handa@m17n.org>
465 * m17n-flt.c (run_otf): Remove #ifdef HAVE_OTF and #endi.
466 (run_stages): Print separator in encoded string as "|".
468 2007-08-23 Kenichi Handa <handa@m17n.org>
470 * font-flt.c (mfont__flt_run): Don't calculate a glyph metric if
471 the glyph is already handled by OTF.
473 2007-08-21 Kenichi Handa <handa@m17n.org>
475 * font-ft.c (ft_check_capability): Check cap->script_tag at first.
477 2007-08-20 Kenichi Handa <handa@m17n.org>
479 * font-flt.c (mfont__flt_run): Get glyph metrics before printing
482 2007-08-17 Kenichi Handa <handa@m17n.org>
484 * m17n-flt.h (struct _MFLTGlyphString): Member pointer renamed to
486 (MFLTOtfSpec): Renamed from MFLT_OTF_Spec.
487 (MFLTFont): Prototype of the member drive_otf adjusted.
489 * m17n-flt.c (run_stages): Fix handling of padding.
491 * font-ft.c (get_glyph_metric): New function.
492 (DEVICE_DELTA): Return 26.6 fixed point value.
493 (adjust_anchor): Likewise.
494 (mfont__ft_drive_otf): Use get_glyph_metric.
496 * font-flt.c (mfont__flt_run): Pay attention to padding on
499 2007-08-16 Kenichi Handa <handa@m17n.org>
501 * m17n-flt.c (run_stages): Fix typo.
503 * font-ft.c (adjust_anchor): Argument changed. Calculte based on
505 (mfont__ft_drive_otf): Don't call OTF_check_features for GPOS.
506 Adjusted for the argument change of adjust_anchor. Calculte based
509 2007-08-15 Kenichi Handa <handa@m17n.org>
511 * charset.c (mcharset__load_from_database): Set mdebug_flag
512 instead of mdebug_mask.
514 * coding.c (mcoding__load_from_database): Set mdebug_flag instead
517 * database.c (load_database): Set mdebug_flag instead of
519 (mdatabase__load_for_keys): Likewise.
521 * draw.c: Include "internal-flt.h".
522 (dump_combining_code): Don't subtract 128 from combining code
525 * font-flt.c: Include "internal-flt.h". Set mdebug_flag instead
527 (run_rule): Print debug info only when MDEBUG_FLAG is greater than
529 (run_cond): Likewise.
531 (run_command): Likewise.
532 (mfont__flt_run): Change format of debug info.
534 * font-ft.c: Include "internal-flt.h".
535 Set mdebug_flag instead of mdebug_mask.
536 (mfont__ft_drive_otf): Fix arg to OTF_check_features.
538 * input.c: Set mdebug_flag instead of mdebug_mask.
539 (shift_state): New MDEBUG_FLAG macro.
540 (preedit_commit): Likewise.
543 * internal-flt.h: New file.
545 * internal-gui.h (MAKE_COMBINING_CODE, COMBINING_CODE_OFF_Y)
546 (COMBINING_CODE_OFF_X, COMBINING_CODE_BASE_X)
547 (COMBINING_CODE_BASE_Y, COMBINING_CODE_ADD_X)
548 (COMBINING_CODE_ADD_Y, MAKE_COMBINING_CODE_BY_CLASS)
549 (COMBINING_BY_CLASS_P, COMBINING_CODE_CLASS)
550 (MAKE_PRECOMPUTED_COMBINDING_CODE, COMBINING_PRECOMPUTED_P): Move
551 these macros to internal-flt.h.
553 * internal.h (M17N_OBJECT_ADD_ARRAY): Adjusted for the change of
555 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Likewise.
556 (enum MDebugMaskBit): Delete this enum.
557 (enum MDebugFlag): New enum.
558 (mdebug__flag): Don't extern it.
559 (mdebug__flags): Extern it.
560 (MDEBUG_FLAG): New macro.
561 (MDEBUG_PRINT0): Use the macro MDEBUG_FLAG.
562 (MDEBUG_DUMP, MDEBUG_PUSH_TIME, MDEBUG_POP_TIME)
563 (MDEBUG_PRINT_TIME): Likewise.
565 * m17n-X.c (xfont_open): Set mdebug_flag instead of mdebug_mask.
566 (xfont_list): Likewise.
568 * m17n-core.c (mdebug__flag): Delete this variable.
569 (mdebug__flags): New variable.
570 (SET_DEBUG_FLAG): Make it a function.
571 (m17n_init_core): Set mdebug_flag instead of mdebug_mask.
572 (m17n_fini_core): Likewise.
574 * m17n-gui.c (m17n_init_win): Set mdebug_flag instead of mdebug_mask.
575 (m17n_fini_win): Likewise.
577 * m17n-misc.h (enum MErrorCode): Add MERROR_FLT.
579 * m17n.c (m17n_init): Set mdebug_flag instead of mdebug_mask.
580 (m17n_fini): Likewise.
582 * symbol.c (msymbol__free_table): Adjusted for the change of
585 * Makefile.am (BASICBUILDS): Add libm17n-flt.la.
586 (BASICHEADERS): Add m17n-flt.h.
587 (FLT_SOURCES): New variable.
588 (libm17n_flt_la_SOURCES, libm17n_flt_la_LIBADD)
589 (libm17n_flt_la_LDFLAGS): Likewise.
591 * m17n-flt.h: New file.
593 * m17n-flt.c: New file created by modifying font-flt.c.
595 2007-07-13 Kenichi Handa <handa@m17n.org>
597 * Version 1.4.0 released.
599 2007-07-12 Kenichi Handa <handa@m17n.org>
601 * input.c: Fix doxygen @ref commands.
603 2007-07-10 Kenichi Handa <handa@m17n.org>
605 * m17n-core.h (M17NFunc): Fix typo of Doxygen directive.
607 2007-07-09 Kenichi Handa <handa@m17n.org>
609 * m17n-core.h (M17N_BEGIN_HEADER, M17N_END_HEADER): New macros.
611 * m17n.h: Include m17n-core.h if not yet done. Use macros
612 M17N_BEGIN_HEADER and M17N_END_HEADER.
614 * m17n-gui.h: Likewise.
616 * m17n-misc.h: Likewise.
618 2007-06-13 Kenichi Handa <handa@m17n.org>
620 * font-flt.c (load_command): Prepend "^" in the regular expression.
622 2007-06-11 Kenichi Handa <handa@m17n.org>
624 * language.c (mlanguage_name_list): Fix previous change.
626 * coding.c (mcoding__load_from_database): Add aliases in
627 coding_definition_list.
629 2007-06-10 Kenichi Handa <handa@m17n.org>
631 * language.c (mlanguage_name_list): Fix previous change.
633 2007-06-08 Kenichi Handa <handa@m17n.org>
635 * input.c (update_candidate): Copy candidate_list earlier.
636 (re_init_ic): Provide pseudo initialize state if none.
638 2007-06-05 Kenichi Handa <handa@m17n.org>
640 * input.c (preedit_insert): Print debug information.
642 * database.c (expand_wildcard_database): New function.
643 (mdatabase_list): Fix handling of wildcard database.
645 * language.c (load_lang_name): New function.
646 (mlang__fini): Cancel the last two changes.
647 (mlanguage_name_list): New arg script and territories. Use
650 * m17n.h (mlangauge_name_list): Adjusted.
652 2007-06-04 Kenichi Handa <handa@m17n.org>
654 * input.c (open_im): Check if the input method has at least one
657 2007-06-01 Kenichi Handa <handa@m17n.org>
659 * input.c (shift_state): Change the format of debug print.
660 (preedit_commit): New arg need_prefix. Caller changed.
661 (update_candidate): Copy candidate_list.
662 (take_action_list): Likewise.
663 (handle_key): Change the format of debug print.
665 * font-flt.c (load_flt): Ignore unknown directives.
667 2007-05-25 Kenichi Handa <handa@m17n.org>
669 * m17n-core.c (mdebug__unregister_object): Small optimization.
671 * database.c (find_file): Merged into get_database_file.
672 (get_database_file): New arg result. Caller changed.
673 (mdatabase__check): Fix the logic.
675 2007-05-24 Kenichi Handa <handa@m17n.org>
677 * database.c (find_database): If unprocessed wildcard database is
678 found, register database filed and recursively call find_database.
679 (free_db_info): Unref db_info->properties.
680 (register_database): New arg properties. Delete code for
681 initializing mdatabase__list.
682 (register_databases_in_files): Argument changed. Caller changed.
683 (mdatabase__update): Don't list files by glob here.
684 (mdatabase_list): If unprocessed wildcard database is found,
685 register database filed and recursively call mdatabase_list.
687 * database.h (enum MDatabaseStatus): New enum
688 MDB_STATUS_AUTO_WILDCARD.
690 * input.c (load_branch): Fix previous change.
691 (update_global_info): If the global database is not found, return -1.
693 2007-05-23 Kenichi Handa <handa@m17n.org>
695 * database.c (Mversion): New variable.
696 (mdatabase__init): Initialize it.
697 (register_database): New arg properties. Caller changed.
698 (register_databases_in_files): Don't check version here.
699 (mdatabase__update): Likewise.
701 * database.h (MDatabaseInfo): New member properties.
703 2007-05-21 Kenichi Handa <handa@m17n.org>
705 * language.c: Include <ctype.h>
706 (mlanguage__info): Use strncasecmp (not memcmp).
707 (mlanguage_name): Downcase language name for backward
710 * input.c (filter): Don't check Mlanguage property of
713 2007-05-18 Kenichi Handa <handa@m17n.org>
715 * language.c (mlanguage_name): Fix it to handle M-text English
718 * input.c (config_command): Set NAME before using it.
719 (load_branch): Try to resolve a map name by variables.
721 2007-05-17 Kenichi Handa <handa@m17n.org>
723 * language.c (mlang__fini): Fix previous change.
725 2007-05-16 Kenichi Handa <handa@m17n.org>
727 * plist.c (free_plist): Cancel the last change.
728 (write_element): Check if PLIST is nested.
729 (mplist__from_plist): Label a plist as nested if appropriate.
730 (mplist__from_alist): Label a plist as nested.
731 (mplist__conc): Check the value of PL before referring it. Label
732 a plist as nested if appropriate.
733 (mplist_copy): Label a plist as nested if appropriate.
734 (mplist_put_func): Return Mnil if KEY is a managing key.
735 (mplist_push): Label a plist as nested if appropriate.
737 * plist.h (MPLIST_SET_NESTED_P): Return 1 iff plist->control.flag
740 * language.c (mlang__fini): Unref each element of langname_list.
742 2007-05-14 Kenichi Handa <handa@m17n.org>
744 * language.c: Include <string.h> and <locale.h>.
745 (langname_list): New variable.
746 (load_lang_script_list): Exclude invalid list elements.
747 (mlang__init): Initialize langname_list.
748 (mlang__fini): Unref langname_list.
749 (mlanguage__info): Adjusted for the change of English
750 name (symbol->M-text).
751 (mlanguage_name): Label it as obsolete.
752 (mlanguage_name_list): New function.
754 * m17n.h (mlanguage_name_list): Extern it.
756 * locale.c (make_locale): Fix setting of members of locale.
758 * plist.c (free_plist): Unref also nested plist.
760 2007-05-11 Kenichi Handa <handa@m17n.org>
762 * coding.c (mconv_reset_converter): Set internal->used to 0.
764 2007-05-08 Kenichi Handa <handa@m17n.org>
766 * input.c (check_description): Force copying the translated text.
768 2007-05-02 Kenichi Handa <handa@m17n.org>
770 * input.c (minput_save_config): Unref unnecessary plist. Use
771 free_im_list to free im_config_list.
773 2007-04-20 Kenichi Handa <handa@m17n.org>
775 * input.c (config_command): Fix previous change again.
776 (config_variable): Likewise.
777 (minput_config_command): Fix for the case of setting back to
779 (minput_config_variable): Likewise.
780 (minput_save_config): Include nil as documentation of customized
783 2007-04-05 Kenichi Handa <handa@m17n.org>
785 * input.c (config_command): Fix previous change.
786 (config_variable): Likewise.
788 * plist.c (mplist_get_func): Fix for backward compatiblity.
790 2007-04-04 Kenichi Handa <handa@m17n.org>
792 * input.c (minput_get_command, minput_config_command): Fix example
795 2007-03-29 Kenichi Handa <handa@m17n.org>
797 These changes are to avoid unsafe casting of a function pointer.
799 * face.h (enum MFaceProperty): Delete MFACE_HOOK_FUNC.
800 (struct MFace): New member hook.
802 * face.c (serialize_face): Adjusted for the change of MFace.
803 (deserialize_face): Likewise.
804 (mface__init): Likewise. Use msymbol_put_func.
805 (mface__realize): Adjusted for the change of MFace. Avoid
807 (mface_get_prop): Adjusted for the change of MFace.
808 (mface_put_prop): Likewise.
809 (mface_get_hook): New function.
810 (mface_put_hook): New function.
811 (mface_update): Adjusted for the change of MFace.
813 * input-gui.c (win_callback): Use mplsit_get_func.
814 (minput__win_init): Use mplsit_put_func.
816 * input.c (take_action_list): Use mplist_get_func.
817 (init_ic_info): Likewise.
818 (fini_ic_info): Likewise.
819 (minput_callback): Likewise.
820 (minput__init): Use mplist_put_func.
822 * language.c (mlang__init): Use msymbol_put_func.
824 * m17n-core.h (M17NFunc): New function type.
825 (M17N_FUNC): New macro.
826 (msymbol_put_func, msymbol_get_func): Extern them.
827 (mplist_put_func, mplist_get_func): Extern them.
829 * m17n-gui.h (mface_get_hook, mface_put_hook): Extern them.
831 * m17n-gui.c (mframe): Add a proper casting.
833 * plist.h (struct MPlist): Make the member val a union.
834 (MPLIST_VAL): Adjusted for the above change.
835 (MPLIST_FUNC): New macro.
836 (MPLIST_VAL_FUNC_P, MPLIST_SET_VAL_FUNC_P): New macros.
838 * plist.c (mplist_put_func, mplist_get_func): New functions.
840 * symbol.c (msymbol__fini): Use MPLIST_VAL.
841 (msymbol_put_func, msymbol_get_func): New functions.
843 * textprop.c (mtext_serialize): Use msymbol_get_func.
844 (mtext_deserialize): Likewise.
846 2007-03-28 Kenichi Handa <handa@m17n.org>
848 * input.c (get_candidate_list): Avoid unnecessary unref.
850 2007-03-23 Kenichi Handa <handa@m17n.org>
852 * database.c (mdatabase__update): Unref plist at the tail.
854 2007-03-21 Kenichi Handa <handa@m17n.org>
856 * input.c (update_custom_info): Fix for the case "name == Mnil &&
858 (config_command): Fix for the case that configuration is
860 (config_variable): Likewise.
861 (minput_config_command): If keyseqlist is an empty list, cancel
863 (minput_config_variable) If value is an empty list, cancel the
865 (minput_save_config): Handle cancellation of config and customize
868 2007-03-15 Kenichi Handa <handa@m17n.org>
870 * input.c (minput_config_variable): Check custom->vars (not
873 2007-03-01 Kenichi Handa <handa@m17n.org>
875 * input.c (reload_im_info): Setup cmds, vars, and title of
877 (check_variable_value): Fix the return value.
879 * database.c (mdatabase__check): If necessary, update database and
882 2007-02-28 Kenichi Handa <handa@m17n.org>
884 * database.c (get_dir_info): Set dir_info->status to
886 (check_version): New function.
887 (register_database): Don't call find_database.
888 (register_databases_in_files): Don't register a database of
890 (mdatabase__update): Likewise. Avoid unnecessary scanning.
892 * database.h (enum MDatabaseStatus): New membes MDB_STATUS_UPDATED
893 and MDB_STATUS_OUTDATED.
895 * font.h (struct MFont): Types of members type, source, and
896 spacing changed to unsigned.
898 * internal-gui.h (struct): Types of members category and type
901 * internal.h (struct MText): Types of members format and coverage
904 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 5.
905 (M17NLIB_VERSION_NAME): Changed to "1.3.5".
907 2007-02-23 Kenichi Handa <handa@m17n.org>
909 * input.c (Mpop): New variable.
910 (fully_initialize): Initialize Mpop.
911 (parse_action_list): Handle Mpop.
912 (take_action_list): Likewise.
913 (handle_key): When a key is unhandled, shift to the initial state
914 only if the current state has no branch action.
916 2007-02-12 Kenichi Handa <handa@m17n.org>
918 * input.c (get_preceding_char): Unref mt if necessary.
919 (get_following_char): Likewise.
920 (parse_action_list): Fix handling of `insert' action as
922 (get_candidate_list): Fix for handling (("CANDIDATE1" ...)).
923 (take_action_list): Check invalid candidate list.
925 2007-02-06 Kenichi Handa <handa@m17n.org>
927 * input.c (integer_value): Check also ic->produced for @-N.
929 2007-01-26 Kenichi Handa <handa@m17n.org>
931 * database.c (mdatabase__update): Check mdatabase__dir_list from
934 * font-ft.c (STRDUP_LOWER): Don't ignore the tailing spaces.
936 2007-01-12 Kenichi Handa <handa@m17n.org>
938 * input.c (handle_key): Handle a branch action of the initial
941 2007-01-10 Kenichi Handa <handa@m17n.org>
943 * m17n-gd.c (gd_render): Delete superfluous line.
945 2006-12-26 Kenichi Handa <handa@m17n.org>
947 * m17n.h (minput_callback): Extern it.
949 * input.h (minput__callback): Delte extern.
951 * input.c (get_surrounding_text): Adjusted for the change of
952 minput__callback to minput_callback.
953 (delete_surrounding_text): Likewise.
954 (minput_create_ic): Likewise.
955 (minput_destroy_ic): Likewise.
956 (minput_filter): Likewise.
957 (minput_set_spot): Likewise.
958 (minput_toggle): Likewise.
959 (minput_reset_ic): Likewise.
961 (preedit_commit): Reset ic->candidate_index, ic->candidate_from,
962 and ic->candidate_to to 0.
963 (minput_callback): Renamed from minput__callback.
965 * input-gui.c (win_callback): Adjusted for the change of
966 minput__callback to minput_callback.
968 2006-12-15 Kenichi Handa <handa@m17n.org>
970 * font-ft.c (ft_add_font): Fix typo.
972 2006-12-06 Kenichi Handa <handa@m17n.org>
974 * Version 1.3.4 released.
976 2006-11-16 Kenichi Handa <handa@m17n.org>
978 * input.c (parse_action_list): Allow (undo 0).
979 (adjust_markers): New function.
980 (preedit_insert, preedit_delete): Call adjust_markers.
981 (preedit_replace): New function.
982 (update_candidate): Call preedit_replace instead of preedit_insert
984 (filter): When ic_info->commit_key_head is nonzero, shift input
985 event keys even if there's no committed text.
987 2006-11-10 Kenichi Handa <handa@m17n.org>
989 * input.h (MInputContextInfo): New member commit_key_head.
991 * input.c (preedit_commit): Update ic_info->commit_key_head.
992 (take_action_list): Reset ic_info->commit_key_head on Mundo.
993 (filter): When committed, shift keys by ic_info->commit_key_head.
995 2006-10-30 Kenichi Handa <handa@m17n.org>
997 * input.c (preedit_delete): Fix typo.
998 (take_action_list): Print more debugging information. Allow
999 variable in arg of 'select' and `pushback'.
1001 * database.c (gen_database_name): Don't put extra space.
1002 (load_database): Print debugging information.
1003 (register_databases_in_files): New arg headlen. Callers changed.
1004 (mdatabase__load_for_keys): Shorten debugging information.
1005 (mdatabase_load): Don't print debugging information here.
1007 2006-10-27 Kenichi Handa <handa@m17n.org>
1009 * input.c (marker_code): New arg surrounding. Callers changed.
1010 (surrounding_pos): Check if name[0] == '@'.
1011 (integer_value): Fix for the change semantics of `@-N' and `@+N'.
1012 (take_action_list): Likewise.
1013 (get_preceding_char): If POS is zero, always call
1014 get_surrounding_text.
1016 2006-10-19 Kenichi Handa <handa@m17n.org>
1018 * input.c (load_variables): Fix setting of `global'.
1020 2006-10-16 Kenichi Handa <handa@m17n.org>
1022 * draw.c (draw_background): Be sure to set *to_x.
1023 (render_glyph_string): If from == to, just return.
1025 2006-10-18 Kenichi Handa <handa@m17n.org>
1027 * database.c (get_dir_info): Return NULL if the directory name is
1029 (register_databases_in_files): Call register_database with
1031 (mdatabase__update): Fix logic. Call register_database with
1033 (mdatabase_define): Call register_database with
1034 MDB_STATUS_EXPLICIT.
1036 * input.c (delete_surrounding_text): Be sure to set members
1037 preceding_text and following_text to NULL.
1038 (shift_state): Save variable values in ic_info->vars_saved.
1039 (preedit_commit): Don't print debug information here. Don't
1040 change ic_info->keys here.
1041 (get_candidate_list): Don't ref plist.
1042 (take_action_list): Don't unref return value of
1043 get_candidate_list. For undo, reset ic->produced and recover
1044 ic_info->vars. Be sure to set ic->candidate_list to NULL after
1046 (init_ic_info): Set ic_info->vars_saved.
1047 (fini_ic_info): Unref ic_info->vars_saved.
1048 (re_init_ic): Be sure to set ic->candidate_list to NULL after
1050 (filter): Be sure to set members preceding_text and following_text
1051 to NULL. Print debug information about produced text. Delete
1052 processed keys from ic_info->keys.
1054 * input.h (MInputContextInfo): New member vars_saved.
1056 2006-10-16 Kenichi Handa <handa@m17n.org>
1058 * database.c (mdatabase__update): Fix the way to get db_info.
1060 2006-10-02 Kenichi Handa <handa@m17n.org>
1062 * font.h (struct MFont): New member `multiple_sizes'. Bit-size of
1063 `size' changed to 24.
1065 * font.c (xlfd_unparse_name): Adjusted for the change of
1067 (font_score): Likewise.
1068 (mfont__set_spec_from_face): Set spec->multiple_sizes to 0.
1070 * m17n-X.c (MFontX, _MFontX): Deleted.
1071 (SET_SIZE, HAVE_SIZE): Deleted.
1072 (free_display_info): Adjusted for the change of
1073 disp_info->font_list format.
1074 (xfont_registry_list): Likewise.
1075 (xfont_open): Likewise.
1076 (xfont_list): Likewise.
1077 (xfont_encode_char): Ignore size to find a realized font.
1078 (MRealizedFontXft): Change the order of members to make it
1079 compatible with MRealizedFontFT.
1081 2006-09-27 Kenichi Handa <handa@m17n.org>
1083 * font.c (mfont_match_p, mfont_open, mfont_encapsulate)
1084 (mfont_close): Add comments.
1086 * mtext-lbrk.c (mtext_line_break): Add comment.
1088 2006-09-26 Kenichi Handa <handa@m17n.org>
1090 * input.c (minput_get_description): Handle description about
1091 inclusion-only input methods.
1093 2006-09-21 Kenichi Handa <handa@m17n.org>
1095 * input.c (M_gettext): New variable.
1096 (fully_initialize): Initialize M_gettext.
1097 (check_description): New function.
1098 (load_commands): Call check_description.
1099 (config_all_commands): Be sure to unref pl.
1100 (load_variables): Call check_description.
1101 (config_all_variables): Be sure to unref pl.
1102 (load_im_info): Call check_description.
1104 * internal.h [ENABLE_NLS]: Include <libintl.h> and define _.
1106 * m17n-core.c (m17n_init_core) [ENABLE_NLS]: Call bindtextdoman
1107 and bind_textdomain_codeset.
1109 * Makefile.am (AM_CPPFLAGS): Add -DGETTEXTDIR=...
1111 2006-09-15 Kenichi Handa <handa@m17n.org>
1113 * input.c (reload_im_info): Update custom and global info.
1114 (init_ic_info): Fix previous change.
1116 2006-09-14 Kenichi Handa <handa@m17n.org>
1118 * database.c: Include <libgen.h>.
1119 (mdatabase__lock): Make a directory if necessary.
1121 * input.c (resolve_command): Adjusted for the format change of
1122 configured_cmds member.
1123 (load_commands, load_variables): Fix for errornous data handling.
1124 (config_command, config_variable): New function.
1125 (config_all_commands, config_all_variables): Renamed from
1126 config_commands and config_variables. Utilize the above function.
1127 (check_variable_value): Argument changed. Callers changed.
1128 (load_im_info): Call config_all_commands and config_all_variables.
1129 (init_ic_info): Adjusted for the format change of configured_vars
1131 (minput__init): Initialize Mcustomized, Mconfigured, and
1133 (Mcustomized, Mconfigured, Minherited): New variables.
1134 (minput_get_command): Be sure to return NULL if an input method
1135 use no local command.
1136 (minput_get_variable): Be sure to return NULL if an input method
1137 use no local variable.
1138 (minput_config_command, minput_config_variable)
1139 (minput_save_config): Adjusted for the format change of
1140 configured_cmds and configured_vars members.
1142 * plist.c (write_element): Delete superfluous ':'.
1144 2006-09-13 Kenichi Handa <handa@m17n.org>
1146 * m17n.h (Minherited, Mcustomized, Mconfigured): Extern them.
1147 (minput_config_file): Extern it.
1149 * draw.c (Minherited): Declaration moved to input.c.
1150 (mdraw__init): Don't initialize Minherited here.
1152 * database.c (mdatabase__unlock): Be sure to unlink uniq file.
1154 2006-09-07 Kenichi Handa <handa@m17n.org>
1156 * textprop.c (mtext_serialize): Call mplist__serialize with the
1159 * plist.h (mplist__serialize): Prototype adjusted.
1160 (mplist__assq): Extern it.
1162 * plist.c: Include <ctype.h>
1163 (PUTC, PUTS): New macros.
1164 (write_symbol): New function.
1165 (write_element): New arg indent.
1166 (dump_string, dump_plist_element): Delete them.
1167 (mplist__from_string): New arg pretty.
1168 (mplist__assq): New function.
1169 (mdebug_dump_plist): Use write_element.
1171 * mtext.c (mtext_cat_char): Allocate more memory.
1172 (mdebug_dump_mtext): Don't escal a newline character.
1174 * m17n.h (minput_get_command, minput_get_variable)
1175 (minput_config_command, minput_config_variable)
1176 (minput_save_config): Extern them.
1178 * m17n-core.c: Include <string.h>.
1179 (m17n_init_core): If the env. var. MDEBUG_OUTPUT_FILE is "stdout",
1180 use the stream stdout instead of a file of that name.
1182 * m17n-X.c (mwin__parse_event): Fix handling of Shift and Control
1185 * internal.h (MFAILP, MDEBUG_PRINT0): New macros.
1186 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
1187 (MDEBUG_PRINT4, MDEBUG_PRINT5): Use MDEBUG_PRINT0.
1188 (MDEBUG_DUMP): Flush the stream.
1190 * input.h (struct _MInputMethodInfo): Delete member im. New
1191 members mdb, language, name, extra, cmds, configured_cmds,
1192 bc_cmds, vars, configured_vars, bc_vars, description, and tick.
1193 (MInputContextInfo): New member tick.
1195 * input.c: Big change to improve user-side input method
1196 customization. Here, list just public API changes.
1197 (minput_get_commands, minput_get_variables)
1198 (minput_assign_command_keys, minput_set_variable): Label them
1200 (minput_get_command, minput_get_variable)
1201 (minput_config_command, minput_config_variable)
1202 (minput_save_config): New functions.
1204 * database.h (PATH_MAX): Define it if not yet defined.
1205 (PATH_SEPARATOR): Likewise.
1206 (enum MDatabaseStatus): New enum.
1207 (struct MDatabaseInfo): Moved from database.c. New members status,
1208 time, lock_file, and uniq_file.
1209 (mdatabase__update, mdatabase__file, mdatabase__lock, mdatabase__save)
1210 (mdatabase__unlock): Extern them.
1212 * database.c: Include <time.h>.
1213 (MDB_DIR_LEN): Don't include the terminating '\0' in the length.
1214 (GEN_PATH): Args changed. Callers changed.
1215 (struct MDatabaseInfo): Moved to database.h.
1216 (struct MDatabase, mdb_list): Deleted.
1217 (mdatabase__list): New var.
1218 (get_database_filename): Deleted. Callers changed to use
1220 (find_file, get_database_file): New files.
1221 (get_dir_info): Initialize new members of MDatabaseInfo.
1222 (find_database): Arg chagnded. Callers changed.
1223 (free_db_info, register_database, register_databases_in_files):
1225 (update_database_list): Deleted.
1226 (mdatabase__init): Initialize mdatabase__list instead of mdb_list.
1227 (mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
1228 (mdatabase__update): New function.
1229 (mdatabase__check): Return value changed.
1230 (mdatabase__file, mdatabase__lock, mdatabase__save)
1231 (mdatabase__unlock): New functions.
1233 2006-08-30 TAKAHASHI Naoto <ntakahas@m17n.org>
1235 * input.c (get_surrounding_text): Return -2 when surrounding text
1237 (get_following_char): Likewise.
1238 (get_preceding_char): Likewise.
1239 (minput__callback): Return 0 if there is a callback function,
1242 2006-08-17 Kenichi Handa <handa@m17n.org>
1244 * input.c (reset_ic): Use shift_state to setup the current state.
1246 2006-08-02 Theppitak Karoonboonyanan <thep@linux.thai.net> (tiny change)
1248 * Makefile.am (libm17n_la_LIBADD, libm17n_gui_la_LIBADD)
1249 (libm17n_X_la_LIBADD, libm17n_gd_la_LIBADD, linkcore_LDADD)
1250 (linkshell_LDADD, linkgui_LDADD): Use ${top_builddir}.
1252 2006-08-02 Kenichi Handa <handa@m17n.org>
1254 * plist.c (mdebug_dump_plist): Fix the 2nd arg to dump_plist_element.
1256 * mtext.c (mdebug_dump_mtext): If not fullp, dump just text.
1258 * font-ft.c (ft_encapsulate): Add code for debugging.
1259 (mfont__ft_drive_otf): Be sure to encode character before getting
1262 2006-07-21 Kenichi Handa <handa@m17n.org>
1264 * draw.c (mdraw_text_extents): Fix previous typo.
1266 2006-07-19 Kenichi Handa <handa@m17n.org>
1268 * draw.c (gstring_width): New arg lbearing.
1269 (render_glyph_string): Adjusted for the change of gstring_width.
1270 (mdraw_text_extents): Fix lbearing of ink and line metrics.
1272 * m17n-core.h (Mlanguage): Extern it.
1274 * m17n.h (Mlanguage): Extern deleted.
1276 * mtext.c (mtext__init): Initialize Mlanguage.
1277 (Mlanguage): Declaration moved from locale.c
1279 * locale.c (mlocale__init): Don't initialize Mlanguage here.
1280 (Mlanguage): Declaration moved to mtext.c.
1282 * language.c (mlang__init): Don't initialize Mlanguage here.
1284 * font.c (OTF_tag_name) [! HAVE_OTF]: New function.
1286 2006-07-14 Kenichi Handa <handa@m17n.org>
1288 * font-ft.c: Use FT_BDF_H macro. Include fontconfig/fcfreetype.h.
1289 (MRealizedFontFT): New member face_encapsulated.
1290 (free_ft_rfont): Pay attention to ft_rfont->face_encapsulated.
1291 (ft_gen_font): New function.
1292 (ft_add_font): Use ft_gen_font.
1293 (ft_list_script): Store lists in ft_script_list.
1294 (ft_check_otf): New arg ft_face. Caller changed.
1295 (ft_check_language): Likewise.
1296 (ft_check_script): Likewise.
1297 (ft_encapsulate, ft_close): New functions.
1298 (mfont__ft_driver): Initialize members encapsulate and close.
1299 (mfont__ft_drive_otf): Use OTF_open_ft_face if it is available.
1301 * font.h (struct MRealizedFont): New member encapsulating.
1302 (struct MFontDriver): New members encapsulate and close.
1304 * font.c (mfont__match_p): If FONT is realized, check capability
1305 by font drivers's check_capability method.
1306 (mfont_match_p, mfont_open, mfont_encapsulate, mfont_close): New
1309 * m17n-X.c (xfont_list_family_names): Delete unused var. Fix
1310 declarations of foundry and fam local vars.
1311 (xft_driver): Make it static.
1313 * m17n-gui.h (mfont_match_p, mfont_open, mfont_encapsulate)
1314 (mfont_close): Extern them.
1316 * m17n-gd.c (device_open): Don't specify foundry and family of the
1319 2006-07-11 Kenichi Handa <handa@m17n.org>
1321 * m17n-gui.c (m17n_fini_win): Set null_interface.handle to NULL;
1323 2006-07-13 Kenichi Handa <handa@m17n.org>
1325 * font-ft.c (fc_build_charset): Return NULL if FcCharSet can't be
1327 (ft_check_script): Delete unused var.
1328 (ft_list_capability): Likewise.
1330 * font.c (mfont__get_capability): Setup cap->otf.
1331 (Motf): Make it global.
1332 (mfont_get_prop): Accept Mlanguage, Mscript, and Motf as key arg.
1334 * font.h (MFontCapability): New member otf.
1336 * language.c (mlang__fini): Delete unused vars.
1338 * m17n-gui.h (Motf): Extern it.
1340 * database.c (update_database_list): Delete unused vars.
1342 2006-07-07 Kenichi Handa <handa@m17n.org>
1344 * font-ft.c (DEVICE_DELTA): Fix typo.
1346 2006-07-06 Kenichi Handa <handa@m17n.org>
1348 * fontset.c (mfont__lookup_fontset): Don't ignore family and
1351 2006-07-05 TAKAHASHI Naoto <ntakahas@m17n.org>
1353 * database.c: Update comments.
1355 2006-07-05 Kenichi Handa <handa@m17n.org>
1357 * database.c (PATH_MAX): Define it if not yet defined.
1358 (PATH_SEPARATOR, USE_GEN_PATH, GEN_PATH, GEN_PATH_FROM_MT): New
1360 (get_database_filename): Use GEN_PATH.
1361 (get_dir_info): Don't include the last '/' in directory name.
1362 (register_database): New function.
1363 (update_database_list): Use register_database. Search all
1364 directories in mdatabase__dir_list for wildcard databases.
1365 (mdatabase__init): Check "~/.m17n.d".
1367 2006-07-03 Kenichi Handa <handa@m17n.org>
1369 * input-gui.c (win_callback): If is ic->candidate_show zero, don't
1370 push reverse property.
1372 * plist.c (dump_plist_element): Fix previous change.
1374 2006-06-28 Kenichi Handa <handa@m17n.org>
1376 * font.c (xlfd_unparse_name): Suppress the heading '-' if not
1379 * draw.c (MbidiNSM): New variable.
1380 (visual_order) [! HAVE_FRIBIDI]: Clear levels at first. Pay
1381 attention to bidi type NSM.
1382 (mdraw__init): Initialize MbibiNSM.
1384 * language.c (mscript__char_list): Fix finding a char-list element.
1386 * plist.c (dump_string): Return number of printed characters.
1387 (dump_plist_element): Print elements more compactly.
1389 2006-06-23 Kenichi Handa <handa@m17n.org>
1391 * Makefile.am (BUILD_LIBS): Don't increment it conditionally.
1392 (include_HEADERS): Likewise.
1394 2006-06-23 TAKAHASHI Naoto <ntakahas@m17n.org>
1396 * language.c: Update documentation.
1398 2006-06-23 Kenichi Handa <handa@m17n.org>
1400 * font-ft.c (struct MFontFT): Delete member lang.
1401 (free_ft_info): Don't unref member lang. Destroy members langset
1403 (fc_parse_pattern): Last argument changed to MFontFT *. Callers
1404 changed. Set members langset and charset.
1405 (fc_init_font_list, fc_list_pattern, fc_build_charset): New
1407 (ft_init_font_list, ft_has_char_list_p, ft_list_char_list): New
1409 (ft_list_family) [HAVE_FONTCONFIG]: Include FC_CHARSET on objset.
1410 (ft_list_family) [! HAVE_FONTCONFIG]: Call ft_init_font_list.
1411 (ft_list_language) [HAVE_FONTCONFIG]: Check representative
1412 characters at first. If it fails, try listing by language names.
1413 (ft_list_language) [! HAVE_FONTCONFIG]: Call ft_list_char_list.
1414 (ft_check_language): Renamed from ft_check_lang. Adjusted for the
1415 change of MFontCapability.
1416 (ft_list_capability): Likewise. Try listing by languages, then by
1417 scripts. Check OTF at last.
1418 (ft_check_script): New function.
1419 (ft_select): Adjusted for the check of MFontCapability.
1420 (ft_list_family_names): New function.
1421 (ft_check_capability): If cap->script is not Mnil, call
1423 (mfont__ft_driver): Initialize with ft_list_family_names.
1425 * font.h (struct MFontDriver): New member list_fmaily_names.
1426 (struct): Change member "MSymbol *lang" to "MSymbol language".
1428 * font.c: Include "language.h".
1429 (Motf): New variable.
1430 (otf_script_list, load_otf_script_list): Delete it.
1431 (find_script_from_otf_tag): Delete it.
1432 (merge_capability): New function.
1433 (mfont__init): Init Motf.
1434 (mfont__fini): Don't unref otf_script_list.
1435 (free_font_capability): Check cap->script_tag to determine if
1436 OTF-related capability is set.
1437 (mfont__get_capability): Call mscript__from_otf_tag. Adjusted for
1438 the change of type MFontCapability.
1439 (mfont_put_prop): Call merge_capability for Mlanguage, Mscript,
1440 and Motf properties.
1441 (mfont_list): Call merge_capability for LANGUAGE arg.
1442 (mfont_list_family_names): New function.
1444 * input-gui.c: Typo in comments fixed.
1446 * input.c: Typo in comments fixed.
1448 * language.h (mlanguage__list): Delete it.
1449 (mscript__char_list, mscript__otf_tag, mscript__from_otf_tag): New
1452 * language.c: Include "mtext.h".
1453 (M_script_lang_list): Delete it.
1454 (language_list, script_list): New variables.
1455 (load_lang_script_list, init_language_list, init_script_list): New
1457 (mlang__init): Don't load language database here.
1458 (mlang__fini): Unref language_list and script_list if not NULL.
1459 (mlanguage__list): Delete it.
1460 (mlanguage__info, mscript__info, mscript__char_list)
1461 (mscript__otf_tag, mscript__from_otf_tag): New functions.
1462 (mlanguage_list, mlanguage_code, mlanguage_name, mlanguage_text)
1463 (mscript_list, mscript_language_list): New functions.
1465 * m17n-gui.h (mfont_list_family_names): Extern it.
1467 * m17n.h (mlanguage_list, mlanguage_code, mlanguage_name)
1468 (mlanguage_text, mscript_list, mscript_language_list): Extern
1471 2006-06-21 Kenichi Handa <handa@m17n.org>
1473 * m17n-X.c (xfont_driver): Initialize with
1474 xfont_list_family_names.
1475 (xfont_list_family_names): New function.
1476 (xft_driver): Initialize with NULL for list_family_names member.
1477 (device_init): Set list_family_names member of xft_driver to that
1478 of mfont__ft_driver.
1480 2006-06-06 Kenichi Handa <handa@m17n.org>
1482 * fontset.c (mfont__lookup_fontset): Don't set *num to 1 if it is 0.
1484 2006-03-24 Kenichi Handa <handa@m17n.org>
1486 * font-ft.c (ft_open): Improve debug message.
1488 * fontset.c (mfontset__get_font): Fix for the case that no font in
1489 per_script list is available.
1491 2006-02-06 Kenichi Handa <handa@m17n.org>
1493 * Version 1.3.3 released.
1495 2006-02-22 Kenichi Handa <handa@m17n.org>
1497 * textprop.c: Fix some typos in documentation.
1499 * plist.c: Fix some typos in documentation.
1501 * m17n-core.h: Fix some typos in documentation.
1502 (M17NLIB_PATCH_LEVEL): Updated to 3.
1503 (M17NLIB_VERSION_NAME): Updated to "1.3.3".
1505 * symbol.c: Fix some typos in documentation.
1507 * mtext.c: Fix some typos in documentation.
1509 * input.c: Fix several typos in documentation.
1511 2006-02-06 Kenichi Handa <handa@m17n.org>
1513 * Version 1.3.2 released.
1515 2006-02-03 Kenichi Handa <handa@m17n.org>
1517 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 2.
1518 (M17NLIB_VERSION_NAME): Updated to "1.3.2".
1520 * font.c (xlfd_parse_name): Fix handling of the name "nil".
1522 * draw.c (layout_glyphs): Fix handling left_padding of
1525 * m17n-gd.c (read_rgb_txt): Support HTML 4.0 color names.
1527 2006-02-02 Kenichi Handa <handa@m17n.org>
1529 * Makefile.am (include_HEADERS): Add m17n-gui.h and m17n-X.h only
1530 if WITH_GUI is true.
1532 2006-01-25 Kenichi Handa <handa@m17n.org>
1534 * input.c (resolve_expression): If the value of PLIST is a plist,
1535 but the first element is not symbol, return 0.
1537 2006-01-17 Kenichi Handa <handa@m17n.org>
1539 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha only if
1540 HAVE_GD is 2 or the greater.
1542 2006-01-16 Kenichi Handa <handa@m17n.org>
1544 * Version 1.3.1 released.
1546 2006-01-16 Kenichi Handa <handa@m17n.org>
1548 * m17n-gd.c (gd_render): Use gdImageColorResolveAlpha instead of
1549 simulating anti-aliasing.
1551 * m17n-core.h (M17NLIB_PATCH_LEVEL): Updated to 1.
1552 (M17NLIB_VERSION_NAME): Updated to "1.3.1".
1554 2006-01-12 Kenichi Handa <handa@m17n.org>
1556 * input.c (get_surrounding_text): Always pop ic->plist.
1557 (reset_ic): Don't reset ic->plist.
1559 2006-01-10 Kenichi Handa <handa@m17n.org>
1561 * input.c (preedit_commit): For debugging, print only commiting
1562 charactes. Don't set ic->candidate_show to 0.
1563 (handle_key): Don't run branch-actions just by shifting to the
1565 (reset_ic): Reset state_key_head and key_head of ic_info to 0.
1566 Reset vars and plist.
1568 2006-01-07 Kenichi Handa <handa@m17n.org>
1570 * input.c (load_branch): Confirm that maps is not NULL.
1572 2006-01-05 Kenichi Handa <handa@m17n.org>
1574 * input-gui.c (win_filter): Try to convert arg to key only when
1577 * plist.c (read_integer_element): If '#' and '-' are followed by
1578 non-integer-constituent, read them as a part of a symbol.
1579 (read_symbol_element): New arg C.
1580 (read_element): Adjust args to read_symbol_element.
1582 * input.c (load_macros): On overwriting a macro, free the old
1584 (minput__init): Store Mmap in load_im_info_keys.
1585 (minput_get_title_icon): If the input method has no title, be sure
1587 (minput_get_description): If the input method has no description,
1588 be sure to return NULL.
1589 (minput_get_variables): Fix documentation.
1590 (handle_key): Pay attention to the case that key is Mnil.
1591 (filter): Likewise. Fix handling of such symbol as S-A.
1593 2005-12-22 Kenichi Handa <handa@m17n.org>
1595 * Version 1.3.0 released.
1597 2005-12-22 Kenichi Handa <handa@m17n.org>
1599 * font-ft.c (ft_list): If the specified font has no property,
1602 2005-12-20 Kenichi Handa <handa@m17n.org>
1604 * character.c (mchar_get_prop): Check char_prop_list.
1605 (mchar_put_prop, mchar_get_prop_table): Likewise.
1607 2005-12-18 Kenichi Handa <handa@m17n.org>
1609 * input.c (minput_get_title_icon): If LANGUAGE is Mt, try also a
1610 file name sans language.
1612 2005-12-16 TAKAHASHI Naoto <ntakahas@m17n.org>
1614 * input.c: Fix typo in comments.
1616 2005-12-14 Kenichi Handa <handa@m17n.org>
1618 * input.c (minput_get_title_icon): Check the default icon for the
1621 2005-12-13 Kenichi Handa <handa@m17n.org>
1623 * input.c (Mless_equal, Mgreater_equal): New variables.
1624 (parse_expression, resolve_expression, parse_action_list)
1625 (take_action_list): Handle the aboves.
1626 (filter): Treat key S-X as X.
1627 (minput__init): Initialize Mless_equal and Mgreater_equal.
1628 (minput_get_title_icon): New function.
1630 * m17n.h (minput_get_title_icon): Extern it.
1632 * database.c (get_database_filename): Return a filename instead of
1634 (load_database): Adjusted for the above change.
1635 (mdatabase__load_for_keys): Likewise.
1636 (mdatabase__find_file): New function.
1638 * database.h (mdatabase__find_file): Extern it.
1640 * font.h (mfont__resize): Delete extern.
1642 * font.c (mfont__list): Check resize ratio.
1643 (mfont__resize): Delete it.
1644 (mfont_resize_ratio): Include the code of mfont__resize.
1646 * font-ft.c (ft_open): Check resize ratio.
1648 * m17n-X.c (xfont_open): Check resize ratio.
1649 (xft_open): Likewise.
1651 2005-12-07 Kenichi Handa <handa@m17n.org>
1653 * input.c (take_action_list): If take_action_list return -1,
1655 (handle_key): Likewise.
1657 * face.c (mface__for_chars): When font is specified and layouter
1658 is found for it, if the layouter doesn't support one of a
1659 character, use a face sans layouter for it.
1661 2005-12-06 Kenichi Handa <handa@m17n.org>
1663 * fontset.c (mfont__lookup_fontset): If only a fallback font is
1664 found, don't use it for more than one character.
1666 2005-12-05 Kenichi Handa <handa@m17n.org>
1668 * face.c (mface__realize): Set rfont->layouter to Mnil.
1669 (mface__for_chars): Fix handling of layouter.
1671 * character.h (mchar__define_prop): Extern it.
1673 * database.c (update_database_list): Call mchar__define_prop if
1676 * character.c (mchar__init): Don't call mchar_define_property.
1677 Instead just initialize property keys.
1678 (mchar__fini): Free char_prop_list only if it's not NULL.
1679 (mchar__define_prop): New function.
1680 (mchar_define_property): Call mchar__define_prop.
1682 * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
1685 2005-12-02 Kenichi Handa <handa@m17n.org>
1687 * language.c (mlang__init): Handle extra chars.
1689 * m17n-gui.h (mfont_check): Adjust prototype.
1691 * m17n-X.c (xfont_driver): Specify xfont_check_capability.
1692 (xfont_check_capability): New function.
1693 (xft_driver): Specify xft_check_capability.
1694 (xft_check_capability): New function.
1696 * font-ft.c (M0_3): Delete it.
1698 (ft_get_charmaps): Refer to M0.
1699 (fc_parse_pattern): Fix previous change.
1700 (ft_list_language): Check also extra chars.
1701 (ft_check_otf): Define it even if HAVE_OTF is undef.
1702 (ft_check_lang): Check the result of FcLangSetHasLang against
1703 FcLangDifferentLang. Check also extra chars.
1704 (ft_list_capability): Delete ifdef HAVE_OTF.
1705 (ft_select): Likewise.
1706 (ft_open): Improve debug information.
1707 (ft_check_capability): New function.
1708 (mfont__ft_driver): Specify ft_check_capability.
1709 (mfont__ft_init): Initialize M0.
1711 * fontset.c (get_font_from_group): New function.
1712 (mfontset__get_font): New function.
1714 * fontset.h (mfontset__get_font): Extern it.
1716 * font.c (OTF_tag): Define it if HAVE_OTF is undef.
1717 (mfont__fini): Delete ifdef HAVE_OTF.
1718 (free_font_capability): Likewise.
1719 (mfont__get_capability): Likewise.
1720 (mfont__check_capability): New function.
1721 (mfont_check): Change the order of arguments. Use
1724 * font.h (struct MFontDriver): New member check_capability.
1725 (MFontCapability): Delete ifdef HAVE_OTF.
1726 (mfont__check_capability): Extern it.
1728 * face.c (mface__realize): Fix handling of FONT arg.
1729 (mface__for_chars): Fix handling of explicitly specified font.
1731 2005-11-25 Kenichi Handa <handa@m17n.org>
1733 * font-flt.c (run_command): Print debug info for
1736 * draw.c (layout_glyphs): Fix handling of left/right_padding.
1738 * face.c (mface__for_chars): Check rfont before accessing the
1741 2005-11-21 Kenichi Handa <handa@m17n.org>
1743 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
1746 * fontset.c (fontset_table): New variable.
1747 (free_fontset): Call M17N_OBJECT_UNREGISTER.
1748 (mfont__fontset_init): Add fontset_table as an object array.
1749 (mfont__realize_fontset): Ref FONTSET.
1750 (mfont__free_realized_fontset): Unref REALIZED->fontset.
1751 (mfontset): Call M17N_OBJECT_REGISTER.
1752 (mfontset_copy): Likewise.
1754 * input.c (handle_key): For debugging, print information about
1756 (filter): Add an alias for Meta and Alt modifiers.
1757 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
1759 (minput__init): Initialize them.
1760 (parse_expression): New function.
1761 (resolve_expression): New function.
1762 (parse_action_list): Handle expressions by parse_expression.
1763 (take_action_list): Handle expressions by resolve_expression.
1764 (parse_nested_list_value): Fix previous change.
1765 (resolve_command): Fix handling of the return value of
1768 2005-11-18 Kenichi Handa <handa@m17n.org>
1770 * font-ft.c (ft_check_otf, otf_script_list): Define only when
1771 HAVE_OTF is defined.
1772 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
1774 (ft_select): Likewise.
1776 * font.c (mfont_list): Fix for the case that FONT is NULL.
1777 (OTF_tag): Delete it.
1778 (load_otf_script_list): Define only when HAVE_OTF is defined.
1779 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
1782 * draw.c (truncate_gstring): Be sure to truncate at
1783 glapheme-cluster boundary.
1785 2005-11-11 Kenichi Handa <handa@m17n.org>
1787 * input.c (delete_surrounding_text): Clear cache if necessary.
1789 2005-11-09 Kenichi Handa <handa@m17n.org>
1791 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
1792 glyph prev is also supported by the current flt.
1794 2005-11-08 Kenichi Handa <handa@m17n.org>
1796 * m17n-X.c (xft_render): Cancel previous change.
1798 2005-11-07 Kenichi Handa <handa@m17n.org>
1800 * input.c: Include <stdlib.h>.
1801 (get_surrounding_text, delete_surrounding_text)
1802 (get_preceding_char, get_following_char): New functions.
1803 (integer_value): New arg surrounding. If it is nonzero, try to
1804 get a surrounding character. Callers changed.
1805 (take_action_list): Check `value' before setting an element.
1806 (destroy_ic): Unref ic_info->preceding_text and
1807 ic_info->following_text.
1808 (minput__init): Initialize Minput_get_surrounding_text and
1809 Minput_delete_surrounding_text.
1810 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
1812 (filter): Unref ic_info->preceding_text and
1813 ic_info->following_text.
1815 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
1818 * input.h (MInputContextInfo): New members preceding_text and
1821 2005-11-04 Kenichi Handa <handa@m17n.org>
1823 * input.c (parse_nested_list_value): Fix handling of the global
1825 (get_nested_list): Get global definitions by load_partial_im_info.
1826 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
1827 MInputCandidatesChanged.
1828 (take_action_list): Likewise.
1829 (reset_ic): Likewise.
1830 (create_ic): Don't pay special attention to
1831 Mcandidates_group_size.
1832 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
1833 (minput_set_variable): Get a definition of varible by
1834 mplist_find_by_value, not mplist_get.
1836 * m17n.h (enum MInputCandidatesChanged): New enum.
1838 2005-11-01 Kenichi Handa <handa@m17n.org>
1840 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
1842 (mwin__destroy_window): If xft_draw's drawable is win, change it
1843 to device->drawable before destroying win.
1845 2005-10-31 Kenichi Handa <handa@m17n.org>
1847 * input.c (load_im_info): Fix adding of state.
1849 * m17n-core.c (m17n_fini_core): Fix reporting of module
1852 * m17n.c (m17n_fini): Fix reporting of module finalization.
1854 * m17n-gui.c (m17n_init_win): Fix reporting of module
1857 2005-10-29 Kenichi Handa <handa@m17n.org>
1859 * input.c (get_candidate_list): Fix the timing of referring plist.
1861 2005-10-28 Kenichi Handa <handa@m17n.org>
1863 * input.c (load_branch): Ignore an undefined map name.
1864 (load_im_info): Set im_info->title from `name' only if it's not
1866 (shift_state): Always update ic->status.
1867 (adjust_candidates): Renamed from adjust_candidate_command.
1868 Argument changed. Caller changed.
1869 (get_candidate_list, regularize_action): New functions.
1870 (take_action_list): Use them. On handling Munhandle, don't set
1872 (handle_key): If KEY is not handled by MAP, and MAP has
1873 branch_actions, perform them.
1875 * database.c (mdatabase__fini): Free dir_info->filename;
1877 2005-10-20 Kenichi Handa <handa@m17n.org>
1879 * input.c (marker_code): Accept '@@'.
1880 (integer_value): Handle '@@'.
1881 (parse_action_list): Accept a symbol argument.
1882 (take_action_list): Resolve the symbol argument. Handle the
1885 2005-10-18 Kenichi Handa <handa@m17n.org>
1887 * input.c: Include "charset.h".
1888 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
1890 (MIMState): New member (M17NObject control).
1891 (lookup_nested_list, set_nested_list, parse_nested_list_value)
1892 (get_nested_list, resolve_variable): New functions.
1893 (integer_value): New arg (MPlist **value). Set it to the plist
1894 element containing the value.
1895 (resolve_command): New function.
1896 (load_translation): New arg (MPlist *map_actions).
1897 (load_branch): New args language and name. If `keylist' is a
1898 symbol, resolved that as a command name.
1899 (free_map): New arg top. Free map->map_actions only if top is
1901 (free_state): New function.
1902 (load_state): New arg name.
1903 (im_info_list): New variable.
1904 (free_im_info, get_im_info_by_tags): New functions.
1905 (load_im_info): Arg key changed to plist. Handle `include'.
1906 Return (MInputMethodInfo *).
1907 (preedit_commit): Ref ic->candidate_list.
1908 (get_select_charset, adjust_candidate_command): New functions.
1909 (take_action_list): Handle `include'. Adjust candidate action
1910 properly. Handle control variables `candidates-charset' and
1911 `candidates-group-size'.
1912 (open_im): Use get_im_info.
1913 (create_ic): Get global variables.
1914 (load_partial_im_info): New function.
1915 (get_im_info): New function.
1916 (check_command_keyseq, check_command_list, check_variable_list):
1918 (minput__init): Don't handle M_database_hook and Mdetail_text.
1919 Initialize M_candidates, Mcandidates_group_size,
1920 Mcandidates_charset.
1921 (parse_variable_list, get_variable_list, parse_command_list)
1922 (get_command_list): Delete them.
1923 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
1924 (minput__fini): Simply unref command_list and variable_list.
1925 (minput_get_description): Adjusted for the new form of description.
1926 (minput_get_commands): Use get_nested_list.
1927 (minput_assign_command_keys): Likewise.
1928 (minput_get_variables, minput_set_variable): Likewise.
1930 * input.h (MInputMethodInfo): New members im and maps.
1932 * database.h (M_database_hook): Delete extern.
1933 (MDatabaseHookFunc): Delete extern.
1934 (mdatabase__check): Extern it.
1936 * database.c: Include <glob.h>.
1937 (MAX_TIME): New macro.
1938 (Masterisk): New variable.
1939 (get_database_stream): Argument changed to (MDatabaseInfo *).
1941 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
1942 (find_database): New function.
1943 (update_database_list): New function.
1944 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
1945 calling update_database_list.
1946 (mdatabase__check): New function.
1947 (mdatabase_find): Use update_database and find_database. Don't
1948 handle MDatabaseHookFunc.
1949 (mdatabase_list): Call update_database at first.
1950 (mdatabase_define): Adjusted for the change of mdb->extra_info.
1951 (MDatabaseList): New type.
1953 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
1955 * m17n.h (Mdetail_text): Delete extern.
1957 * m17n-core.h (mplist_conc): Delete extern.
1959 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
1961 (mplist_conc): Renamed to mplist__conc.
1962 (mplist__pop_unref): New function.
1964 2005-10-14 Kenichi Handa <handa@m17n.org>
1966 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
1968 (read_element): If keys is an empty plist, return any element
1970 (dump_plist_element): Check if plist is nested.
1971 (mplist_conc): Always ref tail.
1972 (mplist_set): If key is a managing key, ref val in advance.
1974 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
1975 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
1976 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
1979 * fontset.c (free_fontset): Unref fontset_list if necessary.
1980 (mfont__fontset_fini): Don't free fontset_list. Unref
1982 (mfont__realize_fontset): Initialize request.
1983 (mfontset): Ref default_fontset or fontset only if necessary.
1984 (mfontset_copy): Don't ref copy.
1986 * draw.c (render_glyphs): Check gend->type before checking
1989 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
1990 unrefed plists to NULL.
1992 2005-10-04 Kenichi Handa <handa@m17n.org>
1994 * textprop.c (mtext_serialize): Be sure to make mt
1995 MTEXT_FORMAT_UTF_8 and NULL terminated.
1997 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
1999 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
2001 2005-10-03 Kenichi Handa <handa@m17n.org>
2003 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
2004 is not at the beginning of line.
2006 2005-09-22 Kenichi Handa <handa@m17n.org>
2008 * input.c: Include <sys/stat.h> and <unistd.h>.
2009 (Minclude, Mcommit, Munhandle): New variables.
2010 (minput__init): Initialize them. Push only Mstate to
2011 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
2012 (parse_action_list): Allow integer arg for undo. Handle Mcommit
2014 (load_input_method): Handle "include" directive. If no states are
2016 (shift_state): If state_name is Mt, shift back to the previous
2017 state. Call preedit_commit to commit preedit text.
2018 (preedit_commit): New function.
2019 (take_action_list): Improve debug printing. Handle commit and
2021 (handle_key): Check the return value of take_action_list. Don't
2022 take branch_actions just after changing to the root map.
2023 (reset_ic): Reset all ic_info members.
2024 (filter): When a key is not handled, just move ic_info->keys
2025 instead fo calling reset_ic.
2026 (load_im_info): If key is not Mstate, push Mmap to
2028 (MDatabaseStatList): New type.
2029 (imdir_stat_list): New variable.
2030 (input_method_hook): Don't cancel the hook. Check the
2031 modification time of directories.
2032 (minput__fini): Free imdir_stat_list;
2034 * input.h (MInputContextInfo): New member prev_state.
2036 * m17n-core.h (mplist_conc): Extern it.
2038 * plist.c (mplist_conc): New function.
2040 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
2042 * font.h (MRealizedFont): New member average_width.
2044 * font-ft.c (ft_open): Set rface->average_width.
2046 * font.c (xlfd_unparse_name): Print '*' before registry name.
2048 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
2049 (xfont_open): Set rfont->average_width.
2050 (xft_open): Likewise.
2051 (device_open): Initialize disp_info->AVERAGE_WIDTH.
2053 * internal-gui.h (struct MFrame): New member average_width.
2055 * m17n-gui.c (mframe): Fix setting of frame->rfont.
2056 (mframe_get_prop): Return the average_width of a font.
2058 * face.c (mface__realize): Set rface->average_width.
2059 (mface__update_frame_face): Set frame->average_width.
2061 * face.h (MRealizedFace): New member average_width.
2063 2005-09-19 Kenichi Handa <handa@m17n.org>
2065 * font.c (xlfd_unparse_name): New arg full_xlfd.
2066 (mfont__encode_char): Use shortcut only for X core fonts.
2067 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
2068 (mfont_put_prop): Handle `language' property.
2069 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
2070 Print file can capability info too.
2072 * m17n-core.c (mdebug__output): New variable.
2073 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
2074 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
2075 (m17n_fini_core): Close mdebug__output if it's not stderr.
2077 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
2078 (xfont_open): Handle baseline_offset.
2079 (xfont_find_metric): Likewise.
2080 (xfont_render): Likewise.
2081 (xft_open): Likewise.
2082 (xft_render): Likewise.
2084 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
2085 (mdebug__output): Extern it.
2086 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
2087 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
2088 (MDEBUG_DUMP): New macro.
2089 (MDEBUG_PRINT_TIME): Print to medebug__output.
2091 * font.h (MRealizedFont): New member baseline_offset.
2093 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
2095 (fc_weight_table): Add FC_WEIGHT_REGULAR.
2096 (ft_list_family): Check alias.
2097 (ft_list_language): If language is "en", don't try to the second
2099 (ft_default_list): New variable.
2100 (ft_list_default): New function.
2101 (ft_select): If family is not specified, try only the default
2102 fonts. Treat the weights normal and medium same.
2103 (ft_open): Fix debug message. If registry is not specified, try
2104 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
2105 (ft_find_metric): Likewise.
2106 (ft_render): Likewise.
2107 (ft_list): Fix debug message. Accept the registring iso8859-1.
2108 If family is not specified, try only the default fonts.
2110 * face.c (mface__realize): Fix logic of opening a font.
2112 2005-09-16 Kenichi Handa <handa@m17n.org>
2114 * face.c (mface__realize):
2116 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
2119 * input.c (shift_state): Fix the condition of taking init actions.
2120 (take_action_list): Fix handling of pushback action.
2121 (handle_key): Don't change key while checking its alias.
2122 (minput__init): Initialize new variables.
2123 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
2126 2005-09-12 Kenichi Handa <handa@m17n.org>
2128 * mtext.c (mtext__uppercase): Add proper open/close parens.
2129 (mtext_titlecase): Add proper casting.
2131 * input.c (parse_action_list): Handle the case that the arg is a
2132 key sequence (MText or MPlist).
2133 (take_action_list): Likewise.
2134 (shift_state): Shorter debug message.
2135 (handle_key): Terminate a debug message by "\n".
2136 (reset_ic): Don't take initial actions here.
2137 (minput_open_im): Print a debug message.
2138 (minput_close_im): Likewise.
2139 (minput_create_ic): Likewise.
2140 (minput_destroy_ic): Likewise.
2142 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
2144 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
2147 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
2148 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
2151 * character.c: Add Japanese documentation for
2152 mchar_get_prop_table ().
2154 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
2156 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
2157 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
2158 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
2160 (init_case_conversion): New function.
2161 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
2162 (uppercase_precheck, lowercase_precheck, final_sigma)
2163 (after_soft_dotted, more_above, before_dot, after_i)
2164 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
2166 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
2168 * plist.c (read_mtext_element): Fix previous change.
2170 2005-09-05 Kenichi Handa <handa@m17n.org>
2172 * plist.c (read_mtext_element): Handle \uXXXX notation.
2174 * internal.h (MTABLE_MALLOC): Don't use a local variable.
2175 (MTABLE_ALLOCA): Change the name of local variable.
2177 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
2178 HAVE_FREETYPE are defined.
2180 * m17n-X.c: Check HAVE_X11.
2182 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
2183 directory listing libraries.
2184 (noinst_PROGRAMS): Define it only in maintainer mode.
2186 2005-09-02 Kenichi Handa <handa@m17n.org>
2188 * m17n-gui.h (mdraw_line_break_option): Extern it.
2190 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
2191 end of the first glyph.
2192 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
2194 (mdraw_line_break_option): New variable.
2195 (mdraw_default_line_break): Use mtext_line_break.
2197 * mtext.h (wordseg_func_table): Don't extern it.
2198 (mtext__wseg_fini): Extern it.
2200 * mtext.c: Don't include word-thai.h.
2201 (wordseg_func_table): Delete this variable.
2202 (mtext__init): Don't initialize above. Don't call
2203 mtext__word_thai_init.
2204 (mtext__fini): Don't free wordseg_func_table. Call
2205 mtext__wseg_fini instead fo mtext__word_thai_fini.
2206 (MTextWordsegFunc): Don't typedef it.
2207 (mtext__word_segment): Moved to mtext-wseg.c.
2209 * m17n-core.h (enum MTextLineBreakOption): New enum.
2210 (mtext_line_break): Extern it.
2212 * mtext-wseg.c: New file.
2214 * mtext-lbrk.c: New file.
2216 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
2217 add mtext-lbrk.c and mtext-wseg.c.
2219 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
2220 the case that head is NULL.
2222 2005-09-01 Kenichi Handa <handa@m17n.org>
2224 * word-thai.c (wordseg_propertize): If the property value is nil,
2225 don't make the property no-merge.
2226 (thai_wordseg): Don't require *from and *to are set a priori. Pay
2227 attention to the case that they are NULL.
2228 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
2231 * character.c (mchar_get_prop_table): New function.
2233 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
2235 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
2236 (mchar_get_prop_table): Extern it.
2238 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
2239 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
2241 * internal.h (enum MTextCoverage): New enum.
2242 (MText): New member coverage.
2244 * mtext.c (FORMAT_COVERAGE): New macro.
2245 (insert): Copy mt2->coverage.
2246 (mtext__from_data): Initialize mt->coverage.
2247 (mtext__adjust_format): Update mt->coverage.
2248 (mtext): Initialize mt->coverage.
2249 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
2250 Update mt->coverage if necessary.
2251 (mtext_duplicate): Copy mt->coverage.
2252 (mtext_insert, mtext_replace): New functions.
2253 (mtext_dup): Use mtext_duplicate.
2254 (mtext__word_segment): Don't set *from and *to if a word
2255 segmentation funcion is not found.
2256 (mtext_ins_char): Fix typo.
2258 2005-08-25 Kenichi Handa <handa@m17n.org>
2260 * font.h (MFont): New member for_full_width.
2262 * font.c (compare_font_score): Prefer a font of not
2265 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
2266 registry charset of a font is one of CJK charsets.
2268 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
2269 supports some of CJK.
2271 2005-08-24 Kenichi Handa <handa@m17n.org>
2273 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
2275 * m17n-gui.c (null_device_open): Check Mresolution param and set
2278 * m17n-gd.c (device_open): Check Mresolution param and set
2281 * m17n-X.c (MWDevice): New member resy.
2282 (xfont_open): Set ascent, descent, and max_advance members of
2284 (xft_open): Likewise.
2285 (device_open): Compare also screen_num to find a device. Set
2286 device->resy and frame->dpi.
2288 * internal-gui.h (MFrame): New member dpi.
2290 * font.h (MRealizedFont): New member max_advance.
2292 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
2293 (mfont__init): Don't initialize Mascent, Mdescent.
2294 (Mascent, Mdescent): Delete these variables.
2295 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
2296 Mfont_descent instead of Mascent and Mdescent.
2297 (mfont_put_prop): Allow negative size.
2298 (mfont_find): Handle the case of spec->size < 0. Fix previous
2300 (mfont_list): Handle the case of spec->size < 0.
2301 (mfont_check): Likewise.
2303 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
2304 (fc_get_pattern): Handle the case of font->size < 0.
2305 (ft_open): Set ascent, descent, and max_advance members of rfont.
2306 (ft_find_metric): Improve rounding.
2307 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
2310 * face.c (mface__realize): Handle the case of font->size < 0.
2312 2005-08-22 Kenichi Handa <handa@m17n.org>
2314 * coding.c (MConverterStatus): Change the member buf to union.
2315 (mconv_buffer_converter): Add const to the arg buf.
2316 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2317 (mconv_decode): Adjusted for the change of MConverterStatus.
2318 (mconv_encode_range): Likewise.
2320 * m17n.h (mconv_buffer_converter): Prototype adjusted.
2321 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
2323 2005-08-20 Kenichi Handa <handa@m17n.org>
2325 * m17n-gui.h (mfont_from_name): Prototype adjusted.
2326 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
2328 * m17n-X.c (xfont_open): Set members ascent, descent, and
2329 max_advance of rfont.
2330 (xft_open): Likewise.
2332 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
2334 (mfont__ft_parse_name): Add const to the arg name.
2336 * font.c (xlfd_parse_name): Add const to the arg name. Call
2337 mfont__set_property instead of mfont_set_spec. Set font->spacing.
2338 (xlfd_unparse_name): Handle spacing.
2339 (mfont__init): Initialize new variables.
2340 (mfont__id): Handle spacing.
2341 (mfont__merge): Likewise.
2342 (mfont__set_spec): This function deleted.
2343 (mfont__parse_name_into_font): Add const to the arg name. Fix the
2344 condition of calling mfont__ft_parse_name.
2345 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
2346 (mfont_get_prop): Handle properties spacing, ascent, descent,
2348 (mfont_find): Return a realized font.
2349 (mfont_from_name): Add const to the arg name.
2351 * font.h (enum MFontProperty): New member MFONT_SPACING.
2352 (enum MFontSpacing): New enum.
2353 (MFont): New members spacing and max_advance.
2354 (mfont__ft_parse_name): Prototype adjusted.
2355 (mfont__set_spec): Extern deleted.
2356 (mfont__parse_name_into_font): Prototype adjusted.
2358 2005-08-19 Kenichi Handa <handa@m17n.org>
2360 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
2362 * font.c (mfont_list): If FONT is null, use a temporary font.
2363 (mfont_parse_name): Add const to the arg name.
2365 2005-08-18 Kenichi Handa <handa@m17n.org>
2367 * word-thai.c: Surround code by #ifdef and #endif to escape from
2370 * font-ft.c: Mostly re-written.
2372 * font-flt.c (FontLayoutCmdOTF): This type deleted.
2373 (FontLayoutCmd): Type of the member otf changed..
2374 (load_otf_command): Adjusted for the format change of otf command.
2375 (load_command): Likewise.
2376 (free_flt_command): Unref cmd->body.otf.
2377 (run_otf): Ajusted for the type change of otf_cmd.
2378 (run_command): Ajusted for the type change of otf_cmd. On
2379 debugging, print ctx->combining_code.
2380 (mfont__flt_run): Initialize ctx's members code_offset,
2381 combining_code, and left_padding to 0.
2383 * face.h (struct MRealizedFace): New member font.
2384 (mface__realize): Prototype adjusted.
2386 * face.c (find_realized_face): New arg font.
2387 (find_realized_face): Adjusted for the change of MFont.
2388 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
2389 (mface__fini): Don't call mdebug__report_object.
2390 (mface__realize): New arg font.
2391 (mface__for_chars): Adjusted for the change of mfont__encode_char.
2392 Optimize the latin case.
2393 (mface__free_realized): Free rface->font.
2394 (mface__update_frame_face): Adjusted for the change of mface__realize.
2395 (mface_equal): New function.
2397 * draw.c (Mcommon): New variable.
2398 (visual_order): Args to mfont__encode_char changed.
2399 (compose_glyph_string): Handle Mfont text property.
2400 (layout_glyphs): Adjusted for the change of MFont.
2401 (mdraw__init): Initialize Mcommon.
2402 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
2404 * font.h (enum MFontType): Members completely changed.
2405 (enum MFontProperty): Move MFONT_SIZE to the tail.
2406 (enum MFontSource): New enum.
2407 (struct MFont): New members type, source, sizes, file, capability,
2409 (struct MRealizedFont): Type of member font changed. Members
2410 score, status, and encoding deleted.
2411 (MFontScore): New type.
2412 (MFontList): Member changed.
2413 (struct MFontDriver): New member has_char. Types of members
2415 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2416 (Mapple_roman): Extern them.
2417 (OTF_Tag): Typedefed if not HAVE_OTF.
2418 (enum MFontOpenTypeTable): New enum.
2419 (MFontCapability): New type.
2420 (mfont__ft_drive_otf): Prototype adjusted.
2421 (mfont__score): Extern deleted.
2422 (mfont__merge): Extern it.
2423 (mfont__has_char): Extern it.
2424 (mfont__encode_char): Prototype adjusted.
2425 (mfont__open): Extern it.
2426 (mfont__set_spec): Prototype adjusted.
2427 (mfont__get_capability): Extern it.
2429 * font.c: Include "fontset.h".
2430 (M_font_capability, M_font_list, M_font_list_len): New variables.
2431 (font_score_priority): Change order of initial elements.
2432 (font_score_shift_bits): Fix array size.
2433 (common_weight): Add "thin", "semibold", and "heavy".
2434 (common_stretch): Add "ultracondensed", "extracondensed",
2435 "extraexpanded", and "utltraexpand".
2436 (font_weight_regular, font_weight_normal, font_weight_medium): New
2438 (gen_font_name): This function deleted.
2439 (find_encoding): Set font->encoding.
2440 (OTF_tag): New function.
2441 (otf_script_list): New variable.
2442 (load_otf_script_list): New function.
2443 (find_script_from_otf_tag): New function.
2444 (xlfd_parse_name): Set font->type and font->source.
2445 (mfont__free_realized): Free chains rfonts.
2446 (font_score): Renamed from mfont__score.
2447 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
2448 (Mapple_roman): New variables.
2449 (mfont__init): Initilize new variables. Initalize
2450 default_encoding.encoding_name and
2451 default_encoding.encoding_charset to Municode_full and
2452 mcharset__unicode. Use SAFE* macros for allocating filepath
2454 (mfont__fini): Free otf_script_list.
2455 (mfont__id): New function.
2456 (mfont__match_p): Check also capability member of MFont.
2457 (mfont__merge): New funciton.
2458 (mfont__set_spec_from_face): Set type and source members.
2459 (mfont__set_spec_from_plist): Set capability and type members.
2460 (mfont__select): Argument changed.
2461 (mfont__available): New function.
2462 (compare_font_score): New function.
2463 (mfont__list): New function.
2464 (mfont__open): Return a realized font.
2465 (mfont__resize): Adjusted for the change of MFont.
2466 (mfont__has_char): New function.
2467 (mfont__encode_char): Argument changed.
2468 (mfont__set_spec): Argument changed.
2469 (free_font_capability): New function.
2470 (mfont__get_capability): New function.
2471 (MFontfile): New variable.
2472 (mfont_get_prop): Adjusted for the change of MFont.
2473 (mfont_put_prop): Likewise.
2474 (mfont_set_selection_priority): Fix the way of setting
2475 font_score_priority[].
2476 (mfont_find): Use mfont__list instead of mfont__select.
2477 (mfont_resize_ratio): Adjusted for the change of MFont.
2478 (mfont_list): Use mfont__list.
2479 (mfont_check): New function.
2480 (font_score): Make it static.
2482 * fontset.h (mfont__realize_fontset): Prototype adjusted.
2483 (mfont__lookup_fontset): Likewise.
2485 * fontset.c (struct MFontset): Delete member font_spec_list.
2486 (struct MRealizedFontset): Type of member spec changed. New
2488 (load_font_group): Arg spec_list deleted.
2489 (load_fontset_contents): Adjusted for the change of fontset_def.
2490 (free_fontset): Fix the way of freeing fontset elements.
2491 (realize_fontset_elements): Argument changed.
2492 (get_per_script): New function.
2493 (free_realized_fontset_elements): Fix the way of feeing rfontset
2495 (update_fontset_elements): Fix args to realize_fontset_elements.
2496 (mfont__realize_fontset): New arg spec.
2497 (try_font_list): New function.
2498 (try_font_group): New arg request. Use try_font_list.
2499 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
2501 (mfontset): Adjusted for the change of MFontset.
2502 (mfontset_copy): Likewise. Don't share plists.
2503 (mfontset_modify_entry): Adjusted for the change of MFontset.
2504 (mfontset_lookup): Call get_per_script.
2505 (mdebug_dump_fontset): Print also the address of fonts.
2507 * input.c (shift_state): Don't reset ic_info->vars.
2508 (take_action_list): Call MDEBUG_PRINT fore calling
2511 * internal-gui.h (MFontDriver): Don't typedef it here.
2513 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
2514 (MXFont): This type deleted.
2516 (struct _MFontX): New struct.
2517 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
2518 (MDisplayInfo): Member base_font_list deleted.
2519 (DEFAULT_FONT): Definition changed.
2520 (FALLBACK_FONT): This maclr deleted.
2521 (free_display_info): Adjusted for the change of MDisplayInfo.
2522 (free_device): Argument to mfont__free_realized changed.
2523 (xfont_driver): Adjusted for the change of MFontDriver.
2524 (xfont_registry_list): Use MFontX instead of MXFont.
2525 (MRealizedFontX): Renamed from MXFontInfo.
2526 (xfont_select): Return the font found first.
2527 (close_xfont): Change MXFontInfo to MRealizedFontX.
2528 (xfont_open): Return the realized font.
2529 (xfont_find_metric): Get xfont from rfont->fontp.
2530 (xfont_has_char): New function.
2531 (xfont_encode_char): Adjusted for the argument change.
2532 (xfont_render): Get xfont from rfont->fontp.
2533 (xfont_list): Adjusted for the argument change.
2534 (MRealizedFontXft): Renamed from MXftFontInfo.
2535 (xft_driver): Ajusted for the change of MFontDriver.
2536 (close_xft): Change MXtfFontInfo to MRealizedFontXft
2537 (xft_open_font): Argument changed.
2538 (xft_open): Argument changed. Return the realized font.
2539 (xft_find_metric): Get xft_font from rfont->fontp.
2540 (xft_has_char, xft_encode_char): New functions.
2541 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
2542 font if not yet opened.
2543 (device_open): Don't set frame->font.
2545 * m17n-gd.c (gd_font_driver): Adjusted for the change of
2547 (gd_font_open): New function.
2548 (gd_render): Don't use the local variable ft_info.
2549 (device_init): Adjusted for the change of gd_font_driver.
2551 * textprop.c (mtext__prop_init): Initialize text_property_table.
2552 Call M17N_OBJECT_ADD_ARRAY.
2553 (mtext__prop_fini): Don't call mdebug__report_object.
2555 * plist.c (mplist__init): Initialize plist_table.
2556 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
2557 (mplist__fini): Don't call mdebug__report_object.
2559 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
2560 (mtext__fini): Don't call mdebug__report_object.
2561 (MTEXT_FORMAT_UTF_16): Correct type.
2562 (mtext_data): New function.
2563 (mtext_text): Fix calculation of limit and args to
2566 * language.c: Include "plist.h".
2567 (M_script_lang_list): New variable.
2568 (mlang__init): Read languages and their information from m17n
2570 (mlanguage__list): New function.
2571 (Miso639_1, Miso639_2): New variables.
2573 * language.h (mlanguage__list): Extern it.
2575 * database.c (get_database_stream): Use SAFE_* macros for
2576 allocating and freeing path.
2577 (mdatabase__init): Likewise.
2579 * symbol.c (msymbol__fini): Don't free symbols here.
2580 (msymbol__free_table): New function.
2581 (msymbol_is_managing_key): New function.
2583 * symbol.h (msymbol__free_table): Extern it.
2584 (msymbol__list): Extern it.
2586 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
2588 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
2589 (struct _M17NObjectArray): New member name and next.
2590 (mdebug__add_object_array): Extern it.
2591 (M17N_OBJECT_ADD_ARRAY): New macro.
2592 (mdebug__report_object): Don't extern it.
2594 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
2596 * m17n-gui.c (free_frame): Don't free frame->font.
2597 (null_device_fini): Fix code for freeing
2598 null_device.realized_font_list.
2599 (m17n_fini_win): Free interface.
2600 (mframe): Cast the return value of dlsym. Set frame->font here.
2601 (mframe_get_prop): Check frame->rface->rfont before accessing the
2604 * m17n-gui.h (Mfontfile): Extern it.
2605 (mfont_check): Extern it.
2606 (mface_equal): Extern it.
2608 * m17n-core.c: Include "symbol.h".
2609 (report_header_printed): This variable deleted.
2610 (object_array_root): New variable.
2611 (report_object_array): New function.
2612 (mdebug__report_object): This function deleted.
2613 (mdebug__add_object_array): New function.
2614 (m17n_init_core): Call mchartable_init () before mtext_init ().
2615 (m17n_fini_core): Call report_object_array (if necessary) and
2616 msymbol__free_atable at the end.
2618 * m17n-core.h (msymbol_is_managing_key): Extern it.
2619 (mtext_data): Extern it.
2620 (MTEXT_FORMAT_UTF_16): Correct type.
2621 (M17NLIB_MINOR_VERSION): Changed to 3.
2622 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
2624 * chartab.c (mchartable__init): Initalize chartable_table.count.
2625 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
2626 mdebug__report_object.
2628 2005-05-26 Kenichi Handa <handa@m17n.org>
2630 * m17n.h (Miso639_1, Miso639_2): Extern them.
2632 * symbol.h (msymbol__list): Extern it.
2634 * symbol.c (msymbol__list): New function.
2636 2005-05-19 Kenichi Handa <handa@m17n.org>
2638 * input-gui.c (minput__win_init): Don't change the value of
2641 2005-05-16 Kenichi Handa <handa@m17n.org>
2643 * m17n-core.c (m17n_object): Be sure to initialize all members.
2645 * font-ft.c (fc_decode_prop): Fix args to msymbol.
2647 2005-05-09 Kenichi Handa <handa@m17n.org>
2649 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
2651 2005-04-27 Kenichi Handa <handa@m17n.org>
2653 * language.c (mlang__init): Add "an" (Aragonese).
2655 * word-thai.c: Add support for libthai.
2656 (mtext__word_thai_init): Initialize wordseg library conditionaly.
2657 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
2659 * mtext.c: Include "word-thai.h" conditionaly.
2660 (mtext__init): Call mtext__word_thai_init conditionaly.
2661 (mtext__fini): Call mtext__word_thai_fini conditionaly.
2663 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
2664 not WORDCUT_LD_FLAGS.
2666 2005-04-19 Kenichi Handa <handa@m17n.org>
2668 * word-thai.c (wordseg_propertize): Always unref the attached
2670 (thai_wordseg): Don't unref the property.
2672 2005-04-18 Kenichi Handa <handa@m17n.org>
2674 * word-thai.c: Include stdlib.h.
2675 (wordseg_propertize): Add dummy function for the case that wordcut
2676 library doesn't exist.
2677 (wordseg_propertize): Fix for old wordcut library.
2679 2005-04-16 Kenichi Handa <handa@m17n.org>
2681 * word-thai.c: Include <stdio.h>.
2683 2005-04-15 Kenichi Handa <handa@m17n.org>
2685 * draw.c: Include mtext.h.
2686 (linebreak_table, M_break_at_space, M_break_at_word)
2687 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
2688 (compose_glyph_string): Check POS before getting Mface text
2690 (truncate_gstring): Give correct TO arg to line_break function.
2691 (GET_LB_TYPE): New macro.
2692 (find_break_backward, find_break_forward): New functions.
2693 (mdraw__init): Initialize the above new variables.
2694 (mdraw__fini): Free linebreak_table.
2695 (mdraw_default_line_break): Use find_break_backward and
2698 * word-thai.c: New file.
2700 * word-thai.h: New file.
2702 * mtext.c: Include word-thai.h.
2703 (wordseg_func_table): New variable.
2704 (mtext__init): Initialize wordseg_func_table and call
2705 mtext__word_thai_init.
2706 (mtext__fini): Call mtext__word_thai_fini, free
2708 (MTextWordsegFunc): New type.
2709 (mtext__word_segment): New function.
2711 * mtext.h (wordseg_func_table): Extern it.
2712 (mtext__word_segment): Extern it.
2714 * m17n.c (m17n_init): Fix typo (== -> =).
2716 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
2717 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
2719 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
2720 (MTEXTPROP_VAL): New macros.
2722 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
2724 2005-04-07 Kenichi Handa <handa@m17n.org>
2726 * database.c (load_chartable): Fix pursing of symbol name.
2728 2005-03-24 Kenichi Handa <handa@m17n.org>
2730 * m17n.c (m17n_init): Fix typo (== -> =).
2732 2005-03-11 Kenichi Handa <handa@m17n.org>
2734 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
2736 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
2738 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
2741 2005-03-09 handa <handa@m17n.org>
2743 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
2744 calling m17n_init ().
2746 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
2747 calling m17n_init_core ().
2749 2005-02-28 Kenichi Handa <handa@m17n.org>
2751 * font-flt.c (mfont__flt_run): Add resulting code sequence in
2754 2005-02-17 Kenichi Handa <handa@m17n.org>
2756 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
2757 (M_description, M_command, M_variable): New variables.
2758 (load_im_info_keys): New variables.
2759 (load_im_info, check_command_keyseq, get_description_advance)
2760 (parse_command_list, get_command_list, parse_variable_list)
2761 (get_variable_list, input_method_hook): New functions.
2762 (command_list, variable_list): New variables.
2763 (minput__init): Put input_method_hook to Minput_method.
2764 Initialize M_description, M_command, M_variable, Mdetail_text,
2765 load_im_info_keys, command_list, variable_list.
2766 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
2767 (Mdetail_text): New variable.
2768 (minput_get_description, minput_get_commands)
2769 (minput_assign_command_keys, minput_get_variables)
2770 (minput_set_variable): New functions.
2772 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
2773 (minput_assign_command_keys, minput_get_variables)
2774 (minput_set_variable): Extern them.
2776 * plist.c (UNGETC): Just decrement st->p.
2777 (read_mtext_element): New arg skip.
2778 (read_integer_element): Likewise.
2779 (read_symbol_element): Likewise.
2780 (read_element): New arg KEYS.
2781 (mplist__from_plist): Don't increment ref-count of NULL object.
2782 (mplist__from_file): New arg KEYS.
2783 (mplist_put): Don't increment ref-count of NULL object.
2784 (mplist_add): Likewise.
2785 (mplist_push): Likewise.
2786 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
2788 * plist.h (mplist__from_file): Prototype adjusted.
2790 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
2791 (get_database_stream): New function.
2792 (load_database): Use get_database_stream.
2793 (M_database_hook): New variable
2794 (mdatabase__init): Initialize M_database_hook.
2795 (mdatabase__load_for_keys): New function.
2796 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
2798 (mdatabase_define): Free mdb->extra_info if necessary.
2800 * database.h (mdatabase__dir_list, M_database_hook)
2801 (mdatabase__load_for_keys): Extern them.
2802 (MDatabaseHookFunc): New type.
2804 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
2806 2004-12-27 Kenichi Handa <handa@m17n.org>
2808 * Version 1.2.0 released.
2810 2004-12-27 Kenichi Handa <handa@m17n.org>
2812 * input.c (minput_filter): Don't reset ic->xxx_changed.
2814 * mtext.c (mtext_from_data): Fix documentation.
2816 2004-12-25 Kenichi Handa <handa@m17n.org>
2818 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
2819 (M17NLIB_VERSION_NAME): Update to "1.2.".
2821 2004-12-24 Kenichi Handa <handa@m17n.org>
2823 * input.c (reset_ic): Set key_unhandled to 0.
2825 2004-12-21 Kenichi Handa <handa@m17n.org>
2827 * m17n-gui.h (mfont_from_spec): Delete extern.
2829 * input-gui.c (win_callback): Handle Minput_reset.
2830 (minput__win_init): Register reset_ic as a callback for
2833 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
2834 changed. At first, shift to the initial state.
2835 (minput__init): Initialize Minput_reset. Register reset_ic as a
2836 callback for Minput_reset.
2837 (Minput_reset): New variable.
2838 (minput_filter): Always set ic->xxx_changed to 0.
2839 (minput_reset_ic): New function.
2840 (integer_value): Fix typo ('>' -> '<') and calculation of length
2843 * m17n-core.c (merror_code): Change type to `int'.
2845 * m17n-misc.h (merror_code): Adjust type.
2847 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
2849 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
2850 (mtext_change_prop): Delete extern.
2852 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
2853 to `int'. Move the documents to m17n-core.h.
2855 2004-12-13 Kenichi Handa <handa@m17n.org>
2857 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
2858 (MTextProperty): Document it.
2860 2004-12-09 Kenichi Handa <handa@m17n.org>
2862 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
2864 2004-12-03 Kenichi Handa <handa@m17n.org>
2866 * internal.h (m17n__core_initialized, m17n__shell_initialized,
2867 m17n__gui_initialized): New externs.
2869 * m17n-core.h (enum M17NStatus): New enum.
2870 (m17n_status): Extern it.
2872 * m17n-core.c (core_initialized): Delete this variable.
2873 (m17n__core_initialized, m17n__shell_initialized,
2874 m17n__gui_initialized): New variables.
2875 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
2876 instead of core_initialized.
2877 (m17n_status): New function.
2879 * m17n.c (shell_initialized): Delete this variable.
2880 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
2883 * m17n-gui.h (m17n_init_win): Adjust the prototype.
2885 * m17n-gui.c (win_initialized): Delete this variable.
2886 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
2887 instead of gui_initialized.
2889 2004-11-19 Kenichi Handa <handa@m17n.org>
2891 * input.c (reset_ic): Check if ic_info->state is NULL.
2892 (filter): If ic_info->state is NULL, return 0.
2893 (load_input_method): Don't unref `maps' it it's not created.
2895 2004-11-15 Kenichi Handa <handa@m17n.org>
2897 * input.c (find_candidates_group): If INDEX is -1, find the last
2899 (take_action_list): If the previous of the first candidate is
2900 requested, select the last candidate.
2902 2004-11-08 Kenichi Handa <handa@m17n.org>
2904 * m17n-X.c (device_open): Try at most 32 fonts to find a
2905 non-autoscaled font.
2907 * font.c (xlfd_parse_name): Fix previous change.
2909 2004-11-05 Kenichi Handa <handa@m17n.org>
2911 * font.c: (commont_style): Include dummy elements "slanted" and
2912 "rslanted" to prefer "o" to "r" if "i" is requested.
2914 * font-ft.c (ft_to_prop): Fix "oblique" entry.
2916 2004-10-29 Kenichi Handa <handa@m17n.org>
2918 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
2920 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
2921 New members smallest and larger.
2922 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
2923 (xfont_registry_list): Likewise.
2924 (xfont_select): Likewise.
2927 2004-10-28 Kenichi Handa <handa@m17n.org>
2929 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
2930 font name comparison.
2931 (xfont_select): Fix logic for selecting a larger size font.
2933 2004-10-25 Kenichi Handa <handa@m17n.org>
2935 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
2938 2004-10-22 Kenichi Handa <handa@m17n.org>
2940 * input.c (update_candidate): Renamed from udpate_candidate.
2941 (take_action_list): Show more debugging info on arithmetic commands.
2943 * m17n-X.c (device_open): Fix previous change.
2945 * draw.c (compose_glyph_string): Don't get face property at the
2948 2004-10-21 Kenichi Handa <handa@m17n.org>
2950 * draw.c (compose_glyph_string): Fix for the case of category
2953 2004-10-19 Kenichi Handa <handa@m17n.org>
2955 * input.c (mdebug_mask): New variable.
2956 (shift_state): Print debug information.
2957 (take_action_list): Likewise.
2958 (handle_key): Likewise.
2960 2004-10-14 Kenichi Handa <handa@m17n.org>
2962 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
2964 2004-10-13 Kenichi Handa <handa@m17n.org>
2966 * m17n-X.c (device_open): Be sure to register at least one font
2969 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
2970 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
2972 2004-10-12 Kenichi Handa <handa@m17n.org>
2974 * draw.c (alloc_gstring): Fix previous change.
2976 * font-ft.c (ft_list_generic): Fix for the case of not
2979 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
2981 * font.c (mfont_list): If no font is found, return NULL.
2982 (load_font_encoding_table): Put entries of nil registry first.
2983 (find_encoding): Adjust for the above change.
2985 2004-10-11 Kenichi Handa <handa@m17n.org>
2987 * m17n-gui.h (mfont_list): Adjust prototype.
2989 * m17n-X.c (xfont_list): New arg maxnum.
2991 * font.h (struct MFontDriver): Change prototype of <list>.
2993 * font-ft.c (fc_generic_family_list): Delete it.
2994 (Mserif, Msans_serif, Mmonospace): Delete them.
2995 (M_generic_family_info): New variable.
2996 (enum GenericFamilyType): New enum.
2997 (struct GenericFamilyInfo): New struct.
2998 (generic_family_table): New variable.
2999 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
3001 (add_font_info): Get style here.
3002 (ft_list_family): Don't initialize fc_config here. Don't list
3004 (ft_list_generic): New function.
3005 (ft_select): Pay attention to generic familes here.
3006 (ft_open): Fix calculation of ascent and descent.
3007 (ft_list): Pay attention to generic families.
3008 (mfont__ft_init): Initialize M_generic_family_info,
3009 generic_family_table, and fc_config..
3010 (mfont__ft_fini): Finalize generic_family_table.
3012 * draw.c (compose_glyph_string): Use more constant font for
3013 glyphs. Adjust for the member change in MGlyph.
3014 (layout_glyph_string): Adjust for the member change in MGlyph.
3015 (alloc_gstring): Intilize scracth_glyph to avoid
3016 compose_glyph_string on it.
3017 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
3018 (mdraw_coordinates_position): Fix previous change.
3020 * internal-gui.h (glyph_category): New enum.
3021 (MGlyph): Change type of <category> to enum glyph_category.
3023 * face.c (mface__realize): Delete args langauge and charset.
3024 (mface__for_chars): Fix for the case that glyphs have different
3026 (mface__update_frame_face): Adjust for mface__realize change.
3028 * face.h (mface__realize): Adjust prototype.
3030 2004-10-05 Kenichi Handa <handa@m17n.org>
3032 * language.c (mlang__init): Add Akan.
3034 2004-10-04 Kenichi Handa <handa@m17n.org>
3036 * font-ft.c (add_font_info): Add instead of push the element.
3037 (ft_list_family): For generic fonts, try all
3038 substituted. families.
3040 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
3041 (run_rule): Don't update cluster range here.
3042 (run_command): Update cluster range on appending a glyph.
3043 (run_otf): Update cluster range for glyphs generated by OTF.
3045 2004-10-02 Kenichi Handa <handa@m17n.org>
3047 * m17n-X.c (device_open): Handle Mfont key in PLIST.
3049 2004-09-30 Kenichi Handa <handa@m17n.org>
3051 * font-ft.c (ft_select): Ignore family on calling mfont__score.
3053 2004-09-30 Kenichi Handa <handa@m17n.org>
3055 * font.h: Include <fontconfig/fontconfig.h>.
3056 (MFTInfo): New member langset.
3057 (mfont__encoding_list): Extern it.
3059 * font.c (mfont__encoding_list): New function.
3060 (mdebug_dump_font_list): New function.
3062 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
3063 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
3065 (ft_family_list): New variable.
3066 (set_font_info): New arg basep. Callers changed.
3067 (fc_list): Check the return value of FcPatternGetString.
3068 (add_font_info): New arg plist. Callers changed. Update
3070 (ft_list_family): New function (merged fc_list and ft_list_all).
3071 (ft_select): Use ft_list_family.
3072 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
3074 (mfont__ft_init): Initialize above new variables.
3075 (mfont__ft_fini): Free ft_family_list.
3076 (STRDUP_LOWER): New macro.
3077 (set_font_info): Use STRDUP_LOWER.
3078 (ft_list_family): Avoid duplicate addition of font path. Use
3080 (fc_decode_prop): Fix typo.
3082 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
3083 (xfont_registry_list): Change argument disp_info to frame.
3085 (xfont_list_all): New function.
3086 (xfont_list): If FONT is not NULL, check all fonts.
3088 2004-09-28 Kenichi Handa <handa@m17n.org>
3090 * m17n-X.c (MXFont, MXFontList): New types.
3091 (MDisplayInfo): Delete members font_registry_list,
3092 iso8859_1_family_list, iso10646_1_family_list, new members
3093 font_list, base_font_list.
3094 (free_display_info): Adusted for the change of MDisplayInfo.
3095 (xfont_driver): Initialize with xfont_list.
3096 (font_compare): New function.
3097 (build_font_list): Deleted.
3098 (xfont_registry_list): New function.
3099 (xfont_select): Use xfont_registry_list.
3100 (xfont_list): New function.
3101 (device_open): Adusted for the change of MDisplayInfo.
3103 * font-ft.c (add_font_info): New arg languages. Callers changed.
3104 (fc_list): Get languages from fonts..
3105 (ft_list_all): Renamed from ft_list. Callers changed.
3106 (ft_list): New function.
3107 (mfont__ft_driver): Initalize with ft_list.
3109 * font.c (mfont_list): New function.
3111 * font.h (struct MFontDriver): New member `list'.
3112 (MFTInfo): New member languages.
3114 * m17n-gui.h (mfont_list): Extern it.
3116 2004-09-27 Kenichi Handa <handa@m17n.org>
3118 * internal-gui.h (struct MGlyphString): Delete members mt,
3119 sub_width, sub_lbrearing, sub_rbearing, and region.
3121 * draw.c (MSubTextExtents): New type.
3122 (layout_glyphs): New arg extents. Set its members.
3123 (layout_glyph_string): Adjusted for the above change.
3124 (alloc_gstring): Don't set gstring->mt.
3125 (truncate_gstring): Call line_break function with mt instead of
3128 2004-09-22 Kenichi Handa <handa@m17n.org>
3130 * mtext.c (count_utf_16_chars): Count each code of invalid
3133 2004-09-19 Kenichi Handa <handa@m17n.org>
3135 * mtext.c (default_utf_16, default_utf_32): Rename them to
3136 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
3139 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
3142 2004-09-13 Kenichi Handa <handa@m17n.org>
3144 * draw.c (Mlatin): Don't declare it here.
3145 (visual_order): Fix reordering of combining characters.
3146 (compose_glyph_string): Fix detection of script.
3147 (layout_glyphs): Don't fix reordering of combining characters
3149 (layout_glyph_string): Pay attention to
3150 control->disable_overlapping_adjustment.
3151 (truncate_gstring): Include at least on character in a line.
3152 (get_gstring): Always scan one full line.
3153 (mdraw__init): Don't initialize Mlatin here.
3154 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
3155 have a font, use ascent/descent of an ASCII font. Allow
3156 ink_array_return and logical_array_return to be NULL.
3157 (mdraw_coordinates_position): Fix iteration.
3159 * font-ft.c (MFTtoProp): Member completely changed.
3160 (ft_to_prop): Adjusted for the above change.
3161 (ft_to_prop_size): Likewise.
3162 (set_font_info): Adjusted for the change of MFTtoProp.
3163 (fc_generic_family_list): New variable.
3164 (fc_list): Add special handling of generic font names.
3165 (mfont__ft_init): Adjusted for the change of MFTtoProp.
3166 Initialize fc_generic_family_list.
3167 (mfont__ft_fini): Don't free ft_to_prop. Free
3168 fc_generic_family_list.
3169 (FC_vs_M17N_font_prop): New type.
3170 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
3171 (fc_decode_prop, fc_encode_prop): New functions.
3172 (mfont__ft_parse_name): Use fc_decode_prop.
3173 (mfont__ft_unparse_name): Use fc_encode_prop.
3175 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
3176 (MWDevice): Add member realized_font_list.
3177 (free_display_info): Don't free disp_info->realized_font_list.
3178 (free_device): Free device->realized_fontset_list.
3179 (xft_find_metric): Use gstring->frame instead of rfont->frame.
3180 (device_open): Don't initialize disp_info->realized_font_list.
3181 (device_open): Initialize device->realized_font_list and set it to
3182 frame->realized_font_list.
3184 * fontset.c (try_font_group): New function.
3185 (mfont__lookup_fontset): Use try_font_group.
3187 * font.c (common_weight): Change the order of "regular".
3189 * face.c (Mlatin): Don't make it static.
3190 (mface__realize): Be sure to set work_gstring.frame.
3191 (mface__for_chars): Likewise.
3193 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
3196 * internal-gui.h (Mlatin): Extern it.
3198 * m17n-gui.h (MDrawControl): New member
3199 disable_overlapping_adjustment.
3201 2004-09-06 Kenichi Handa <handa@m17n.org>
3203 * font-flt.c (run_otf): Fix typo ('}'->']').
3205 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
3206 (COMBINING_PRECOMPUTED_P): New macros.
3208 * draw.c (layout_glyphs): Handle precomputed combining code.
3210 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
3211 precomupted combining code.
3213 2004-09-03 Kenichi Handa <handa@m17n.org>
3215 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
3218 2004-08-27 Kenichi Handa <handa@m17n.org>
3220 * face.c (mface_put_prop): If the new value is the same as the
3221 current one, don't increment frame->tick.
3223 2004-08-25 Kenichi Handa <handa@m17n.org>
3225 * fontset.c (mfontset): Initialize font_spec_list member.
3226 (mfontset_copy): Load fontset if necessary.
3228 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
3229 'metrics' to for C++.
3231 * draw.c (mdraw_glyph_info): Adjusted for the member name change
3234 2004-08-16 Kenichi Handa <handa@m17n.org>
3236 * Version 1.1.0 released.
3238 2004-08-13 Kenichi Handa <handa@m17n.org>
3240 * language.c (mlang__init): Add Dhivehi.
3242 * m17n-gui.c (Mx, Mfreetype): Delete it.
3243 (m17n_init_win): Don't initialize Mx and Mfreetype here.
3245 * m17n-gui.h (Mfreetype, Mxft): Extern them.
3246 (mfont_resize_ratio): Extern it.
3247 (MDrawGlyphInfo): New member logical_width;
3248 (MDrawGlyph): New type.
3249 (mdraw_glyph_list): Prototype adjusted.
3251 * m17n-X.c (xfont_open): Set type and fontp members.
3252 (xft_open): Likewise.
3254 * internal-gui.h (Mx, Mfreetype): Delete extern.
3256 * font.h (struct MRealizedFont): New member type and fontp.
3258 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
3259 (Mx, Mfreetype): Declare here.
3260 (Mxft): New variable.
3261 (mfont_resize_ratio): New function.
3263 * font-ft.c (ft_open): Set type and fontp members.
3265 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
3268 2004-08-11 Kenichi Handa <handa@m17n.org>
3270 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
3273 2004-08-06 Kenichi Handa <handa@m17n.org>
3275 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
3278 * font-flt.c (run_otf): Print debugging information if necessary.
3280 2004-08-05 Kenichi Handa <handa@m17n.org>
3282 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
3283 positioning_type 5 and 6. Switch simplified.
3285 2004-08-04 Kenichi Handa <handa@m17n.org>
3287 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
3289 2004-08-02 Kenichi Handa <handa@m17n.org>
3291 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
3292 set val to 1 even if it is greater than 1.
3294 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
3296 2004-07-29 Kenichi Handa <handa@m17n.org>
3298 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
3299 debugging information.
3301 * internal.h (MDEBUG_PRINT5): New macro.
3303 * draw.c (layout_glyphs): Don't combine a zero width glyph with
3304 the previous one if the zero width glyph has left or right
3307 2004-07-26 Kenichi Handa <handa@m17n.org>
3309 * m17n-X.c (xft_render): Pay attention to members left_padding and
3310 right_padding of MGlyph.
3312 * draw.c (visual_order): Allocate one more elements for arrays as
3313 a workaround of fribidi bug.
3314 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
3315 instead of MGlyph->bidi_sensitive.
3316 (layout_glyph_string): Pay attentinon to
3317 control->orientation_reversed when padding at the head or tail.
3318 Fix adjustment of space glyph width.
3319 (get_gstring): If cursor_width or cursor_bidi is changed, don't
3322 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
3323 instead of MGlyph->bidi_sensitive.
3325 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
3327 2004-07-26 Kenichi Handa <handa@m17n.org>
3329 * draw.c (visual_order): Don't treat combined glyphs specially.
3330 (layout_glyphs): Don't get metrics glyphs that are already ready.
3331 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
3332 width with the previous one.
3333 (draw_background): Fix bar cursor position on a r2l glyph.
3335 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
3336 (run_rule): Fix place of updating cluster_begin_pos and
3337 cluster_end_pos here.
3338 (run_otf): Don't set left_padding.
3340 * font-ft.c (adjust_anchor): Type of argument `code' changed.
3342 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
3343 Fix handling of GPOS.
3344 (mfont__ft_drive_gpos): Delete this function.
3346 * font.h (mfont__ft_drive_otf): Renamed back from
3347 mfont__ft_drive_gsub.
3348 (mfont__ft_drive_gpos): Delete extern.
3350 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
3351 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
3353 2004-07-23 Kenichi Handa <handa@m17n.org>
3355 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
3356 the same bidi level.
3358 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
3360 2004-07-22 Kenichi Handa <handa@m17n.org>
3362 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
3364 2004-07-20 Kenichi Handa <handa@m17n.org>
3366 * draw.c (render_glyphs): Fix checking of g->code validity.
3368 * face.c (mface__realize): Set g.type.
3370 2004-07-18 Kenichi Handa <handa@m17n.org>
3372 * Makefile.am: Prepend ${top_srcdir} to all *.la in
3375 * m17n-gui.c (mframe): Print error message give by dlopen to
3378 2004-07-16 Kenichi Handa <handa@m17n.org>
3380 * draw.c (compose_glyph_string): Improve the way of deciding a
3381 script. For a character that doesn't have script property, use
3382 the last non-latin script.
3384 * font-ft.c (fc_list): Cancel previous change.
3385 (mfont__ft_init): Add more entries in ft_to_prop_name.
3387 2004-07-15 Kenichi Handa <handa@m17n.org>
3389 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
3390 previous or next character glyphs.
3392 2004-07-14 Kenichi Handa <handa@m17n.org>
3394 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
3395 of type GLYPH_SPACE.
3397 * fontset.c (mfont__lookup_fontset): If glyph type is
3398 GLYPH_SPACE, get codes for SPACE.
3400 * internal-gui.h (Mfont): Delete extern.
3402 * m17n-gui.h (Mfont): Delete duplicated extern.
3404 2004-07-13 Kenichi Handa <handa@m17n.org>
3406 * font-ft.c (DEVICE_DELTA): New macro.
3407 (adjust_anchor): New function.
3408 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
3410 (mfont__ft_drive_gpos): New function.
3412 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
3413 (FontLayoutContext): Delete member `rfont'.
3414 (run_otf): Set g->otf_cmd. Call
3415 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
3416 only whne HAVE_OTF is defined.
3418 * fontset.c: Include "config.h".
3420 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
3421 (MGlyph): New member otf_cmd.
3423 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
3424 (mfont__ft_drive_gpos): Extern it.
3426 * face.c: Include "config.h".
3428 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
3430 * input-gui.c: Include "config.h".
3432 * plist.c: Include "config.h".
3434 2004-07-06 Kenichi Handa <handa@m17n.org>
3436 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
3437 internal-gui.h: Cancel previous changes.
3439 * m17n-gd.h: Delete it.
3441 * Makefile.am (libm17n_core_la_LIBADD): New variable.
3442 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
3443 @XML2_LD_FLAGS@ to above.
3444 (libm17n_la_LIBADD): Add -ldl.
3445 (libm17n_la_LDFLAGS): Add -export-dynamic.
3446 (X_LD_FLAGS): Fix the order of linking.
3447 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
3448 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
3449 (libm17n_X_la_LDFLAGS): Add -module.
3450 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
3451 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3452 (libm17n_gd_la_LDFLAGS): Add -module.
3453 (include_HEADERS): Delete m17n-gd.h.
3455 2004-06-30 Kenichi Handa <handa@m17n.org>
3457 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
3458 (MDeviceLibraryInterface): Delete it.
3459 (register_device_library): Delete it.
3460 (m17n__device_library_list): Renamed from device_library_list.
3462 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
3463 (m17n_init_win): Adjust prototype.
3465 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
3466 (m17n_init_gd): New function.
3468 * m17n-gd.h: New file.
3470 * m17n-X.h: Include <m17n-gui.h>.
3471 (m17n_init_X): Extern it.
3472 (M17N_INIT): Redefine it.
3474 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
3475 (m17n_init_X): New function.
3477 * internal-gui.h (m17n__device_library_list): Extern it.
3478 (struct MDeviceDriver): New members initialized, init, and fini.
3480 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
3482 (libm17n_X_la_LIBADD): Delete aboves.
3483 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
3484 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
3485 (libm17n_gd_la_LDFLAGS): Delete it.
3486 (include_HEADERS): Add m17n-gd.h.
3488 2004-06-25 Kenichi Handa <handa@m17n.org>
3490 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
3491 (libm17n_gd_la_LDFLAGS): Cancel previous change.
3493 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
3495 * font-ft.c (fc_list): If FcFontList finds no font, try
3498 * draw.c (compose_glyph_string): Terminate the last loop after
3499 doing default combining if necessary.
3501 2004-06-24 Kenichi Handa <handa@m17n.org>
3503 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
3505 * character.c (mchar_define_property): Add const to an arg.
3507 * charset.c (mchar_define_charset): Add const to an arg.
3509 * coding.c (MCodingSystem): Add const to an arg or decoder.
3510 (finish_decoding): Add const to an arg.
3511 (decode_coding_charset, decode_coding_utf_8)
3512 (decode_coding_utf_16, decode_coding_utf_32)
3513 (decode_coding_iso_2022, decode_coding_sjis)
3514 (mconv_define_coding): Likewise.
3516 * m17n-X.c (xft_find_metric): Delete unused variable.
3518 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
3521 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
3524 * mtext.c (count_utf_8_chars, count_utf_16_chars)
3525 (mtext__from_data, mtext_from_data): Add `const' to an arg.
3527 * mtext.h (mtext__from_data): Ajust prototype.
3529 2004-06-23 Kenichi Handa <handa@m17n.org>
3531 * draw.c (compose_glyph_string): Always get glyph codes by
3533 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
3534 (mdraw_glyph_list): New function.
3536 * font-flt.c (mfont__flt_run): Be sure to call
3537 rfont->driver->encode_char.
3539 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
3540 (ft_encode_char): Delete arg C.
3541 (ft_render): Don't call FT_Get_Char_Index.
3543 * font.c (mfont__encodable_p): Delete it.
3544 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
3546 * font.h (struct MFontDriver): Delete arg C of encode_char.
3547 (mfont__encodable_p): Delete extern.
3549 * m17n-X.c (xfont_encode_char): Delete arg C.
3550 (xft_find_metric): Don't cal FT_Get_Char_Index.
3551 (xft_render): Likewise.
3553 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
3555 (mdraw_glyph_list): Extern it.
3557 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
3559 2004-06-22 Kenichi Handa <handa@m17n.org>
3561 * m17n-gui.h (mfontset_lookup): Extern it.
3563 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
3565 * fontset.c (realize_fontset_elements)
3566 (free_realized_fontset_elements, update_fontset_elements): New
3568 (mfont__realize_fontset): Call realize_fontset_elements.
3569 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
3570 (mfont__lookup_fontset): If a fontset was modified, update
3571 the realized fontset.
3572 (mfontset_modify_entry): Increment fontset->tick.
3573 (mfontset_lookup): New function.
3575 2004-06-21 Kenichi Handa <handa@m17n.org>
3577 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
3579 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
3580 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
3581 length of source text 0.
3583 2004-06-21 Kenichi Handa <handa@m17n.org>
3585 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
3586 (compare): Pay attention to format other than utf-8.
3587 (copy): Delete this function.
3588 (count_by_utf_8, count_by_utf_16, insert): New functions.
3589 (count_utf_16_chars): Fix handling of a surrogate pair.
3590 (find_char_forward, find_char_backward): Likewise.
3591 (mtext__from_data): Delete unnecessary check. Fix number of
3593 (mtext_from_data): Don't count items.
3594 (mtext_ref_char): Optimize the code.
3595 (mtext_set_char): Pay attention to format other than utf-8.
3596 (mtext_cat_char): Likewise.
3597 (mtext_dup): Don't call copy, instead do allocation here.
3598 (mtext_cat): Call insert instead of copy.
3599 (mtext_ncat): Likewise.
3600 (mtext_cpy): Delete character at first and call insert instead of
3602 (mtext_ncpy): Likewise.
3603 (mtext_copy): Likewise.
3604 (mtext_duplicate): Call insert instead of copy.
3605 (mtext_del): Pay attention to format other than utf-8.
3606 (mtext_ins): Simply call insert.
3607 (mtext_ins_char): Pay attention to format other than utf-8.
3608 (mtext_tok): Call insert instead of copy.
3609 (mtext_text): Call UNIT_BYTES.
3611 * textprop.c (mtext__adjust_plist_for_change): New function.
3613 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
3614 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
3615 (CHAR_UNITS_AT): Fix typo.
3616 (CHAR_UNITS_BY_HEAD): Fix typo.
3617 (STRING_CHAR_AND_UNITS): Fix typo.
3619 * internal.h (MTEXT_READ_ONLY_P): New macro.
3621 * mtext.h (mtext__replace): Delete the extern.
3622 (mtext__adjust_foramt): Adjust prototype.
3624 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
3625 if possible. Otherwise make a copy of mmt.
3627 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
3630 2004-06-18 Kenichi Handa <handa@m17n.org>
3632 * character.h (CHAR_STRING_UTF16): Fix syntax.
3634 2004-06-16 Kenichi Handa <handa@m17n.org>
3636 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
3637 (libm17n_X_la_LIBADD): Delete it.
3638 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
3640 * m17n-X.c (device_open): Add parens in `if' condition.
3642 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
3643 (DEC_POSITION): Likewise.
3644 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
3646 2004-06-15 Kenichi Handa <handa@m17n.org>
3648 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
3651 * draw.c (compose_glyph_string): If langauge is specified, call
3652 mface__for_chars even if a text is all latin. Fix condition for
3653 setting non_ascii_found.
3655 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
3657 * m17n.h (minput_char_to_key): Delete extern.
3659 * m17n-gui.h (minput_event_to_key): Cancel previous change.
3661 * m17n-gui.c (null_device_open): Set several members of frame.
3663 2004-06-14 Kenichi Handa <handa@m17n.org>
3665 * m17n-gui.h (minput_event_to_key): Delete extern.
3667 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
3669 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
3671 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
3673 2004-06-08 Kenichi Handa <handa@m17n.org>
3675 * character.c (mchar_put_prop): Don't increment the ref-count of
3678 2004-06-04 Kenichi Handa <handa@m17n.org>
3680 * m17n-core.c (mdebug__register_object): New function.
3681 (mdebug__unregister_object): Likewise.
3683 * internal.h (mdebug__register_object, mdebug__unregister_object):
3685 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
3688 * charset.c (mcharset__load_from_database): Don't call
3689 mconv__register_charset_coding here.
3691 * coding.c (find_coding): Get a real name from an element of
3692 coding_definition_list.
3693 (mconv__register_charset_coding): Set the real name at the top of
3695 (mcoding__load_from_database): Likewise.
3696 (mconv_list_codings): Adjusted for the above change.
3698 2004-06-03 Kenichi Handa <handa@m17n.org>
3700 * coding.c (find_coding): Find by canonicalized name. Don't have
3701 to modify the element of coding_definition_list by
3703 (mconv__define_coding_from_charset): Delete it.
3704 (mconv__register_charset_coding): Canonicalize sym.
3705 (mcoding__load_from_database): Register plist modified by
3708 * coding.h (mconv__define_coding_from_charset): Don't extern it.
3710 * font-ft.c (ft_open): Fix setting of rfont->descent.
3712 2004-06-02 Kenichi Handa <handa@m17n.org>
3714 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
3715 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
3716 (xlfd_unparse_name): Renamed from xfont_build_name.
3717 (mfont__init): Initialized Mfontconfig.
3718 (mfont__free_realized): Unconditionally unref rfont->info.
3719 (mfont__select): Free `this' if it's not best.
3720 (mfont__open): Don't check frame->realized_font_list.
3721 (mfont__parse_name_into_font): New function.
3722 (Mfontconfig): New variable.
3723 (mfont_from_name): Call mfont_parse_name.
3724 (mfont_name): Call mfont_unparse_name.
3725 (mdebug_dump_font): Likewise.
3727 * font.h (struct MFontDriver): Delete members parse_name and
3729 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
3730 (mfont__parse_name_into_font): Extern it.
3732 * font-ft.c: Include "symbol.h".
3733 (close_ft): Unconditionally free filename and charmap_list of
3735 (ft_open): Duplicate base->filename. Increment ref-count of
3736 ft_info->charmap_list. Free ft_info->charmap_list and
3737 ft_info->filename on error.
3738 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
3740 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
3742 (enum xlfd_field_idx): Moved to font.c.
3743 (split_font_name, build_font_name): Likewise.
3744 (build_font_list): Call mfont__parse_name_info_font.
3745 (xfont_open): Call mfont__unparse_name. Free name.
3746 (xfont_parse_name, xfont_build_name): Moved to font.c
3747 (xft_select): Prototype deleted.
3748 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
3749 Call mfont_pase_name.
3751 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
3752 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
3755 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
3758 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
3760 2004-06-01 Kenichi Handa <handa@m17n.org>
3762 * fontset.c (mfontset_modify_entry): Pay attention to the case
3763 that fontset->font_spec_list is NULL.
3765 2004-05-31 Kenichi Handa <handa@m17n.org>
3767 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3769 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
3771 * font.c (mfont__select): Print score the a font for debugging.
3773 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
3775 * coding.c (reset_coding_sjis): Check kanji and kana instead of
3776 kanji_sym and kana_sym.
3778 2004-05-28 Kenichi Handa <handa@m17n.org>
3780 * Makefile.am (VINFO): New variable.
3781 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
3782 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
3784 2004-05-27 Kenichi Handa <handa@m17n.org>
3786 The following chanages are to make device dependent functions
3787 accessible only from MDeviceDriver structure, and to add GD and
3788 null device drivers. Font drivers get also device dependent.
3790 * m17n.c (m17n_init): Increament shell_initialized.
3791 (m17n_fini): Decremented shell_initialized.
3793 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
3795 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
3796 (Mwidget, Mcolormap, Mx): Extern them.
3798 * m17n-gui.c: Include <dlfcn.h> and "config.h".
3799 (free_frame): Call frame->driver->close instead of
3801 (DLOPEN_SHLIB_EXT): New macro.
3802 (MDeviceLibraryInterface): New type.
3803 (device_library_list): New variable.
3804 (register_device_library): New function.
3805 (null_device): New variable.
3806 (null_device_close, null_device_get_prop)
3807 (null_device_realize_face, null_device_free_realized_face): New
3809 (null_driver): New variable.
3810 (null_device_init, null_device_fini, null_device_open): New
3812 (null_interface): New variable.
3813 (Mfreetype, Mdevice): Declare them.
3814 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
3815 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
3816 Mwin__Close_Device. Register drivers for Mx and Mgd.
3817 (m17n_fini_win): Decremented win_initialized. Call "fini"
3818 function of all opened devices. Don't call mwin__fini.
3819 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
3821 (mframe): Handle Mdevice key of PLIST.
3822 (mframe_get_prop): Call frame->device->get_prop instead of
3823 mwin__device_get_prop.
3825 * m17n-gd.c: New file.
3827 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
3828 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
3830 * m17n-core.c (m17n_init_core): Increate core_initialized.
3831 (m17n_fini_core): Decremented core_initialized.
3833 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
3834 (Mcolormap): Don't extern them here.
3836 * m17n-X.c (FRAME_DEVICE): New macro.
3837 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
3838 (free_display_info): Use MPLIST_DO.
3839 (free_device): Free rface->info.
3840 (xft_close): Delete it.
3841 (device_init): Renamed from mwin__init.
3842 (device_fini): Renamed from mwin__fini.
3843 (device_open): Renamed from mwin__open_device.
3844 (x_driver): New variable.
3845 (MXFontInfo): Delete member frame, add member display.
3846 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
3847 Don't declare them here.
3849 * internal-gui.h (MDeviceType): New enum.
3850 (MWDefice): Delete it.
3851 (struct MFrame): Change type of device to void *. New members
3852 device_type, driver, font_driver_list.
3853 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
3854 (MDeviceDriver): New type.
3855 (Mx, Mgd, Mfreetype): Extern them.
3856 (mwin__XXX): Delete all of them.
3858 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
3860 (win_destroy_ic): Likewise.
3861 (adjust_window_and_draw): Likewise.
3862 (win_callback): Likewise.
3863 (Mxim): Declare it here.
3864 (minput_event_to_key): Call M_CHECK_READABLE.
3866 * fontset.c (mfont__lookup_fontset): Delete local variable
3869 * font.h (struct MFontDriver): Delete member close, add members
3870 parse_name and build_name.
3871 (mfont__driver_list): Delete extern.
3872 (mfont__close): Delete extern.
3874 * font.c (mfont__init): Don't set mfont__driver_list.
3875 (mfont__fini): Don't unref mfont__driver_list.
3876 (mfont__select): Try font drivers in frame->font_driver_list. Set
3877 driver member of a realized font.
3878 (mfont__close): Delete it.
3879 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
3880 functions of the default frame.
3882 * font-ft.c (close_ft): Check ft_info->ft_face and work
3884 (add_font_info): Allocate ft_info by M17N_OBJECT.
3885 (ft_close): Delete it.
3886 (mfont__ft_driver): Don't set ft_close.
3887 (ft_select): Increment ref-count of best_font.
3888 (ft_open): Decremented ref-count of base. On error, call
3889 FT_Done_Face and free ft_info.
3890 (ft_find_metric): Always use XXX_MONO in load_flags.
3891 (ft_render): Fix setting of width. Call
3892 frame->driver->draw_points instead of mwin__draw_points.
3893 (ft_to_prop): Don't set mfont__driver_list.
3894 (mfont__ft_fini): Just unref ft_info.
3896 * face.c (mface__init): Exchange foreground and background of
3897 mface__default. Call mface_put_prop to set hline of
3899 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
3900 (mface__free_realized): Don't call mwin__free_realized_face.
3902 * draw.c (Mdepth): Don't declare it here.
3903 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
3904 (render_glyphs, render_glyph_string): Likewise.
3905 (mdraw__init): Don't set Mdepth.
3906 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
3908 (mdraw_text_per_char_extents): Return 0 on success and -1 on
3910 (mdraw_text_items): Check FRAME is writable.
3911 (mdraw_per_char_extents): Implement body.
3913 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
3915 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
3916 (GUI_SOURCES): Delete it.
3917 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
3918 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
3919 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
3920 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
3921 (linkgui_LDADD): Set to libm17n-gui.la
3922 (linkgui_LDFLAGS): New target.
3923 (SRC): Include ${libm17n_gui_la_SOURCES} and
3924 ${libm17n_gd_la_SOURCES}.
3926 2004-05-24 Kenichi Handa <handa@m17n.org>
3928 * draw.c (draw_background): Don't draw background even if
3929 rface->face.property[MFACE_BACKGROUND] is not Mnil.
3931 2004-05-22 Kenichi Handa <handa@m17n.org>
3933 * m17n-X.c (xft_open_font): Fix anti_alias setting.
3935 2004-05-20 Kenichi Handa <handa@m17n.org>
3937 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
3939 * m17n-gui.c: Include "plist.h".
3940 (mframe): If PLIST is NULL, initialize it to emply plist.
3942 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
3943 (xft_driver): New variable.
3944 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
3945 (xft_find_metric, xft_render): New function.
3946 (mwin__init): Adjusted for the new mfont__driver_list.
3947 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
3948 generated face to PARAM.
3949 (mwin__realize_face): Fix setting of box colors. Don't call hook
3951 (mwin__draw_hline): New function.
3952 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
3953 (mwin__xft_render): Delete these function.
3955 * internal-gui.h (struct MFrame): New member tick.
3956 (struct MGlyphString): New member tick.
3957 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
3958 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
3959 (mwin__xft_render): Delete extern.
3961 * fontset.c (mfont__lookup_fontset): Make the code simpler.
3962 (mfontset): Always increment the reference count of returned
3965 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
3966 (MFTInfo): Moved to font.h.
3967 (ft_iso8859_1_font_list): Delete this variable.
3968 (set_font_info): Don't set font->property[MFONT_TYPE].
3969 (set_font_info): Don't udpate ft_iso8859_1_font_list.
3970 (add_font_info): Change type to void.
3971 (fc_list): Change anme from xft_list. Caller changed. Include
3972 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
3973 (mfont__ft_driver): Change name from ft_driver. Caller changed.
3974 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
3975 (close_ft): Don't call mwin__xft_close. Unref
3976 ft_info->extra_info.
3977 (ft_open): Don't setup ft_info->fontname. Don't call
3979 (ft_find_metric): Don't call mwin__xft_get_metric.
3980 (ft_encode_char): Call rfont->driver->open instead of ft_open.
3981 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
3982 (mfont__ft_init): Adjusted for new mfont__driver_list.
3983 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
3985 * font.c (mfont__driver_list): Make it MPlist.
3986 (mfont__init): Adjust initialization of mfont__driver_list.
3987 (mfont__fini): Free mfont__driver_list.
3988 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
3989 (mfont__select): Adjusted for the new mfont__driver_list.
3991 * font.h (enum MFontProperty): Delete MFONT_TYPE.
3992 (mfont__drirver_list): Adjust prototype.
3993 (MFTInfo): Move to here from fron.c. Deleve member fontname.
3995 * face.h (struct MFace): Delete member realized_face_list, add
3997 (struct MRealizedFace): Delete member need_update
3998 andnofont_rface, add member non_ascii_list.
3999 (mface__update_frame_face): Extern it.
4001 * face.c (hline_prop_list, box_prop_list, noop_hook): New
4003 (get_hline_create, get_box_create): New functions.
4004 (find_realized_face): Cancel previous change. Arg RFONT deleted.
4006 (free_face): Cancep previous change. Free face->frame_list.
4007 (serialize_hline): Do nothing if hline->width is zero.
4008 (serialize_box): Do nothing if box->width is zero.
4009 (mface__init): Setup all properties of mface__default.
4010 (mface__fini): Free hline_prop_list and box_prop_list.
4011 (mface__realize): Cancel previous change. Update
4012 face->frame_list. Setup rface->non_ascii_list.
4013 (mface__for_chars): Update rface->non_ascii_list.
4014 (mface__free_realized): Free rface->non_ascii_list.
4015 (mface__update_frame_face): New function.
4016 (mface): Initialize face->frame_list.
4017 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
4019 (mface_merge): Likewise.
4020 (mface_put_prop): If key is Mhline or Mbox, get value by
4021 get_hline_create or get_box_create respectively.
4022 (mface_put_prop): Update frame->tick and call
4023 mface__update_frame_face if necessary.
4024 (mface_update): Do nothing if func is noop_hook.
4026 * draw.c (render_glyphs): If a font is not found, use
4027 mwin__draw_empty_boxes.
4028 (alloc_gstring): Initialize gstring->tick.
4029 (get_gstring): Check gstring->tick.
4031 2004-05-17 Kenichi Handa <handa@m17n.org>
4033 * face.c (find_realized_face): Return value changed. If RFONT is
4034 NULL, avoid unnecessary checking.
4035 (free_face): Free face->realized_face_list.
4036 (mface__realize): Adjusted for the change of find_realized_face.
4037 If it returns a realized face that needs update, free it and
4038 realize a new one. Push a new realized face to
4039 frame->realized_face_list instead of appending.
4040 (mface__for_chars): Adjusted for the change of find_realized_face.
4041 Short cut if the required font is in rface->ascii_rface.
4042 (mface_put_prop): Free old value if necessary. Set need_update
4043 member of realized faces to 1.
4045 * face.h (struct MFace): Delete member tick, add member
4047 (struct MRealizedFace): Delete member tick, add member
4050 2004-05-13 Kenichi Handa <handa@m17n.org>
4052 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
4054 2004-05-12 Kenichi Handa <handa@m17n.org>
4056 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
4058 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
4059 parse it XftNameParse.
4061 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
4062 (all_fonts_scaned): New variable.
4063 (set_font_info): FAMILY may be Mnil.
4064 (add_font_info): Argument changed.
4065 (xft_list): Call add_font_info in it.
4066 (ft_list): Likewise.
4067 (ft_select): Make it work in the case family is Mnil.
4068 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
4069 (mfont__ft_fini): Set all_fonts_scaned to 0.
4071 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
4072 that is failed to open.
4074 2004-05-10 Kenichi Handa <handa@m17n.org>
4076 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
4077 device's depth is 1 (i.e. monochrome).
4079 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
4080 to work around the problem of libtool.
4082 * font-ft.c: Include <freetype/ftbdf.h>.
4083 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
4085 (mfont__ft_init): Initialize them.
4086 (ft_iso8859_1_font_list): New variable.
4087 (set_font_info): Detect a font containing iso8859-1 glyphs and
4088 register it in ft_iso8859_1_font_list. If the font is not
4089 scalable, assume it as BDF or PCF font and setup SIZE and RESY
4090 properties of the font from its properties.
4091 (add_font_list): If the font is not scalable, check if it is BDF
4092 or PCF font. If not, ignore it.
4093 (ft_select): If FAMILY is Mnil, return NULL only if the requested
4094 registry is not iso8859-1.
4095 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
4096 ft_iso8859_1_font_list.
4097 (ft_find_metric): If the font is not scalable, assume it as BDF
4098 or PCF, and get a metric from its properties.
4099 (mfont__ft_fini): Free ft_iso8859_1_font_list.
4101 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
4103 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
4104 (libm17n_la_LDFLAGS): Delete it.
4105 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
4106 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
4108 2004-05-06 Kenichi Handa <handa@m17n.org>
4110 * draw.c (compose_glyph_string): Fix previous change.
4112 2004-04-30 Kenichi Handa <handa@m17n.org>
4114 * font-ft.c (ft_list): Delete unused variable `result'.
4115 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
4117 2004-04-27 Kenichi Handa <handa@m17n.org>
4119 * m17n-X.c: Include config.h
4120 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
4121 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
4122 (MWDevice) [HAVE_XFT2]: New member xft_draw.
4123 (FRAME_CMAP, FRAME_VISUAL): New macros.
4124 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
4125 (xfont_driver): Make it static.
4126 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
4127 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
4128 info->xft_color_back.
4129 (MXftFontInfo) [HAVE_XFT2]: New type.
4130 (mwin__xft_close) [HAVE_XFT2]: New function.
4131 (mwin__xft_open) [HAVE_XFT2]: New function.
4132 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
4133 (mwin__xft_render) [HAVE_XFT2]: New function.
4135 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4136 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
4137 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
4140 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
4142 * font-ft.c: Don't include FT_FREETYPE_H here.
4143 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
4144 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
4145 (MFTInfo): New member charmap_index.
4146 (MFTInfo) [HAVE_XFT2]: New member xft_info.
4147 (check_otf_filename): Renamed from check_filename. Return value
4149 (ft_set_property): This function deleted.
4150 (set_font_info): New function.
4151 (add_font_list): Argument changed. Add multiple fonts.
4152 (xft_list) [HAVE_XFT2]: New function.
4153 (ft_list) [not HAVE_XFT2]: New function.
4154 (ft_select): Add code for Xft.
4155 (close_ft): Likewise.
4156 (ft_open): Likewise.
4157 (ft_find_metric): Likewise.
4158 (ft_encode_char): Likewise.
4159 (ft_render): Likewise.
4161 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
4163 2004-04-26 Kenichi Handa <handa@m17n.org>
4165 * textprop.c (mtext_attach_property): Declare the return type as
4168 2004-04-21 Kenichi Handa <handa@m17n.org>
4170 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
4172 2004-04-09 Kenichi Handa <handa@m17n.org>
4174 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
4176 (load_command): Setup above members.
4178 2004-04-05 Kenichi Handa <handa@m17n.org>
4180 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
4182 2004-03-30 Kenichi Handa <handa@m17n.org>
4184 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
4187 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
4188 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
4190 2004-03-29 Kenichi Handa <handa@m17n.org>
4192 * Version 1.0 Patch Level 2 released.
4194 2004-03-29 Kenichi Handa <handa@m17n.org>
4196 * charset.c (make_charset): Set charset->fully_loaded and
4197 charset->simple correctly. Don't try to get charset->min_char and
4198 charset->max_char for a charset of method subset and superset.
4199 Don't load a mapping file here.
4200 (mcharset__init): Set unified_max.
4201 (mcharset__load_from_database): Free a working plist.
4203 * coding.c (mcoding__fini): Free all malloced data.
4205 * input-gui.c (win_create_ic): Set control.as_image for preediting
4208 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
4209 `count') to initialize the array.
4211 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
4214 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
4216 (mwin__create_window): Fix bug of setting a background pixel of a
4218 (mwin__adjust_window): Clear the window before drawing.
4220 * m17n-core.c (mdebug__report_object): Free array->objectes if
4222 (m17n_init_core): Don't set report_header_printed to 0 here.
4223 Fix debugging information.
4224 (m17n_fini_core): Set report_header_printed to 0 here.
4226 * m17n-core.h (mplist_deserialize): Extern it.
4228 * m17n-gui.c (m17n_fini_win): Fix debugging information.
4230 * m17n.c (m17n_fini): Fix debugging information.
4232 * mtext.c (mtext__adjust_foramt): New function.
4234 * mtext.h (mtext__adjust_foramt): Extern it.
4236 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
4238 * plist.h (mplist__deserialize): Don't extern it.
4240 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
4241 elements of symbol_table to NULL. Report about created and freed
4242 symbols if MDEBUG_FINI is set.
4244 2004-03-22 Kenichi Handa <handa@m17n.org>
4246 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
4248 * m17n.c (m17n_init): Fix the way of checking merror_code.
4250 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
4252 2004-03-22 Kenichi Handa <handa@m17n.org>
4254 * fontset.c (realize_font_group): Adjust the font size by
4255 mfont__resize before selecting a font.
4257 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
4259 2004-03-19 Kenichi Handa <handa@m17n.org>
4261 * Version 1.0 Patch Level 1 released.
4263 2004-03-19 Kenichi Handa <handa@m17n.org>
4265 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
4267 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
4269 2004-03-19 Kenichi Handa <handa@m17n.org>
4271 Re-apply the changes forgotten in the released version.
4273 * charset.c (mcharset__load_from_database): Call
4274 mchar_define_charset.
4276 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
4277 (mconv_encode_range): Put Mcoding text property.
4279 2004-03-18 Kenichi Handa <handa@m17n.org>
4281 * draw.c (Mdepth): New variable.
4282 (visual_order): Delete unused local var `pos'.
4283 (compose_glyph_string): Fix for the case that gstring->glyphs is
4284 realloced. Stop generating glyphs at TO. Fix handling of
4286 (layout_glyphs): Get metrics of all glyphs in advance. Set
4287 lbearing and rbearing of base of composition glyph correctly.
4288 Handle left-overhang glyphs correctly.
4289 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
4291 (dump_combining_code): Change the defualt off_x character to ".".
4292 (mdraw__init): Initialize Mdepth.
4294 * face.c (work_gstring): New variable
4295 (mface__init): Initialize work_gstring.
4296 (mface__fini): Free work_gstring.glyphs.
4297 (mface__realize): Don't handle videomode property here. Adjusted
4298 for the change of mfont__get_metric.
4299 (mface__for_chars): Adjusted for the change of mfont__get_metric.
4301 * face.h (enum face_gc): Moved to m17n-X.c.
4303 * font.h (struct MFontDriver): Arguments of find_metric changed.
4304 (mfont__select): Prototype adjusted.
4305 (mfont__get_metric): Likewise.
4306 (mfont__ft_drive_otf): Likewise.
4307 (mfont__flt_run): Likewise.
4309 * font.c (mfont__select): New argument layouter. If layouter is
4310 different in the registered font, make a new copy of realized
4312 (mfont__get_metric): Argument changed. Get metrics of multiple
4314 (mfont_find): Call mfont__select with layouter as Mnil.
4316 * font-flt.c (FontLayoutContext): New member rfont.
4317 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
4318 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
4320 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
4322 (NUM_POINTS): New macro.
4323 (MPointTable): New type.
4324 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
4325 (mfont__ft_drive_otf): New argument rfont.
4327 * fontset.c (realize_font_group): Adjusted for the changed of
4329 (check_fontset_element): This function deleted.
4331 * input-gui.c (adjust_window_and_draw): Locate a preedit window
4332 off the parent window if the preedit text is zero length.
4334 * internal-gui.h (struct MFrame): New members foreground,
4335 background, videomode, font.
4336 (struct MGlyphString): New member anti_alias.
4337 (MDrawPoint): New type.
4338 (mwin__draw_bitmap): Prototype deleted.
4339 (mwin__draw_points): Prototype added.
4341 * m17n-gui.h (MDrawControl): New member anti_alias.
4343 * m17n-gui.c (free_frame): Free frame->font.
4344 (mframe): Set the fontset of frame->face to the default fontset.
4346 * m17n-X.c (RGB_GC): New type.
4347 (enum gc_index): Renamed from enum face_gc. Member names changed.
4349 (struct MWDevice): Members foreground and background deleted. New
4350 member scratch_gc, gc_list.
4351 (DEFAULT_FONT, FALLBACK_FONT): New macros.
4352 (free_device): Free GCs in device->gc_list.
4353 (get_rgb_gc): New function.
4354 (get_gc): Renamed and argument changed from get_color.
4355 (get_gc_for_anti_alias): New function.
4356 (xfont_find_metric): Arguments changed. Get metrics of multiple
4358 (set_region): Argument changed. Caller changed.
4359 (xfont_render): Allways set a font in gc.
4360 (x_error_handler, x_io_error_handler): Define only if
4361 X_SET_ERROR_HANDLER is defined.
4362 (mwin__open_device): Create device->scratch_gc. Set members
4363 foreground, background, and videomode of frame. Call
4364 XSetErrorHandler and XSetIOErrorHandler only if
4365 X_SET_ERROR_HANDLER is defined.
4366 (struct gc_list): Deleted.
4367 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
4368 (mwin__realize_face): Adjusted for the change of the format of
4369 rface->info and the charge of set_region.
4370 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
4371 (mwin__draw_box): Likewise.
4372 (mwin__draw_bitmap): This function deleted.
4373 (mwin__draw_points): New function.
4374 (mwin__verify_region): Adjusted for the change of the format of
4375 rface->info and the charge of set_region.
4376 (mwin__create_window): Inherit backgound pixel from parent.
4377 (mwin__dump_gc): Adjusted for the change of the format of
4380 2004-03-16 Kenichi Handa <handa@m17n.org>
4382 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
4384 * input.c (M_key_alias): New variable.
4385 (handle_key): Try M_key_alias property of a key too.
4386 (minput__init): Initialize M_key_alias. Give that property to
4387 symbols in one_char_symbol. Fix bug of initializing
4390 * draw.c (compose_glyph_string): Don't handle
4391 ignore_formatting_char here. Include formatting characters in the
4392 range processed by a FTL.
4393 (layout_glyph_string): Handle ignore_formatting_char here.
4395 2004-03-12 Kenichi Handa <handa@m17n.org>
4397 * input-gui.c (win_create_ic): Enable bidi in status control.
4399 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
4401 2004-03-09 Kenichi Handa <handa@m17n.org>
4403 * input.c (load_input_method): If title is not specified, use the
4404 input method name as title.
4406 * m17n-X.c (get_color): Make it static.
4407 (xim_create_ic, xim_destroy_ic, x_error_handler)
4408 (x_io_error_handler): Likewise.
4410 2004-03-01 Kenichi Handa <handa@m17n.org>
4412 * Version 1.0 released.
4415 Copyright (C) 2003, 2004
4416 National Institute of Advanced Industrial Science and Technology (AIST)
4417 Registration Number H15PRO112
4419 This file is part of the m17n library.
4421 The m17n library is free software; you can redistribute it and/or
4422 modify it under the terms of the GNU Lesser General Public License
4423 as published by the Free Software Foundation; either version 2.1 of
4424 the License, or (at your option) any later version.
4426 The m17n library is distributed in the hope that it will be useful,
4427 but WITHOUT ANY WARRANTY; without even the implied warranty of
4428 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4429 Lesser General Public License for more details.
4431 You should have received a copy of the GNU Lesser General Public
4432 License along with the m17n library; if not, write to the Free
4433 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
4434 Boston, MA 02110-1301, USA.