summaryrefslogtreecommitdiff
path: root/tex/context/base/font-otb.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/font-otb.lua')
-rw-r--r--tex/context/base/font-otb.lua17
1 files changed, 9 insertions, 8 deletions
diff --git a/tex/context/base/font-otb.lua b/tex/context/base/font-otb.lua
index 2e98d3ecb..a68b57c8a 100644
--- a/tex/context/base/font-otb.lua
+++ b/tex/context/base/font-otb.lua
@@ -271,7 +271,7 @@ local function preparesubstitutions(tfmdata,feature,value,validlookups,lookuplis
local lookuptypes = resources.lookuptypes
local ligatures = { }
- local alternate = tonumber(value)
+ local alternate = tonumber(value) or true and 1
local defaultalt = otf.defaultbasealternate
local trace_singles = trace_baseinit and trace_singles
@@ -475,7 +475,7 @@ local function preparesubstitutions(tfmdata,feature,value,validlookups,lookuplis
local lookuptypes = resources.lookuptypes
local ligatures = { }
- local alternate = tonumber(value)
+ local alternate = tonumber(value) or true and 1
local defaultalt = otf.defaultbasealternate
local trace_singles = trace_baseinit and trace_singles
@@ -493,7 +493,7 @@ local function preparesubstitutions(tfmdata,feature,value,validlookups,lookuplis
end
changed[unicode] = data
elseif lookuptype == "alternate" then
- local replacement = data[alternate]
+ local replacement = data[alternate]
if replacement then
changed[unicode] = replacement
if trace_alternatives then
@@ -602,7 +602,7 @@ local function featuresinitializer(tfmdata,value)
if true then -- value then
local starttime = trace_preparing and os.clock()
local features = tfmdata.shared.features
- local fullname = trace_preparing and tfmdata.properties.fullname
+ local fullname = tfmdata.properties.fullname or "?"
if features then
applybasemethod("initializehashes",tfmdata)
local collectlookups = otf.collectlookups
@@ -648,21 +648,22 @@ local function featuresinitializer(tfmdata,value)
if order then
for i=1,#order do --
local feature = order[i]
- if features[feature] then
+ local value = features[feature]
+ if value then
local validlookups, lookuplist = collectlookups(rawdata,feature,script,language)
if not validlookups then
-- skip
elseif basesubstitutions and basesubstitutions[feature] then
if trace_preparing then
- report_prepare("filtering base feature %a for %a",feature,fullname)
+ report_prepare("filtering base %s feature %a for %a with value %a","sub",feature,fullname,value)
end
applybasemethod("preparesubstitutions",tfmdata,feature,value,validlookups,lookuplist)
registerbasefeature(feature,value)
elseif basepositionings and basepositionings[feature] then
if trace_preparing then
- report_prepare("filtering base feature %a for %a",feature,fullname)
+ report_prepare("filtering base %a feature %a for %a with value %a","pos",feature,fullname,value)
end
- applybasemethod("preparepositionings",tfmdata,feature,features[feature],validlookups,lookuplist)
+ applybasemethod("preparepositionings",tfmdata,feature,value,validlookups,lookuplist)
registerbasefeature(feature,value)
end
end