X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Ffontset.c;h=d3f3c7c86c1e7d66d9bb9516056a6be47a382491;hb=0cbbd40d3c60a3e52e7783957b6e02ac5f2ca95e;hp=8e72f9f5a47be4dadd50d8c052fc7ec462f52d66;hpb=dd4b7c605fb0d7b3634e132b978e9abd275d82aa;p=m17n%2Fm17n-lib.git diff --git a/src/fontset.c b/src/fontset.c index 8e72f9f..d3f3c7c 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -63,6 +63,7 @@ #include #include +#include "config.h" #include "m17n-gui.h" #include "m17n-misc.h" #include "internal.h" @@ -578,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; } @@ -606,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