shithub: freetype+ttf2subf

Download patch

ref: 785833d96eacab4af67dc6be53571441df6d8a5b
parent: e9e2e5d4601fe4474bd2cff70a2c8c6a7c7387c3
author: Werner Lemberg <[email protected]>
date: Sat Apr 29 02:47:14 EDT 2017

* src/truetype/ttdriver.c (tt_size_request): Properly check `error'.

Reported by Earnestly <[email protected]> in

  http://lists.nongnu.org/archive/html/freetype/2017-04/msg00031.html

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2017-04-29  Werner Lemberg  <[email protected]>
+
+	* src/truetype/ttdriver.c (tt_size_request): Properly check `error'.
+
+	Reported by Earnestly <[email protected]> in
+
+	  http://lists.nongnu.org/archive/html/freetype/2017-04/msg00031.html
+
 2017-04-27  Werner Lemberg  <[email protected]>
 
 	Introduce AF_CONFIG_OPTION_TT_SIZE_METRICS configuration option.
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -2549,6 +2549,10 @@
   /*    glyph relative to this size.  For more information refer to        */
   /*    `https://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html'.    */
   /*                                                                       */
+  /*    Contrary to @FT_Set_Char_Size, this function doesn't have special  */
+  /*    code to normalize zero-valued widths, heights, or resolutions      */
+  /*    (which lead to errors in most cases).                              */
+  /*                                                                       */
   /*    Don't use this function if you are using the FreeType cache API.   */
   /*                                                                       */
   FT_EXPORT( FT_Error )
--- a/src/truetype/ttdriver.c
+++ b/src/truetype/ttdriver.c
@@ -360,6 +360,7 @@
 
 #ifdef TT_USE_BYTECODE_INTERPRETER
       /* for the `MPS' bytecode instruction we need the point size */
+      if ( !error )
       {
         FT_UInt  resolution =
                    ttsize->metrics->x_ppem > ttsize->metrics->y_ppem