[latex3-commits] [git/LaTeX3-latex3-luaotfload] dev: Fix variable TTF fonts which need words for former byte fields (4d0765d)

Marcel Fabian Krüger tex at 2krueger.de
Fri Apr 1 14:26:51 CEST 2022


Repository : https://github.com/latex3/luaotfload
On branch  : dev
Link       : https://github.com/latex3/luaotfload/commit/4d0765db381333d263bab2fdeb233b7c826e8a78

>---------------------------------------------------------------

commit 4d0765db381333d263bab2fdeb233b7c826e8a78
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Fri Apr 1 14:26:51 2022 +0200

    Fix variable TTF fonts which need words for former byte fields


>---------------------------------------------------------------

4d0765db381333d263bab2fdeb233b7c826e8a78
 src/luaotfload-harf-var-ttf.lua | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/luaotfload-harf-var-ttf.lua b/src/luaotfload-harf-var-ttf.lua
index 5ceb166..d962883 100644
--- a/src/luaotfload-harf-var-ttf.lua
+++ b/src/luaotfload-harf-var-ttf.lua
@@ -328,6 +328,9 @@ local function serialize_glyf(points, map)
       local x, y = component.x, component.y
       x = x and math.floor(x + .5)
       y = y and math.floor(y + .5)
+      if component.flags & 0x3 == 0x2 and (x >= 0x100 or x < -0x100 or y >= 0x100 or y < 0x100) then
+        component.flags = component.flags | 0x1
+      end
       result = result
           .. string.pack(component.flags & 0x2 == 0 and '>I2I2'
                       or component.flags & 0x1 == 0x1 and '>I2I2i2i2'





More information about the latex3-commits mailing list.