aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2007-12-25 10:32:26 +0000
committerKenichi Handa2007-12-25 10:32:26 +0000
commit4cec60619a84d85499ea425390b0d79d341d7627 (patch)
tree883e92f34226914134a1db2eaa8ccd7bd430cfb9 /src
parent21138cff06bbcbfd80bdde681c871defa8877362 (diff)
downloademacs-4cec60619a84d85499ea425390b0d79d341d7627.tar.gz
emacs-4cec60619a84d85499ea425390b0d79d341d7627.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/ftfont.c7
1 files changed, 6 insertions, 1 deletions
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)
968 FT_ULong charcode = c; 968 FT_ULong charcode = c;
969 FT_UInt code = FT_Get_Char_Index (ft_face, charcode); 969 FT_UInt code = FT_Get_Char_Index (ft_face, charcode);
970 970
971 return (code > 0 ? code : 0xFFFFFFFF); 971 return (code > 0 ? code : FONT_INVALID_CODE);
972} 972}
973 973
974static int 974static int
@@ -1552,6 +1552,11 @@ ftfont_shape_by_flt (lgstring, font, ft_face, otf)
1552 Lisp_Object lglyph = LGSTRING_GLYPH (lgstring, i); 1552 Lisp_Object lglyph = LGSTRING_GLYPH (lgstring, i);
1553 MFLTGlyph *g = gstring.glyphs + i; 1553 MFLTGlyph *g = gstring.glyphs + i;
1554 1554
1555 if (NILP (lglyph))
1556 {
1557 lglyph = Fmake_vector (make_number (LGLYPH_SIZE), Qnil);
1558 LGSTRING_SET_GLYPH (lgstring, i, lglyph);
1559 }
1555 LGLYPH_SET_FROM (lglyph, g->from); 1560 LGLYPH_SET_FROM (lglyph, g->from);
1556 LGLYPH_SET_TO (lglyph, g->to); 1561 LGLYPH_SET_TO (lglyph, g->to);
1557 LGLYPH_SET_CHAR (lglyph, g->c); 1562 LGLYPH_SET_CHAR (lglyph, g->c);