summaryrefslogtreecommitdiff
path: root/src/luaotfload-auxiliary.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/luaotfload-auxiliary.lua')
-rw-r--r--src/luaotfload-auxiliary.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/luaotfload-auxiliary.lua b/src/luaotfload-auxiliary.lua
index 35f8f2b..3d300e7 100644
--- a/src/luaotfload-auxiliary.lua
+++ b/src/luaotfload-auxiliary.lua
@@ -42,7 +42,15 @@ local luaotfload_callbacks = { }
--- https://github.com/khaledhosny/luaotfload/issues/54
local rewrite_fontname = function (tfmdata, specification)
- tfmdata.name = [["]] .. specification .. [["]]
+ local format = tfmdata.format or tfmdata.properties.format
+ if format ~= "type1" then
+ if stringfind (specification, " ") then
+ tfmdata.name = stringformat ("%q", specification)
+ else
+ --- other specs should parse just fine
+ tfmdata.name = specification
+ end
+ end
end
local rewriting = false