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.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/tex/context/base/font-def.lua b/tex/context/base/font-def.lua
index 864e5bd16..f50e57113 100644
--- a/tex/context/base/font-def.lua
+++ b/tex/context/base/font-def.lua
@@ -34,6 +34,7 @@ local readers = fonts.readers
local definers = fonts.definers
local specifiers = fonts.specifiers
local constructors = fonts.constructors
+local fontgoodies = fonts.goodies
readers.sequence = allocate { 'otf', 'ttf', 'afm', 'tfm', 'lua' } -- dfont ttc
@@ -47,6 +48,8 @@ local internalized = allocate() -- internal tex numbers (private)
local loadedfonts = constructors.loadedfonts
local designsizes = constructors.designsizes
+local resolvefile = fontgoodies.filenames.resolve
+
--[[ldx--
<p>We hardly gain anything when we cache the final (pre scaled)
<l n='tfm'/> table. But it can be handy for debugging, so we no
@@ -164,10 +167,13 @@ local resolvers = definers.resolvers
-- todo: reporter
function resolvers.file(specification)
- local suffix = file.suffix(specification.name)
+ local name = resolvefile(specification.name) -- catch for renames
+ local suffix = file.suffix(name)
if fonts.formats[suffix] then
specification.forced = suffix
- specification.name = file.removesuffix(specification.name)
+ specification.name = file.removesuffix(name)
+ else
+ specification.name = name -- cna be resolved
end
end