summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/font-cff.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-01-07 17:18:53 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-01-07 17:18:53 +0100
commit91a47fa6fbfacd23d2802c41d3c908569070bdf2 (patch)
tree00a08c95ece3fceba0e24655f35934876e3f3c55 /tex/context/base/mkiv/font-cff.lua
parent6032373f72b7980d5b197eb371f1d56ecb800ee8 (diff)
downloadcontext-91a47fa6fbfacd23d2802c41d3c908569070bdf2.tar.gz
2021-01-07 16:59:00
Diffstat (limited to 'tex/context/base/mkiv/font-cff.lua')
-rw-r--r--tex/context/base/mkiv/font-cff.lua15
1 files changed, 12 insertions, 3 deletions
diff --git a/tex/context/base/mkiv/font-cff.lua b/tex/context/base/mkiv/font-cff.lua
index b7d45392d..4e2981011 100644
--- a/tex/context/base/mkiv/font-cff.lua
+++ b/tex/context/base/mkiv/font-cff.lua
@@ -1425,13 +1425,15 @@ do
-- to wrap my head around the rather complex variable font specification
-- with regions and axis, the following approach kind of works but is more
-- some trial and error trick. It's still not clear how much of the complex
- -- truetype description applies to cff.
+ -- truetype description applies to cff. Once there are fonts out there we'll
+ -- get there. (Marcel and friends did some tests with recent cff2 fonts so
+ -- the code has been adapted accordingly.)
local reginit = false
local function updateregions(n) -- n + 1
if regions then
- local current = regions[n] or regions[1]
+ local current = regions[n+1] or regions[1]
nofregions = #current
if axis and n ~= reginit then
factors = { }
@@ -2155,7 +2157,14 @@ do
popped = 3
seacs = { }
if regions then
- regions = { regions } -- needs checking
+ -- this was:
+ -- regions = { regions } -- needs checking
+ -- and is now (MFC):
+ regions = { }
+ local deltas = data.deltas
+ for i = 1, #deltas do
+ regions[i] = deltas[i].regions
+ end
axis = data.factors or false
end
end