diff options
author | Philipp Gesang <phg42.2a@gmail.com> | 2013-08-01 15:36:31 +0200 |
---|---|---|
committer | Philipp Gesang <phg42.2a@gmail.com> | 2013-08-01 15:36:31 +0200 |
commit | da188203818d08606620eb59ab3337a815126bb6 (patch) | |
tree | e3baed36d13a3c52217d7c49c37c9ae7a2ae1727 /luaotfload-database.lua | |
parent | 9865446898d33c24c2ca13a3fe4558f11d937d01 (diff) | |
download | luaotfload-da188203818d08606620eb59ab3337a815126bb6.tar.gz |
[db] improve font name/style matching with type1 fonts (/{b,i,bi} switches)
Diffstat (limited to 'luaotfload-database.lua')
-rw-r--r-- | luaotfload-database.lua | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/luaotfload-database.lua b/luaotfload-database.lua index 584e9ad..5b22892 100644 --- a/luaotfload-database.lua +++ b/luaotfload-database.lua @@ -1219,21 +1219,27 @@ t1_fullinfo = function (filename, _subfont, texmf, basename) style = "italic" end + local style_synonyms_set = style_synonyms.set if weight then weight = sanitize_string (weight) + local tmp = "" + if style_synonyms_set.bold[weight] then + tmp = "bold" + end if style then - if style_synonyms.set.bold[weight] then - style = "bold" .. style - end + style = tmp .. style else - if style_synonyms.set.regular[weight] then + if style_synonyms_set.regular[weight] then style = "regular" + else + style = tmp end end end if not style then style = "regular" + --- else italic end namedata.sanitized = sanitize_names ({ |