From: handa Date: Wed, 14 Jul 2004 05:10:59 +0000 (+0000) Subject: (mfont__lookup_fontset): If glyph type is X-Git-Tag: REL-1-1-0~110 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=cba27c19b582f011c75b91f30b2293a38e6339c3;p=m17n%2Fm17n-lib.git (mfont__lookup_fontset): If glyph type is GLYPH_SPACE, get codes for SPACE. --- 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