[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 <madigens@gmail.com>.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
diff --git a/ChangeLog b/ChangeLog
index e67ff28..ff94729 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2015-05-24 Werner Lemberg <wl@gnu.org>
+
+ [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 <madigens@gmail.com>.
+
2015-05-23 Werner Lemberg <wl@gnu.org>
[truetype] Fix return values of GETINFO bytecode instruction.
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 55d3c99..d1edd7e 100644
--- 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;
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 67f0cc8..0f9fb0c 100644
--- 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
}