summaryrefslogtreecommitdiff
path: root/tex/generic
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2011-03-26 12:41:00 +0100
committerHans Hagen <pragma@wxs.nl>2011-03-26 12:41:00 +0100
commite5cb80b1f67dd1acb700e996f24e93bc426e5ccb (patch)
tree5e0da6a8a941dc3e765dee07f4a2cefc86d24fcd /tex/generic
parentdec8cba9966ab3476fb323b3d6ad7d234f4cea5e (diff)
downloadcontext-e5cb80b1f67dd1acb700e996f24e93bc426e5ccb.tar.gz
beta 2011.03.26 12:41
Diffstat (limited to 'tex/generic')
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua25
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