diff options
author | Werner LEMBERG <wl@gnu.org> | 2017-04-11 13:06:30 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2017-04-11 13:06:30 +0300 |
commit | 0eef8e9af7707b7bd01243033b9a48cb74fb8672 (patch) | |
tree | d41702673b78a44770cd9d441c53de5b47fe5d48 | |
parent | 695eacc21ea08b7fa080a232eadae881b5295bef (diff) | |
download | emacs-0eef8e9af7707b7bd01243033b9a48cb74fb8672.tar.gz |
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)
-rw-r--r-- | src/ftfont.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ftfont.c b/src/ftfont.c index 6cabddda370..5600bde646d 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -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) |