Commit 4cec6061 authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(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.
parent 21138cff
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment