Skip to content
This repository has been archived by the owner on Aug 17, 2019. It is now read-only.

Commit

Permalink
[db] omit the extra funcall when converting units
Browse files Browse the repository at this point in the history
  • Loading branch information
phi-gamma committed Feb 3, 2017
1 parent 6971d4a commit 7308f84
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/luaotfload-database.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 7308f84

Please sign in to comment.