diff options
Diffstat (limited to 'tex/context/base/font-otd.lua')
-rw-r--r-- | tex/context/base/font-otd.lua | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tex/context/base/font-otd.lua b/tex/context/base/font-otd.lua index 501eff41b..ebd487959 100644 --- a/tex/context/base/font-otd.lua +++ b/tex/context/base/font-otd.lua @@ -17,11 +17,14 @@ local report_process = logs.reporter("fonts","otf process") local fonts = fonts local otf = fonts.handlers.otf -local fontdata = fonts.hashes.identifiers +local hashes = fonts.hashes local definers = fonts.definers local constructors = fonts.constructors local specifiers = fonts.specifiers +local fontdata = hashes.identifiers +----- fontresources = hashes.resources -- not yet defined + local contextsetups = specifiers.contextsetups local contextnumbers = specifiers.contextnumbers local contextmerged = specifiers.contextmerged @@ -32,7 +35,7 @@ local otffeatures = fonts.constructors.newfeatures("otf") local registerotffeature = otffeatures.register local fontdynamics = { } -fonts.hashes.dynamics = fontdynamics +hashes.dynamics = fontdynamics local a_to_script = { } local a_to_language = { } @@ -49,6 +52,10 @@ function otf.setdynamics(font,attribute) local dynamics = fontdynamics[font] local script = features.script or 'dflt' local language = features.language or 'dflt' + if script == "auto" then + -- checkedscript and resources are defined later so we cannot shortcut them + script = definers.checkedscript(fontdata[font],hashes.resources[font],features) + end local ds = dynamics[script] -- can be metatable magic (less testing) if not ds then ds = { } |