emacs-diffs
[Top][All Lists]
Advanced

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

master 3a1e65bd8ea 1/2: Properly apply XY offsets to compound component


From: Po Lu
Subject: master 3a1e65bd8ea 1/2: Properly apply XY offsets to compound component glyphs
Date: Fri, 22 Sep 2023 22:08:44 -0400 (EDT)

branch: master
commit 3a1e65bd8ead5f8376e2794500e57315d294c5aa
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Properly apply XY offsets to compound component glyphs
    
    * src/sfnt.c (sfnt_decompose_compound_glyph): Avoid overwriting
    X and Y if defer_offsets is false.
---
 src/sfnt.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/src/sfnt.c b/src/sfnt.c
index c0ab1e6587d..9340d8abc66 100644
--- a/src/sfnt.c
+++ b/src/sfnt.c
@@ -2948,16 +2948,11 @@ sfnt_decompose_compound_glyph (struct sfnt_glyph *glyph,
          /* When an anchor point is being used to translate the
             glyph, and the subglyph in question is actually a
             compound glyph, it is impossible to know which offset to
-            use until the compound subglyph has actually been
-            loaded.
+            use until the compound subglyph has actually been loaded.
 
-            As a result, the offset is calculated here, using the
-            points in the loaded child compound glyph.  But first, X
-            and Y must be reset to 0, as otherwise the translation
-            might be applied twice if defer_offsets is not set.  */
-
-         x = 0;
-         y = 0;
+            defer_offsets is set to true if these conditions apply,
+            whereupon the offset is calculated here, using the points
+            in the loaded child compound glyph.  */
 
          if (defer_offsets)
            {



reply via email to

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