summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2015-06-13 00:09:44 +0200
committerPhilipp Gesang <phg@phi-gamma.net>2015-06-13 00:09:44 +0200
commit6a327a9389ab16599a19de67c0511b3b291ef880 (patch)
tree05e7ccb050f7630857795eb35364275ebc9e779e /src
parent956be4dfe34ffc351bf9a9fad8e6ebd1be075046 (diff)
downloadluaotfload-6a327a9389ab16599a19de67c0511b3b291ef880.tar.gz
[main] strip file name suffix for fonts loaded as type1
Diffstat (limited to 'src')
-rw-r--r--src/luaotfload-main.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/luaotfload-main.lua b/src/luaotfload-main.lua
index a676685..a825dc3 100644
--- a/src/luaotfload-main.lua
+++ b/src/luaotfload-main.lua
@@ -506,8 +506,10 @@ request_resolvers.anon = function (specification)
local name = specification.name
for i=1, #type1_formats do
local format = type1_formats[i]
+ local suffix = filesuffix (name)
if resolvers.findfile(name, format) then
- specification.forcedname = file.addsuffix(name, format)
+ local usename = suffix == format and file.removesuffix (name) or name
+ specification.forcedname = file.addsuffix (usename, format)
specification.forced = format
return
end