summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/font-otc.lua
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-03-02 17:15:08 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-03-02 17:15:08 +0100
commit62676780b4363d25d7a247f39484b1e4a34ef7b7 (patch)
tree8678e13eee0b805e7c972b9885f21b9747493ee4 /tex/context/base/mkiv/font-otc.lua
parent2a958dcf22dd71ba1e4408648676d44c16d7e3bf (diff)
downloadcontext-62676780b4363d25d7a247f39484b1e4a34ef7b7.tar.gz
2016-03-02 16:58:00
Diffstat (limited to 'tex/context/base/mkiv/font-otc.lua')
-rw-r--r--tex/context/base/mkiv/font-otc.lua42
1 files changed, 13 insertions, 29 deletions
diff --git a/tex/context/base/mkiv/font-otc.lua b/tex/context/base/mkiv/font-otc.lua
index 0cc7b58b0..d4c98d6fc 100644
--- a/tex/context/base/mkiv/font-otc.lua
+++ b/tex/context/base/mkiv/font-otc.lua
@@ -60,14 +60,6 @@ local function addfeature(data,feature,specifications)
return
end
-- feature has to be unique but the name entry wins eventually
- -- local gsubfeatures = features.gsub
- -- if gsubfeatures and gsubfeatures[feature] then
- -- return -- already present
- -- end
- -- local gposfeatures = features.gpos
- -- if gposfeatures and gposfeatures[feature] then
- -- return -- already present
- -- end
-- todo alse gpos
@@ -454,6 +446,9 @@ local function addfeature(data,feature,specifications)
elseif featuretype == "chainposition" then
category = "gpos"
coverage = prepare_chain(list,featuretype,sublookups)
+ else
+ report_otf("not registering feature %a, unknown category",feature)
+ return
end
if coverage and next(coverage) then
nofsteps = nofsteps + 1
@@ -487,28 +482,17 @@ local function addfeature(data,feature,specifications)
insert(sequences,sequence)
end
-- register in metadata (merge as there can be a few)
- local k = nil
- if category == "gpos" then
- if not gposfeatures then
- gposfeatures = { }
- fontfeatures.gpos = gposfeatures
- end
- k = gposfeatures[feature]
- if not k then
- k = { }
- gposfeatures[feature] = k
- end
- else
- if not gsubfeatures then
- gsubfeatures = { }
- fontfeatures.gsub = gsubfeatures
- end
- k = gsubfeatures[feature]
- if not k then
- k = { }
- gsubfeatures[feature] = k
- end
+ local features = fontfeatures[category]
+ if not features then
+ features = { }
+ fontfeatures[category] = features
+ end
+ local k = features[feature]
+ if not k then
+ k = { }
+ features[feature] = k
end
+ --
for script, languages in next, askedfeatures do
local kk = k[script]
if not kk then