diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2010-01-16 17:45:11 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2010-01-16 17:45:11 +0200 |
commit | 48296a62ecdf327bbe4f0af51b656d099af57950 (patch) | |
tree | dcf175748a92f755924e29d465b119276c3c85a7 /luaotfload-fonts.lua | |
parent | b9fdd5cf1886b47159fa380b4c4144e5b80b1066 (diff) | |
download | luaotfload-48296a62ecdf327bbe4f0af51b656d099af57950.tar.gz |
Remove some no longer needed code
Now LuaTeX can return proper TTF names, we no longer need these dirty
hacks.
Diffstat (limited to 'luaotfload-fonts.lua')
-rw-r--r-- | luaotfload-fonts.lua | 29 |
1 files 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 |