From: handa Date: Thu, 13 Dec 2007 11:43:27 +0000 (+0000) Subject: (mfont__get_glyph_id): Encode g->g.code (not g->g.c). X-Git-Tag: REL-1-5-0~7 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=44d13d407cda164451d3572ca29b57a9be7ca80e;p=m17n%2Fm17n-lib.git (mfont__get_glyph_id): Encode g->g.code (not g->g.c). --- diff --git a/src/font.c b/src/font.c index b01dcc0..1bcae33 100644 --- a/src/font.c +++ b/src/font.c @@ -1687,11 +1687,12 @@ mfont__get_glyph_id (MFLTFont *font, MFLTGlyphString *gstring, if (! encoding->encoding_charset) g->g.code = MCHAR_INVALID_CODE; else if (mfont->source == MFONT_SOURCE_X && encoding->repertory_charset) - g->g.code = ENCODE_CHAR (encoding->repertory_charset, g->g.c); + g->g.code = ENCODE_CHAR (encoding->repertory_charset, g->g.code); else { - g->g.code = ENCODE_CHAR (encoding->encoding_charset, g->g.c); - if (g->g.code != MCHAR_INVALID_CODE) + unsigned code = ENCODE_CHAR (encoding->encoding_charset, g->g.code); + + if (code != MCHAR_INVALID_CODE) { if (! driver) {