summaryrefslogtreecommitdiff
path: root/macros/luatex/generic/luaotfload/fontloader-font-oup.lua
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-08-21 03:03:40 +0000
committerNorbert Preining <norbert@preining.info>2023-08-21 03:03:40 +0000
commitf4e4c48e897bec27fd8d07ba278c03c6f0c64336 (patch)
treeb8c47431b940055b5095271c39a9db123375efd6 /macros/luatex/generic/luaotfload/fontloader-font-oup.lua
parent53b22757814343c6071be2e64dc0639f7afc5468 (diff)
CTAN sync 202308210303
Diffstat (limited to 'macros/luatex/generic/luaotfload/fontloader-font-oup.lua')
-rw-r--r--macros/luatex/generic/luaotfload/fontloader-font-oup.lua59
1 files changed, 38 insertions, 21 deletions
diff --git a/macros/luatex/generic/luaotfload/fontloader-font-oup.lua b/macros/luatex/generic/luaotfload/fontloader-font-oup.lua
index 248aad04d2..0d1f9d6a61 100644
--- a/macros/luatex/generic/luaotfload/fontloader-font-oup.lua
+++ b/macros/luatex/generic/luaotfload/fontloader-font-oup.lua
@@ -898,26 +898,42 @@ local function unifyglyphs(fontdata,usenames)
end
end
--
- for index=1,nofglyphs do
- local math = glyphs[index].math
- if math then
- local list = math.vparts
- if list then
- for i=1,#list do local l = list[i] l.glyph = indices[l.glyph] end
- end
- local list = math.hparts
- if list then
- for i=1,#list do local l = list[i] l.glyph = indices[l.glyph] end
- end
- local list = math.vvariants
- if list then
- -- for i=1,#list do local l = list[i] l.glyph = indices[l.glyph] end
- for i=1,#list do list[i] = indices[list[i]] end
+ if LUATEXENGINE == "luametatex" then
+ for index=1,nofglyphs do
+ local math = glyphs[index].math
+ if math then
+ local list = math.parts
+ if list then
+ for i=1,#list do local l = list[i] l.glyph = indices[l.glyph] end
+ end
+ local list = math.variants
+ if list then
+ for i=1,#list do list[i] = indices[list[i]] end
+ end
end
- local list = math.hvariants
- if list then
- -- for i=1,#list do local l = list[i] l.glyph = indices[l.glyph] end
- for i=1,#list do list[i] = indices[list[i]] end
+ end
+ else
+ for index=1,nofglyphs do
+ local math = glyphs[index].math
+ if math then
+ local list = math.vparts
+ if list then
+ for i=1,#list do local l = list[i] l.glyph = indices[l.glyph] end
+ end
+ local list = math.hparts
+ if list then
+ for i=1,#list do local l = list[i] l.glyph = indices[l.glyph] end
+ end
+ local list = math.vvariants
+ if list then
+ -- for i=1,#list do local l = list[i] l.glyph = indices[l.glyph] end
+ for i=1,#list do list[i] = indices[list[i]] end
+ end
+ local list = math.hvariants
+ if list then
+ -- for i=1,#list do local l = list[i] l.glyph = indices[l.glyph] end
+ for i=1,#list do list[i] = indices[list[i]] end
+ end
end
end
end
@@ -929,7 +945,9 @@ local function unifyglyphs(fontdata,usenames)
if colors then
for i=1,#colors do
local c = colors[i]
- c.slot = indices[c.slot]
+ if c then -- safeguard
+ c.slot = indices[c.slot]
+ end
end
end
end
@@ -947,7 +965,6 @@ end
local stripredundant do
-
local p_hex = R("af","AF","09")
local p_digit = R("09")
local p_done = S("._-")^0 + P(-1)