diff options
author | Philipp Gesang <phg@phi-gamma.net> | 2016-04-13 08:19:06 +0200 |
---|---|---|
committer | Philipp Gesang <phg@phi-gamma.net> | 2016-04-13 08:19:12 +0200 |
commit | 9fddbb6e4a043652357a3797364aa2deb15b4efe (patch) | |
tree | 24bfd614986dad0018b68432014d9062b92e4b07 | |
parent | d68931e1eba3e1cced0b1509b1e90cc5a929a4c1 (diff) | |
download | luaotfload-9fddbb6e4a043652357a3797364aa2deb15b4efe.tar.gz |
[db] pull raw name information with getinfo()
This facility was added by Hans to accomodate our peculiar requirements:
There should be no fallback from prefmodifiers to familyname since that
removes valuable information about larger font sets like the Adobe ones.
-rw-r--r-- | src/luaotfload-database.lua | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/luaotfload-database.lua b/src/luaotfload-database.lua index 0557c1a..0e8f86a 100644 --- a/src/luaotfload-database.lua +++ b/src/luaotfload-database.lua @@ -1303,7 +1303,7 @@ find_closest = function (name, limit) end --- find_closest() local load_font_file = function (filename, subfont) - local rawfont, _msg = read_font_file (filename, subfont) + local rawfont, _msg = read_font_file (filename, subfont, true) if not rawfont then logreport ("log", 1, "db", "ERROR: failed to open %s.", filename) return @@ -1375,9 +1375,15 @@ local names_items = { } local map_english_names = function (metadata) + local namesource + local platformames = metadata.platformnames + if platformnames then + namesource = platformnames.windows or platformnames.macintosh + end + namesource = namesource or metadata local nameinfo = { } for ours, theirs in next, names_items do - nameinfo [ours] = metadata [theirs] + nameinfo [ours] = namesource [theirs] end return nameinfo end @@ -1605,7 +1611,7 @@ t1_fullinfo = function (filename, _subfont, location, basename, format) sanitized = sanitize_fontnames ({ fontname = fontname, psname = fullname, - metafamily = family, + metafamily = familyname, familyname = familyname, weight = metadata.weight, --- string identifier prefmodifiers = style, |