summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/font-one.lua
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-05-19 14:44:17 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-05-19 14:44:17 +0200
commitdb581096187dc2d3cbdbe4cdc39d247c168b1607 (patch)
tree529b5baf164aac250975e51937e024a8cd5c71c8 /tex/context/base/mkiv/font-one.lua
parent2017d30b4ca772c8eeac4fc0eb9b54e547a9a1d8 (diff)
downloadcontext-db581096187dc2d3cbdbe4cdc39d247c168b1607.tar.gz
2016-05-19 13:48:00
Diffstat (limited to 'tex/context/base/mkiv/font-one.lua')
-rw-r--r--tex/context/base/mkiv/font-one.lua14
1 files changed, 12 insertions, 2 deletions
diff --git a/tex/context/base/mkiv/font-one.lua b/tex/context/base/mkiv/font-one.lua
index 77f2560f6..a9f78f4fb 100644
--- a/tex/context/base/mkiv/font-one.lua
+++ b/tex/context/base/mkiv/font-one.lua
@@ -812,7 +812,8 @@ local function check_afm(specification,fullname)
end
function readers.afm(specification,method)
- local fullname, tfmdata = specification.filename or "", nil
+ local fullname = specification.filename or ""
+ local tfmdata = nil
if fullname == "" then
local forced = specification.forced or ""
if forced ~= "" then
@@ -841,7 +842,16 @@ function readers.pfb(specification,method) -- only called when forced
if trace_defining then
report_afm("using afm reader for %a",original)
end
- specification.specification = file.replacesuffix(original,"afm")
specification.forced = "afm"
+ local function swap(name)
+ local value = specification[swap]
+ if value then
+ specification[swap] = gsub("%.pfb",".afm",1)
+ end
+ end
+ swap("filename")
+ swap("fullname")
+ swap("forcedname")
+ swap("specification")
return readers.afm(specification,method)
end