diff options
Diffstat (limited to 'tex/generic/context/luatex-fonts-merged.lua')
-rw-r--r-- | tex/generic/context/luatex-fonts-merged.lua | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index 840e64e4a..dbd25af37 100644 --- a/tex/generic/context/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 03/26/11 11:35:06 +-- merge date : 03/26/11 12:41:29 do -- begin closure to overcome local limits and interference @@ -3920,16 +3920,14 @@ a helper function.</p> function constructors.checkedfeatures(what,features) if features and next(features) then - local done = false for key, value in next, handlers[what].features.defaults do if features[key] == nil then features[key] = value - done = true end end - return features, done -- done signals a change + return features else - return fastcopy(defaults), true + return fastcopy(defaults) end end @@ -3942,9 +3940,11 @@ function constructors.initializefeatures(what,tfmdata,features,trace,report) local whatfeatures = whathandler.features local whatinitializers = whatfeatures.initializers local whatmodechecker = whatfeatures.modechecker - local mode = properties.mode or (whatmodechecker and whatmodechecker(tfmdata,features)) or features.mode or "base" - properties.mode = mode -- also status - local done = { } + -- properties.mode can be enforces (for instance in font-otd) + local mode = properties.mode or (whatmodechecker and whatmodechecker(tfmdata,features,features.mode)) or features.mode or "base" + properties.mode = mode -- also status + -- + local done = { } while true do local redo = false local initializers = whatfeatures.initializers[mode] @@ -3965,8 +3965,13 @@ function constructors.initializefeatures(what,tfmdata,features,trace,report) end action(tfmdata,value,features) -- can set mode (e.g. goodies) so it can trigger a restart if mode ~= properties.mode then - mode = properties.mode - redo = true + if whatmodechecker then + properties.mode = whatmodechecker(tfmdata,features,properties.mode) -- force checking + end + if mode ~= properties.mode then + mode = properties.mode + redo = true + end end done[feature] = true end |