diff options
author | Hans Hagen <pragma@wxs.nl> | 2014-07-29 00:30:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2014-07-29 00:30:00 +0200 |
commit | b5e7eb047db872bbaf068384c4e3cd866ad84077 (patch) | |
tree | 4f8e1c0a513abb0bcec51e35299c3da23784ced5 /tex/context/base/font-otb.lua | |
parent | e63baf9e8915e379e3883d5885e11b923d038318 (diff) | |
download | context-b5e7eb047db872bbaf068384c4e3cd866ad84077.tar.gz |
beta 2014.07.29 00:30
Diffstat (limited to 'tex/context/base/font-otb.lua')
-rw-r--r-- | tex/context/base/font-otb.lua | 17 |
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 |