summaryrefslogtreecommitdiff
path: root/otfl-font-def.lua
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2011-10-07 02:27:05 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2011-10-07 02:27:05 +0200
commit1e3820ff158bb9d23e9d75116fecd28a64656d2c (patch)
tree4b649cd38ffe8774dc1835aca5af0a2f023908d6 /otfl-font-def.lua
parent116531893e5556d196dd0b4ca83eea6e31fbe644 (diff)
downloadluaotfload-1e3820ff158bb9d23e9d75116fecd28a64656d2c.tar.gz
Sync with ConTeXt beta 2011.10.07 00:40
Diffstat (limited to 'otfl-font-def.lua')
-rw-r--r--otfl-font-def.lua17
1 files changed, 10 insertions, 7 deletions
diff --git a/otfl-font-def.lua b/otfl-font-def.lua
index aaa6ef4..63d3e2c 100644
--- a/otfl-font-def.lua
+++ b/otfl-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)
- 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,specification)
- 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)