Mercurial > emacs
diff src/ftfont.c @ 91271:fed5211f4809
(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.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Tue, 25 Dec 2007 10:32:26 +0000 |
parents | 4f21471103e6 |
children | 299c64a7a9fb |
line wrap: on
line diff
--- a/src/ftfont.c Tue Dec 25 10:31:10 2007 +0000 +++ b/src/ftfont.c Tue Dec 25 10:32:26 2007 +0000 @@ -968,7 +968,7 @@ 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 @@ 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);