summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2017-02-03 07:52:23 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2017-02-03 08:14:56 +0100
commit7308f84bf07382407df5efe14a7a9e96f0cb5e3a (patch)
treee27cdfa029e7aa9771bf209214a377f71090b85f
parent6971d4a0340aad6736ef6bd7bd16361d156142dd (diff)
downloadluaotfload-7308f84bf07382407df5efe14a7a9e96f0cb5e3a.tar.gz
[db] omit the extra funcall when converting units
-rw-r--r--src/luaotfload-database.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/luaotfload-database.lua b/src/luaotfload-database.lua
index 87b4101..950d126 100644
--- a/src/luaotfload-database.lua
+++ b/src/luaotfload-database.lua
@@ -1086,19 +1086,19 @@ do
local dimens = {
bp = false,
- pt = function (v) return v * (7227 / 7200) end,
- dd = function (v) return v * (7227 / 7200) * (1157 / 1238) end,
+ pt = 7227 / 7200,
+ dd = (7227 / 7200) * (1157 / 1238),
}
design_size_dimension = dimens.bp
set_size_dimension = function (dim)
- local f = dimens [dim]
- if f ~= nil then
+ local conv = dimens [dim]
+ if conv ~= nil then
logreport ("both", 4, "db",
"Interpreting design sizes as %q, factor %.6f.",
- dim, f (1.000000))
- design_size_dimension = f
+ dim, conv)
+ design_size_dimension = conv
return
end
logreport ("both", 0, "db",
@@ -1174,7 +1174,7 @@ lookup_font_name = function (specification)
end
if design_size_dimension ~= false then
- askedsize = design_size_dimension (askedsize)
+ askedsize = design_size_dimension * askedsize
end
resolved, subfont = lookup_familyname (specification,