summaryrefslogtreecommitdiff
path: root/tex/context/base/font-def.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/font-def.lua')
-rw-r--r--tex/context/base/font-def.lua17
1 files changed, 10 insertions, 7 deletions
diff --git a/tex/context/base/font-def.lua b/tex/context/base/font-def.lua
index e3f564f24..63d3e2c9e 100644
--- a/tex/context/base/font-def.lua
+++ b/tex/context/base/font-def.lua
@@ -170,13 +170,14 @@ end
function resolvers.name(specification)
local resolve = fonts.names.resolve
if resolve then
- local resolved, sub = fonts.names.resolve(specification.name,specification.sub)
- specification.resolved, specification.sub = resolved, sub
+ local resolved, sub = resolve(specification.name,specification.sub,specification) -- we pass specification for overloaded versions
if resolved then
+ specification.resolved = resolved
+ specification.sub = sub
local suffix = file.suffix(resolved)
if fonts.formats[suffix] then
specification.forced = suffix
- specification.name = file.removesuffix(resolved)
+ specification.name = file.removesuffix(resolved)
else
specification.name = resolved
end
@@ -189,10 +190,12 @@ end
function resolvers.spec(specification)
local resolvespec = fonts.names.resolvespec
if resolvespec then
- specification.resolved, specification.sub = fonts.names.resolvespec(specification.name,specification.sub)
- if specification.resolved then
- specification.forced = file.extname(specification.resolved)
- specification.name = file.removesuffix(specification.resolved)
+ local resolved, sub = resolvespec(specification.name,specification.sub,specification) -- we pass specification for overloaded versions
+ if resolved then
+ specification.resolved = resolved
+ specification.sub = sub
+ specification.forced = file.extname(resolved)
+ specification.name = file.removesuffix(resolved)
end
else
resolvers.name(specification)