From 41163570c82fe4f3fcf377ad493d5a2c07473214 Mon Sep 17 00:00:00 2001 From: handa Date: Wed, 7 Dec 2005 00:38:10 +0000 Subject: [PATCH] *** empty log message *** --- src/ChangeLog | 6 ++++++ src/face.c | 23 +++++++++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 312be6f..1fd3827 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2005-12-07 Kenichi Handa + + * 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 * fontset.c (mfont__lookup_fontset): If only a fallback font is diff --git a/src/face.c b/src/face.c index 618b09b..d3e7937 100644 --- a/src/face.c +++ b/src/face.c @@ -838,11 +838,22 @@ mface__for_chars (MSymbol script, MSymbol language, MSymbol charset, 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; @@ -927,7 +938,7 @@ mface__free_realized (MRealizedFace *rface) 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); } -- 1.7.10.4