1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-30 08:09:04 +00:00

fix previous change of src/ftfont.c (ftfont_shape_by_flt)

* src/ftfont.c (ftfont_shape_by_flt): Fix previous change.  Access the
second glyph only when there are enough glyphs.
This commit is contained in:
K. Handa 2016-01-14 21:48:44 +09:00
parent f368054246
commit 9835757013

View File

@ -2590,7 +2590,7 @@ ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font,
flt_font_ft.otf = otf;
flt_font_ft.matrix = matrix->xx != 0 ? matrix : 0;
if (1 < len || ! otf)
if (1 < len)
{
/* A little bit ad hoc. Perhaps, shaper must get script and
language information, and select a proper flt for them
@ -2598,9 +2598,11 @@ ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font,
int c1 = LGLYPH_CHAR (LGSTRING_GLYPH (lgstring, 1));
if (CHAR_HAS_CATEGORY (c1, '^'))
flt = mflt_get (msymbol ("combining"));
else if (! otf)
flt = mflt_find (LGLYPH_CHAR (LGSTRING_GLYPH (lgstring, 0)),
&flt_font_ft.flt_font);
}
if (! flt && ! otf)
{
flt = mflt_find (LGLYPH_CHAR (LGSTRING_GLYPH (lgstring, 0)),
&flt_font_ft.flt_font);
if (! flt)
return make_number (0);
}