+2005-12-07 Kenichi Handa <handa@m17n.org>
+
+ * face.c (mface__for_chars): When font is specified and layouter
+ is found for it, if the layouter doesn't support one of a
+ character, use a face sans layouter for it.
+
2005-12-06 Kenichi Handa <handa@m17n.org>
* fontset.c (mfont__lookup_fontset): If only a fallback font is
for (; from_g < to_g && from_g->rface->font; from_g++)
{
from_g->rface = new;
- from_g->code
- = (new->layouter
- ? mfont__flt_encode_char (new->layouter, from_g->c)
- : mfont__encode_char (rfont->frame, (MFont *) rfont, NULL,
- from_g->c));
+ if (new->layouter)
+ {
+ from_g->code = mfont__flt_encode_char (new->layouter,
+ from_g->c);
+ if (from_g->code == MCHAR_INVALID_CODE)
+ {
+ from_g->rface = rface;
+ from_g->code = mfont__encode_char (rfont->frame,
+ (MFont *) rfont,
+ NULL, from_g->c);
+ }
+ }
+ else
+ from_g->code = mfont__encode_char (rfont->frame,
+ (MFont *) rfont,
+ NULL, from_g->c);
}
}
return from_g;
MPLIST_DO (plist, rface->non_ascii_list)
free (MPLIST_VAL (plist));
M17N_OBJECT_UNREF (rface->non_ascii_list);
- if (rface->font)
+ if (rface->font && rface->font->type != MFONT_TYPE_REALIZED)
free (rface->font);
free (rface);
}