diff options
author | Philipp Gesang <phg@phi-gamma.net> | 2017-02-01 19:15:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-01 19:15:28 +0100 |
commit | 90acbbce3ff2b50929e18cb685961a1168f84075 (patch) | |
tree | 58eb5ccc57e774a980158638fbd246b8a79a6b21 | |
parent | 08060160fcde7a2f07fbf10260d3d2efe155f6c0 (diff) | |
parent | 0fd89868855c3c7038fcc736b0448b7f6e8c8662 (diff) | |
download | luaotfload-90acbbce3ff2b50929e18cb685961a1168f84075.tar.gz |
Merge pull request #399 from zhouyan/patch-1
Fix calculation of database optical sizes
-rw-r--r-- | src/luaotfload-database.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/luaotfload-database.lua b/src/luaotfload-database.lua index 4a71d34..5e4fd7a 100644 --- a/src/luaotfload-database.lua +++ b/src/luaotfload-database.lua @@ -1049,8 +1049,8 @@ do --- cf. TeXbook p. 57 local dimens = { pt = function (v) return v end, - bp = function (v) return (v * 7200) / 7227 end, - dd = function (v) return (v * 1157) / 1238 end, + bp = function (v) return (v * 7227) / 7200 end, + dd = function (v) return (v * 1238) / 1157 end, } design_size_dimension = dimens.bp @@ -1367,9 +1367,9 @@ local get_size_info do --- too many upvalues :/ design_range_top = ((design_range_top or fallback_size) * 2^16) / 10 design_range_bottom = ((design_range_bottom or fallback_size) * 2^16) / 10 - design_size = (design_size * 7200) / 7227 - design_range_top = (design_range_top * 7200) / 7227 - design_range_bottom = (design_range_bottom * 7200) / 7227 + design_size = (design_size * 7227) / 7200 + design_range_top = (design_range_top * 7227) / 7200 + design_range_bottom = (design_range_bottom * 7227) / 7200 return { design_size, design_range_top, design_range_bottom, |