[latex3-commits] [git/LaTeX3-latex3-luaotfload] variable-cff2: Fix parsing of short loca format (f73ff91)
Marcel Fabian Krüger
tex at 2krueger.de
Fri Aug 13 15:53:17 CEST 2021
Repository : https://github.com/latex3/luaotfload
On branch : variable-cff2
Link : https://github.com/latex3/luaotfload/commit/f73ff91dac52268decebb9baecd698f2eadc1a95
>---------------------------------------------------------------
commit f73ff91dac52268decebb9baecd698f2eadc1a95
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date: Fri Aug 13 15:52:12 2021 +0200
Fix parsing of short loca format
>---------------------------------------------------------------
f73ff91dac52268decebb9baecd698f2eadc1a95
src/luaotfload-harf-var-ttf.lua | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/luaotfload-harf-var-ttf.lua b/src/luaotfload-harf-var-ttf.lua
index 6ef314c..be27cd2 100644
--- a/src/luaotfload-harf-var-ttf.lua
+++ b/src/luaotfload-harf-var-ttf.lua
@@ -100,7 +100,11 @@ local function read_loca(face)
local data = face:get_table(loca_tag):get_data()
local count = face:get_glyph_count() + 1
if #data == count * 2 then
- return sio.readcardinaltable(data, 1, count, 2)
+ local result = sio.readcardinaltable(data, 1, count, 2)
+ for i=1, count do
+ result[i] = 2 * result[i]
+ end
+ return result
elseif #data == count * 4 then
return sio.readcardinaltable(data, 1, count, 4)
else
More information about the latex3-commits
mailing list.