freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master b459882: [truetype] Let SHPIX move points in the twil


From: Werner LEMBERG
Subject: [freetype2] master b459882: [truetype] Let SHPIX move points in the twilight zone in v40.
Date: Tue, 31 May 2016 06:41:28 +0000 (UTC)

branch: master
commit b459882804836557bf6a8ccea45421fd87f36097
Author: Nikolaus Waxweiler <address@hidden>
Commit: Werner Lemberg <address@hidden>

    [truetype] Let SHPIX move points in the twilight zone in v40.
    
    * src/truetype/ttinterp.c (Ins_SHPIX): Allow SHPIX to move points in
    the twilight zone.  Otherwise, treat SHPIX the same as DELTAP.
    Unbreaks various fonts such as older versions of Rokkitt and DTL
    Argo T Light that would glitch severly after calling ALIGNRP after a
    blocked SHPIX.
---
 ChangeLog               |   10 ++++++++++
 src/truetype/ttinterp.c |   20 +++++++++++++++-----
 2 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b3592bb..332f42e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2016-05-17  Nikolaus Waxweiler  <address@hidden>
+
+       [truetype] Let SHPIX move points in the twilight zone in v40.
+
+       * src/truetype/ttinterp.c (Ins_SHPIX): Allow SHPIX to move points in
+       the twilight zone.  Otherwise, treat SHPIX the same as DELTAP.
+       Unbreaks various fonts such as older versions of Rokkitt and DTL
+       Argo T Light that would glitch severly after calling ALIGNRP after a
+       blocked SHPIX.
+
 2016-05-30  Werner Lemberg  <address@hidden>
 
        [type42] Support `CharStrings' entry format as created by LilyPond.
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index c6df129..2e3f9ef 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -5548,6 +5548,12 @@
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
     FT_Int      B1, B2;
 #endif
+#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
+    FT_Bool     in_twilight = exc->GS.gep0 == 0 || \
+                              exc->GS.gep1 == 0 || \
+                              exc->GS.gep2 == 0;
+#endif
+
 
 
     if ( exc->top < exc->GS.loop + 1 )
@@ -5656,11 +5662,15 @@
       if ( SUBPIXEL_HINTING_MINIMAL     &&
            exc->backwards_compatibility )
       {
-        /* XXX: breaks Rokkitt < v1.2                   */
-        /*      (glyphs explode vertically on ALIGNRP). */
-        if ( !( exc->iupx_called && exc->iupy_called )              &&
-             ( ( exc->is_composite && exc->GS.freeVector.y != 0 ) ||
-               ( exc->zp2.tags[point] & FT_CURVE_TAG_TOUCH_Y )    ) )
+        /* Special case: allow SHPIX to move points in the twilight zone.  */
+        /* Otherwise, treat SHPIX the same as DELTAP.  Unbreaks various    */
+        /* fonts such as older versions of Rokkitt and DTL Argo T Light    */
+        /* that would glitch severly after calling ALIGNRP after a blocked */
+        /* SHPIX.                                                          */
+        if ( in_twilight                                                ||
+             ( !( exc->iupx_called && exc->iupy_called )              &&
+               ( ( exc->is_composite && exc->GS.freeVector.y != 0 ) ||
+                 ( exc->zp2.tags[point] & FT_CURVE_TAG_TOUCH_Y )    ) ) )
           Move_Zp2_Point( exc, point, 0, dy, TRUE );
       }
       else



reply via email to

[Prev in Thread] Current Thread [Next in Thread]