diff options
-rw-r--r-- | otfl-font-dum.lua | 14 | ||||
-rw-r--r-- | otfl-font-xtx.lua | 2 |
2 files changed, 10 insertions, 6 deletions
diff --git a/otfl-font-dum.lua b/otfl-font-dum.lua index 0859f6d..d1d1b0a 100644 --- a/otfl-font-dum.lua +++ b/otfl-font-dum.lua @@ -77,12 +77,14 @@ function fonts.names.resolve(name,sub,style) local psname = psnames and psnames[condensed] if family then local style = style or "regular" - family = family[style] - local fontname, filename, subfont = family, family[1], family[2] - if subfont then - return filename, subfont - else - return filename, false + local found = family[style] + if found then + local fontname, filename, subfont = found, found[1], found[2] + if subfont then + return filename, subfont + else + return filename, false + end end elseif psname then local fontname, filename, subfont = psname, psname[1], psname[2] diff --git a/otfl-font-xtx.lua b/otfl-font-xtx.lua index b285d0b..502163c 100644 --- a/otfl-font-xtx.lua +++ b/otfl-font-xtx.lua @@ -74,6 +74,8 @@ local function isstyle(s) elseif v:find("^s=") then list.optsize = v:split("=")[2] elseif v == "aat" or v == "icu" then + else + list.style = v:gsub("[^%a%d]", "") end end end |