summaryrefslogtreecommitdiff
path: root/src/luaotfload-database.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2016-10-21 20:53:49 +0200
committerGitHub <noreply@github.com>2016-10-21 20:53:49 +0200
commit98656f9d5ca25aaea2e977b79e09c9bb661f4cef (patch)
tree19aaadfca6f5f754aa25e1bc9b02d2f8d1cfd571 /src/luaotfload-database.lua
parente43a2bac48edbd4af2892c4161d0036fc642e528 (diff)
parentb409613a112531013787984bbfb809b1bdda63bf (diff)
downloadluaotfload-98656f9d5ca25aaea2e977b79e09c9bb661f4cef.tar.gz
Merge pull request #386 from phi-gamma/master
code for v2.8-rc3
Diffstat (limited to 'src/luaotfload-database.lua')
-rw-r--r--src/luaotfload-database.lua20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/luaotfload-database.lua b/src/luaotfload-database.lua
index 41080cf..c6ccaa6 100644
--- a/src/luaotfload-database.lua
+++ b/src/luaotfload-database.lua
@@ -1511,7 +1511,6 @@ end
local organize_styledata = function (metadata, rawinfo, info)
local pfminfo = metadata.pfminfo
local names = rawinfo.names
-
return {
--- see http://www.microsoft.com/typography/OTSPEC/features_pt.htm#size
size = get_size_info (rawinfo),
@@ -2553,6 +2552,7 @@ generate_filedata = function (mappings)
end
local bold_spectrum_low = 501 --- 500 is medium, 900 heavy/black
+local normal_weight = 400
local bold_weight = 700
local normal_width = 5
@@ -2606,12 +2606,18 @@ do
treating weights > 500 as bold or allowing synonyms like
“heavy”, “black”.
--]]--
- if width == normal_width and pfmweight == bold_weight then
- --- bold spectrum matches
- if italicangle == 0 then
- return "b"
+ if width == normal_width then
+ if pfmweight == bold_weight then
+ --- bold spectrum matches
+ if italicangle == 0 then
+ return "b"
+ end
+ return "bi"
+ elseif pfmweight == normal_weight then
+ if italicangle ~= 0 then
+ return "i"
+ end
end
- return "bi"
end
return false
end
@@ -3578,8 +3584,6 @@ local export = {
erase_cache = erase_cache,
show_cache = show_cache,
find_closest = find_closest,
- --- transitionary
- use_fontforge = false,
}
return {