From 48296a62ecdf327bbe4f0af51b656d099af57950 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Sat, 16 Jan 2010 17:45:11 +0200 Subject: Remove some no longer needed code Now LuaTeX can return proper TTF names, we no longer need these dirty hacks. --- luaotfload-fonts.lua | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/luaotfload-fonts.lua b/luaotfload-fonts.lua index b3348ef..6a2fcf2 100644 --- a/luaotfload-fonts.lua +++ b/luaotfload-fonts.lua @@ -52,10 +52,9 @@ function fontloader.fullinfo(filename, subfont) if m.names then for _,v in pairs(m.names) do if v.lang == "English (US)" then - n.fullname = v.names.compatfull - n.familyname = v.names.preffamilyname - n.subfamily = v.names.subfamily - n.modifier = v.names.prefmodifiers + n.fullname = v.names.compatfull or v.names.fullname + n.familyname = v.names.preffamilyname or v.names.family + n.subfamily = v.names.subfamily or v.names.prefmodifiers end end end @@ -70,28 +69,6 @@ function fontloader.fullinfo(filename, subfont) t.fullname = n.fullname or m.fullname t.family = n.familyname or m.familyname t.style = n.subfamily or m.style - if not t.style or t.style:is_empty() then - local s = t.psname:split("-") - if s and #s >= 2 then - t.style = s[#s] - end - end - if not t.style or t.style:is_empty() then - t.style = n.modifier - end - if not t.style or t.style:is_empty() then - if n.fullname and n.familyname then - t.style = (n.fullname:gsub(n.familyname, "") ~= n.fullname and n.fullname:gsub(n.familyname, "")) or nil - elseif m.fontname and m.familyname then - t.style = (m.fontname:gsub(m.familyname, "") ~= m.fontname and m.fontname:gsub(m.familyname, "")) or nil - end - end - if not t.style or t.style:is_empty() then - t.style = (m.fullname:gsub(m.familyname, "") ~= m.fullname and m.fullname:gsub(m.familyname, "")) or nil - end - if not t.style or t.style:is_empty() then - t.style = "Regular" - end for k,v in pairs(t) do t[k] = sanitize(v) end -- cgit v1.2.3