shithub: freetype+ttf2subf

Download patch

ref: 7f44c2db247bdbaea4b369f214fde9614737196e
parent: 7e50824288fac5a36c2938fdb3e1c949ea53f982
author: Nikolaus Waxweiler <[email protected]>
date: Thu Aug 3 02:15:30 EDT 2017

[truetype] Do not set any ClearType flags in v40 monochrome mode.

This fixes weird behavior of instructions that resulted in rendering
differences between v35 and v40 in monochrome mode, e.g., in
`timesbi.ttf'.

* src/truetype/ttinterp.c (Ins_GETINFO)
[TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL]: Check
`subpixel_hinting_lean'.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2017-08-03  Nikolaus Waxweiler  <[email protected]>
+
+	[truetype] Do not set any ClearType flags in v40 monochrome mode.
+
+	This fixes weird behavior of instructions that resulted in rendering
+	differences between v35 and v40 in monochrome mode, e.g., in
+	`timesbi.ttf'.
+
+	* src/truetype/ttinterp.c (Ins_GETINFO)
+	[TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL]: Check
+	`subpixel_hinting_lean'.
+
 2017-08-01  Werner Lemberg  <[email protected]>
 
 	* src/truetype/ttgxvar.c (TT_Get_MM_Var): Fix thinko.
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -7357,7 +7357,11 @@
       K |= 1 << 12;
 
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
-    if ( SUBPIXEL_HINTING_MINIMAL )
+    /* Toggle the following flags only outside of monochrome mode.      */
+    /* Otherwise, instructions may behave weirdly and rendering results */
+    /* may differ between v35 and v40 mode, e.g., in `Times New Roman   */
+    /* Bold Italic'. */
+    if ( SUBPIXEL_HINTING_MINIMAL && exc->subpixel_hinting_lean )
     {
       /********************************/
       /* HINTING FOR SUBPIXEL         */