summaryrefslogtreecommitdiff
path: root/luaotfload-database.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-06-23 21:29:38 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-06-23 21:29:38 +0200
commitb20de3f5c45fc767e1a17c8dab12cae1aa4430b7 (patch)
tree1a973bc182d57e646ea52eb8c5b888cd886106fa /luaotfload-database.lua
parent2938e7d63404f1d2e129b13f5bb69ddf0653a71e (diff)
downloadluaotfload-b20de3f5c45fc767e1a17c8dab12cae1aa4430b7.tar.gz
treat subfamily style matches as second-rate
Diffstat (limited to 'luaotfload-database.lua')
-rw-r--r--luaotfload-database.lua13
1 files changed, 5 insertions, 8 deletions
diff --git a/luaotfload-database.lua b/luaotfload-database.lua
index 8c9f42e..22f9455 100644
--- a/luaotfload-database.lua
+++ b/luaotfload-database.lua
@@ -748,19 +748,14 @@ resolve = function (_, _, specification) -- the 1st two parameters are used by C
if name == family
or name == metafamily
then
- if style == prefmodifiers
- or style == subfamily
- then
+ if style == prefmodifiers then -- exact
local continue
exact, continue = add_to_match(
exact, optsize, dsnsize, size,
minsize, maxsize, face)
if continue == false then break end
-
- elseif prefmodifiers == "regular"
- or subfamily == "regular"
+ elseif prefmodifiers == "regular" then
--- TODO this match should be performed when building the db
- then
fallback = face
elseif name == fullname
or name == pfullname
@@ -772,7 +767,9 @@ resolve = function (_, _, specification) -- the 1st two parameters are used by C
exact, optsize, dsnsize, size,
minsize, maxsize, face)
if continue == false then break end
- elseif synonym_set[style] and
+ elseif style == subfamily --- unreliable (see Ad. Garm. Pro)
+ or subfamily == "regular"
+ or synonym_set[style] and
(synonym_set[style][prefmodifiers] or
synonym_set[style][subfamily])
or synonym_set.regular[prefmodifiers]