1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-08 15:35:02 +00:00

Avoid abort in ftfont.c due to faulty fonts

* src/ftfont.c (ftfont_get_metrics): Try loading the font without
hinting, before aborting.  (Bug#25945)
This commit is contained in:
Werner LEMBERG 2017-04-11 13:06:30 +03:00 committed by Eli Zaretskii
parent 695eacc21e
commit 0eef8e9af7

View File

@ -1546,7 +1546,8 @@ ftfont_get_metrics (MFLTFont *font, MFLTGlyphString *gstring,
{
FT_Glyph_Metrics *m;
if (FT_Load_Glyph (ft_face, g->g.code, FT_LOAD_DEFAULT) != 0)
if (FT_Load_Glyph (ft_face, g->g.code, FT_LOAD_DEFAULT) != 0
&& FT_Load_Glyph (ft_face, g->g.code, FT_LOAD_NO_HINTING) != 0)
emacs_abort ();
m = &ft_face->glyph->metrics;
if (flt_font_ft->matrix)