summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/third/simplefonts/t-simplefonts.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/third/simplefonts/t-simplefonts.lua')
-rw-r--r--Master/texmf-dist/tex/context/third/simplefonts/t-simplefonts.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/context/third/simplefonts/t-simplefonts.lua b/Master/texmf-dist/tex/context/third/simplefonts/t-simplefonts.lua
index 362e60916aa..129c14854ce 100644
--- a/Master/texmf-dist/tex/context/third/simplefonts/t-simplefonts.lua
+++ b/Master/texmf-dist/tex/context/third/simplefonts/t-simplefonts.lua
@@ -146,6 +146,7 @@ simplefonts.fontlist = {
function simplefonts.selectfont(font,name,extension,style,weight)
local fontname = {}
+ local truename = name
local name = lower(gsub(name,"[^a-zA-Z0-9]",""))
if extension ~= "" then
ext = find(extension,"*")
@@ -156,7 +157,11 @@ function simplefonts.selectfont(font,name,extension,style,weight)
end
fontname = "name:" .. lower(gsub(fontname,"[^a-zA-Z0-9]",""))
else
- if simplefonts.fontlist[name] then
+ if string.match(truename,"file:") then -- can't i check for 'file:' and 'name:' with one string.match?
+ fontname = truename
+ elseif string.match(truename,"name:") then
+ fontname = truename
+ elseif simplefonts.fontlist[name] then
if simplefonts.fontlist[name][weight] then
if simplefonts.fontlist[name][weight][style] then
fontname = simplefonts.fontlist[name][weight][style]