shithub: freetype+ttf2subf

Download patch

ref: a5e1f6f39bdd75c00e0c210a476f042cf32a4a30
parent: 7f0994820bfbf9e790a10ddaf33fde7c06212adc
author: Werner Lemberg <[email protected]>
date: Sun May 24 19:29:23 EDT 2015

[truetype] Fix commit from 2015-05-22.

* src/truetype/ttgload.c, src/truetype/ttinterp.c: Guard new code
with `TT_CONFIG_OPTION_SUBPIXEL_HINTING'.

Problem reported by Nikolaus Waxweiler <[email protected]>.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2015-05-24  Werner Lemberg  <[email protected]>
+
+	[truetype] Fix commit from 2015-05-22.
+
+	* src/truetype/ttgload.c, src/truetype/ttinterp.c: Guard new code
+	with `TT_CONFIG_OPTION_SUBPIXEL_HINTING'.
+
+	Problem reported by Nikolaus Waxweiler <[email protected]>.
+
 2015-05-23  Werner Lemberg  <[email protected]>
 
 	[truetype] Fix return values of GETINFO bytecode instruction.
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -2299,10 +2299,12 @@
       if ( exec->GS.instruct_control & 2 )
         exec->GS = tt_default_graphics_state;
 
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
       /* check whether we have a font hinted for ClearType --           */
       /* note that this flag can also be modified in a glyph's bytecode */
       if ( exec->GS.instruct_control & 4 )
         exec->ignore_x_mode = 0;
+#endif
 
       exec->pedantic_hinting = FT_BOOL( load_flags & FT_LOAD_PEDANTIC );
       loader->exec = exec;
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -5185,10 +5185,12 @@
     exc->GS.instruct_control &= ~(FT_Byte)Kf;
     exc->GS.instruct_control |= (FT_Byte)L;
 
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
     /* INSTCTRL modifying flag 3 also has an effect */
     /* outside of the CVT program                   */
     if ( K == 3 )
       exc->ignore_x_mode = FT_BOOL( L == 4 );
+#endif
   }