summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2017-01-29 19:21:06 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2017-01-29 19:31:34 +0100
commit2ba3fdfa6207c9c4f61fee1d5518f271c19aa891 (patch)
tree1634bf0a2486af8866f6a38a4e8be53c21075cea
parentd83a7f05a09947bbc874464e65dd44ec16b8b066 (diff)
downloadluaotfload-2ba3fdfa6207c9c4f61fee1d5518f271c19aa891.tar.gz
[conf] improve defaults handling of designsize-dimen
-rw-r--r--src/luaotfload-configuration.lua18
-rw-r--r--src/luaotfload-database.lua10
2 files changed, 5 insertions, 23 deletions
diff --git a/src/luaotfload-configuration.lua b/src/luaotfload-configuration.lua
index 46e9074..4d918b2 100644
--- a/src/luaotfload-configuration.lua
+++ b/src/luaotfload-configuration.lua
@@ -92,11 +92,6 @@ local valid_formats = tabletohash {
"otf", "ttc", "ttf", "afm", "pfb"
}
---- cf. TeXbook p. 57
-local valid_designsize_dimens = tabletohash {
- "bp", "pt", "dd"
-}
-
local default_anon_sequence = {
"tex", "path", "name"
}
@@ -322,7 +317,7 @@ end
local set_size_dimension = function ()
local names = fonts.names
- if names and names.size_dimension then
+ if names and names.set_size_dimension then
local dim = config.luaotfload.db.designsize_dimen
if not dim or dim == "" then
dim = default_config.db.designsize_dimen
@@ -504,17 +499,6 @@ local option_spec = {
designsize_dimen = {
in_t = string_t,
out_t = string_t,
- transform = function (dim)
- if not valid_designsize_dimens [dim] then
- local default = valid_designsize_dimens.__default
- logreport ("both", 0, "conf",
- "Invalid dimension %q specified for design sizes, \z
- using default %q.", dim, default)
- return default
- end
- logreport ("both", 4, "conf", "Chosen design size dimension %q.", dim)
- return dim
- end
},
},
run = {
diff --git a/src/luaotfload-database.lua b/src/luaotfload-database.lua
index 5750966..14fe4b3 100644
--- a/src/luaotfload-database.lua
+++ b/src/luaotfload-database.lua
@@ -1336,7 +1336,7 @@ do --- too many upvalues :/
local dimen_dd = 3
local size_dimen = dimens.bp
- local set_size_dimen = function (dim)
+ set_size_dimension = function (dim)
local f = dimens [dim]
if f then
logreport ("both", 4, "db",
@@ -1366,11 +1366,9 @@ do --- too many upvalues :/
design_range_top = (design_range_top or fallback_size) / 10
design_range_bottom = (design_range_bottom or fallback_size) / 10
- if design_dimension_bp == true then
- design_size = size_dimen (design_size )
- design_range_top = size_dimen (design_range_top )
- design_range_bottom = size_dimen (design_range_bottom)
- end
+ design_size = size_dimen (design_size )
+ design_range_top = size_dimen (design_range_top )
+ design_range_bottom = size_dimen (design_range_bottom)
return {
design_size, design_range_top, design_range_bottom,