mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-29 16:41:45 -08:00
Backport: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.
(cherry picked from commit 9835757013)
This commit is contained in:
parent
4a3db0f729
commit
ad879b7f7e
1 changed files with 6 additions and 4 deletions
10
src/ftfont.c
10
src/ftfont.c
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue