summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/font-dsp.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/font-dsp.lua')
-rw-r--r--tex/context/base/mkiv/font-dsp.lua33
1 files changed, 16 insertions, 17 deletions
diff --git a/tex/context/base/mkiv/font-dsp.lua b/tex/context/base/mkiv/font-dsp.lua
index 0645e7c8a..e6679fda2 100644
--- a/tex/context/base/mkiv/font-dsp.lua
+++ b/tex/context/base/mkiv/font-dsp.lua
@@ -1525,9 +1525,7 @@ function gposhandlers.pair(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofgly
classdef1 = readclassdef(f,tableoffset+classdef1,coverage)
classdef2 = readclassdef(f,tableoffset+classdef2,nofglyphs)
local usedcoverage = { }
- --
- local shared = { } -- partial sparse
- --
+ local shared = { } -- partial sparse, when set also needs to be handled in the packer
for g1, c1 in next, classdef1 do
if coverage[g1] then
local l1 = classlist[c1]
@@ -1539,21 +1537,21 @@ function gposhandlers.pair(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofgly
local first = offsets[1]
local second = offsets[2]
if first or second then
- --
- local s1 = shared[first]
- if not s1 then
- s1 = { }
- shared[first] = s1
- end
- local s2 = s1[second]
- if not s2 then
- s2 = { first, second or nil }
- s1[second] = s2
+ if shared then
+ local s1 = shared[first]
+ if s1 == nil then
+ s1 = { }
+ shared[first] = s1
+ end
+ local s2 = s1[second]
+ if s2 == nil then
+ s2 = { first, second or nil }
+ s1[second] = s2
+ end
+ hash[paired] = s2
+ else
+ hash[paired] = { first, second or nil }
end
- hash[paired] = s2
- --
- -- hash[paired] = { first, second or nil }
- --
else
-- upto the next lookup for this combination
end
@@ -1564,6 +1562,7 @@ function gposhandlers.pair(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofgly
end
end
return {
+ shared = shared and true or nil,
format = "pair",
coverage = usedcoverage,
}