summaryrefslogtreecommitdiff
path: root/src/fontloader/misc/fontloader-font-one.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2016-05-20 08:06:55 +0200
committerPhilipp Gesang <phg@phi-gamma.net>2016-05-24 07:11:56 +0200
commit274ca61bf7ea43543c5aea53873f22c8b598b4a9 (patch)
treead3788a6ca0264efb78a26e8b03e1ceda502dbef /src/fontloader/misc/fontloader-font-one.lua
parent72f10523323c3e5183f91931db56dcf38f92b68d (diff)
downloadluaotfload-274ca61bf7ea43543c5aea53873f22c8b598b4a9.tar.gz
[fontloader] sync with Context as of 2016-05-22
Diffstat (limited to 'src/fontloader/misc/fontloader-font-one.lua')
-rw-r--r--src/fontloader/misc/fontloader-font-one.lua14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/fontloader/misc/fontloader-font-one.lua b/src/fontloader/misc/fontloader-font-one.lua
index 77f2560..a9f78f4 100644
--- a/src/fontloader/misc/fontloader-font-one.lua
+++ b/src/fontloader/misc/fontloader-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