From cba27c19b582f011c75b91f30b2293a38e6339c3 Mon Sep 17 00:00:00 2001 From: handa Date: Wed, 14 Jul 2004 05:10:59 +0000 Subject: [PATCH] (mfont__lookup_fontset): If glyph type is GLYPH_SPACE, get codes for SPACE. --- src/fontset.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/fontset.c b/src/fontset.c index a9d8a85..d0a630d 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -579,7 +579,9 @@ mfont__lookup_fontset (MRealizedFontset *realized, MGlyph *g, int *num, /* Check if this font can display all glyphs. */ for (j = 0; j < *num; j++) { - g[j].code = mfont__encode_char (rfont, g[j].c); + g[j].code = mfont__encode_char (rfont, + g[j].type = GLYPH_CHAR ? g[j].c + : ' '); if (g[j].code == MCHAR_INVALID_CODE) break; } @@ -607,7 +609,8 @@ mfont__lookup_fontset (MRealizedFontset *realized, MGlyph *g, int *num, rfont = (MRealizedFont *) MPLIST_VAL (plist); if (rfont->status < 0) continue; - g->code = mfont__encode_char (rfont, g->c); + g->code = mfont__encode_char (rfont, + g->type == GLYPH_CHAR ? g->c : ' '); if (g->code != MCHAR_INVALID_CODE) { if (rfont->status > 0 -- 1.7.10.4