summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/font-otc.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2019-10-11 16:46:49 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2019-10-11 16:46:49 +0200
commit24f6f7de245bdff10f21984a9a3c6af3d31fa1f1 (patch)
treeaf5b01583380cbe1e7890c29b42386ff58f25aa1 /tex/context/base/mkiv/font-otc.lua
parent64f50a1d7fe79d365b350c1bae688b9bf1b44d34 (diff)
downloadcontext-24f6f7de245bdff10f21984a9a3c6af3d31fa1f1.tar.gz
2019-10-11 15:56:00
Diffstat (limited to 'tex/context/base/mkiv/font-otc.lua')
-rw-r--r--tex/context/base/mkiv/font-otc.lua18
1 files changed, 13 insertions, 5 deletions
diff --git a/tex/context/base/mkiv/font-otc.lua b/tex/context/base/mkiv/font-otc.lua
index a774a81c2..2643d022a 100644
--- a/tex/context/base/mkiv/font-otc.lua
+++ b/tex/context/base/mkiv/font-otc.lua
@@ -22,9 +22,10 @@ local otf = fonts.handlers.otf
local registerotffeature = otf.features.register
local setmetatableindex = table.setmetatableindex
-local checkmerge = fonts.helpers.checkmerge
-local checkflags = fonts.helpers.checkflags
-local checksteps = fonts.helpers.checksteps
+local fonthelpers = fonts.helpers
+local checkmerge = fonthelpers.checkmerge
+local checkflags = fonthelpers.checkflags
+local checksteps = fonthelpers.checksteps
local normalized = {
substitution = "substitution",
@@ -167,6 +168,7 @@ local function addfeature(data,feature,specifications)
local done = 0
local skip = 0
local aglunicodes = false
+ local privateslot = fonthelpers.privateslot
local specifications = validspecification(specifications,feature)
if not specifications then
@@ -196,6 +198,13 @@ local function addfeature(data,feature,specifications)
return u
end
end
+ if privateslot then
+ u = privateslot(code) -- no creation !
+ if u then
+ -- unicodes[code] = u
+ return u
+ end
+ end
local u = lpegmatch(p,code)
if u then
-- unicodes[code] = u
@@ -229,7 +238,7 @@ local function addfeature(data,feature,specifications)
replacement = replacement[1]
end
replacement = tounicode(replacement)
- if replacement and descriptions[replacement] then
+ if replacement and (nocheck or descriptions[replacement]) then
cover(coverage,unicode,replacement)
done = done + 1
else
@@ -620,7 +629,6 @@ local function addfeature(data,feature,specifications)
local featuretype = normalized[specification.type or "substitution"] or "substitution"
local featureflags = specification.flags or noflags
local nocheck = specification.nocheck
- local futuresteps = specification.futuresteps
local featureorder = specification.order or { feature }
local featurechain = (featuretype == "chainsubstitution" or featuretype == "chainposition") and 1 or 0
local nofsteps = 0