summaryrefslogtreecommitdiff
path: root/src/luaotfload-loaders.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2016-02-19 00:51:24 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2016-02-19 00:51:29 +0100
commit128b29a4260f0454996f5663a02c0f7c575b2d6b (patch)
tree2eb5a849bf247a17e6204c0edae7d5173927588e /src/luaotfload-loaders.lua
parent1a6a253e85e609d37113585081b6cf9711757208 (diff)
downloadluaotfload-128b29a4260f0454996f5663a02c0f7c575b2d6b.tar.gz
[features,loaders] fix lookup conflicts via introduction of “evl” lookup
This introduces a forced lookup type “evl” that bypasses the other methods. The specification is extended with the correct values including a more meaningful hash string. As a result, the loader no longer attempts to interpret the specification as a “file:” request but the backend can still resolve the necessary files.
Diffstat (limited to 'src/luaotfload-loaders.lua')
-rw-r--r--src/luaotfload-loaders.lua17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/luaotfload-loaders.lua b/src/luaotfload-loaders.lua
index 8e5248b..80ce41a 100644
--- a/src/luaotfload-loaders.lua
+++ b/src/luaotfload-loaders.lua
@@ -32,14 +32,13 @@ local lua_reader = function (specification)
end
end
-local data_reader = function (specification)
- local data = specification.data
- if data and type (data) == "function" then
- logreport ("both", 0, "loaders",
- "data: found tfmdata for “%s”, injecting.",
- specification.name)
- return data ()
- end
+local eval_reader = function (specification)
+ local eval = specification.eval
+ if not eval or type (eval) ~= "function" then return nil end
+ logreport ("both", 0, "loaders",
+ "eval: found tfmdata for “%s”, injecting.",
+ specification.name)
+ return eval ()
end
local install_formats = function ()
@@ -71,7 +70,7 @@ local install_formats = function ()
return true
end
- return aux ("dat", data_reader)
+ return aux ("evl", eval_reader)
and aux ("lua", lua_reader)
and aux ("pfa", function (spec) return readers.opentype (spec, "pfa", "type1") end)
and aux ("pfb", function (spec) return readers.opentype (spec, "pfb", "type1") end)