summaryrefslogtreecommitdiff
path: root/src/luaotfload-features.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2016-05-12 22:57:50 +0200
committerPhilipp Gesang <phg@phi-gamma.net>2016-05-12 23:42:03 +0200
commit19bc52023e3c345855c41ba36911143ed094bf1a (patch)
tree86df6ef61a532542975180afba90e27281360d53 /src/luaotfload-features.lua
parentd20186dc4653791d1ebb8eb4be9c05716879686f (diff)
downloadluaotfload-19bc52023e3c345855c41ba36911143ed094bf1a.tar.gz
[features,loaders] tidy up loading of afm
Diffstat (limited to 'src/luaotfload-features.lua')
-rw-r--r--src/luaotfload-features.lua18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/luaotfload-features.lua b/src/luaotfload-features.lua
index 5152fab..8263b51 100644
--- a/src/luaotfload-features.lua
+++ b/src/luaotfload-features.lua
@@ -1221,8 +1221,12 @@ local handle_request = function (specification)
request.features = apply_default_features(request.features)
if name then
- specification.name = name
- specification.lookup = lookup or specification.lookup
+ if lookup == "file" then
+ specification.filename = name
+ name = file.removesuffix (name)
+ end
+ specification.name = name
+ specification.lookup = lookup or specification.lookup
end
if request.modifiers then
@@ -1245,7 +1249,12 @@ local handle_request = function (specification)
--- The next line sets the “rand” feature to “random”; I haven’t
--- investigated it any further (luatex-fonts-ext), so it will
--- just stay here.
- specification.features.normal = normalize (request.features)
+ local features = specification.features
+ if not features then
+ features = { }
+ specification.features = features
+ end
+ features.normal = normalize (request.features)
local subfont = tonumber (specification.sub)
if subfont and subfont >= 0 then
specification.sub = subfont + 1
@@ -1253,8 +1262,9 @@ local handle_request = function (specification)
return specification
end
+fonts.names.handle_request = handle_request
+
if as_script == true then --- skip the remainder of the file
- fonts.names.handle_request = handle_request
report ("log", 5, "features",
"Exiting early from luaotfload-features.lua.")
return