From: Kenichi Handa Date: Tue, 25 Dec 2007 10:32:26 +0000 (+0000) Subject: (ftfont_encode_char): Use the macro FONT_INVALID_CODE. X-Git-Tag: emacs-pretest-23.0.90~8295^2~98 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4cec60619a84d85499ea425390b0d79d341d7627;p=emacs.git (ftfont_encode_char): Use the macro FONT_INVALID_CODE. (ftfont_shape_by_flt): If an element of lgstring is nil, make a Lispy glyph and store it in the lgstring. --- diff --git a/src/ftfont.c b/src/ftfont.c index 2c8d899a620..d420b9af7ad 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -968,7 +968,7 @@ ftfont_encode_char (font, c) FT_ULong charcode = c; FT_UInt code = FT_Get_Char_Index (ft_face, charcode); - return (code > 0 ? code : 0xFFFFFFFF); + return (code > 0 ? code : FONT_INVALID_CODE); } static int @@ -1552,6 +1552,11 @@ ftfont_shape_by_flt (lgstring, font, ft_face, otf) Lisp_Object lglyph = LGSTRING_GLYPH (lgstring, i); MFLTGlyph *g = gstring.glyphs + i; + if (NILP (lglyph)) + { + lglyph = Fmake_vector (make_number (LGLYPH_SIZE), Qnil); + LGSTRING_SET_GLYPH (lgstring, i, lglyph); + } LGLYPH_SET_FROM (lglyph, g->from); LGLYPH_SET_TO (lglyph, g->to); LGLYPH_SET_CHAR (lglyph, g->c);