# HG changeset patch # User Kenichi Handa # Date 1198578746 0 # Node ID fed5211f48097e7b25d1e0ad585e3397afc64da1 # Parent 0dab56b22dca45c7ce0400b19be996de0c1c26bf (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 -r 0dab56b22dca -r fed5211f4809 src/ftfont.c --- 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);