From a374c9cfe7bb26045a82a8229bf419565fb004f9 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Tue, 3 Mar 2015 11:23:45 +0100 Subject: [PATCH] [autofit] Fix Savannah bug #44241. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs with less than 3 points. --- ChangeLog | 7 +++++++ src/autofit/aflatin.c | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e84215ef3..dc432ec89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-03-03 Werner Lemberg + + [autofit] Fix Savannah bug #44241. + + * src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs + with less than 3 points. + 2015-03-02 Werner Lemberg Simplify `TYPEOF' macro. diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c index a46321ffc..e228548f9 100644 --- a/src/autofit/aflatin.c +++ b/src/autofit/aflatin.c @@ -362,9 +362,10 @@ error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE ); outline = face->glyph->outline; - if ( error || outline.n_points <= 0 ) + /* reject glyphs that don't produce any rendering */ + if ( error || outline.n_points <= 2 ) { - FT_TRACE5(( " U+%04lX contains no outlines\n", ch )); + FT_TRACE5(( " U+%04lX contains no (usable) outlines\n", ch )); continue; }