shithub: freetype+ttf2subf

Download patch

ref: a374c9cfe7bb26045a82a8229bf419565fb004f9
parent: 43d4901f32636abef28cd8a92d8e3e7bab904cce
author: Werner Lemberg <[email protected]>
date: Tue Mar 3 06:23:45 EST 2015

[autofit] Fix Savannah bug #44241.

* src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs
with less than 3 points.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-03-03  Werner Lemberg  <[email protected]>
+
+	[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  <[email protected]>
 
 	Simplify `TYPEOF' macro.
--- 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;
         }