summaryrefslogtreecommitdiff
path: root/luaotfload-features.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-05-03 19:07:07 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-05-03 19:07:07 +0200
commita02abd16b0ffc8a21270297008e766917e25670b (patch)
tree199d85959e3e2464ed734bdf792874ff7b84da92 /luaotfload-features.lua
parent0d5cb659dab620361bddc59d4f386fbbdc78b307 (diff)
downloadluaotfload-a02abd16b0ffc8a21270297008e766917e25670b.tar.gz
workaround for invalid request syntax
Diffstat (limited to 'luaotfload-features.lua')
-rw-r--r--luaotfload-features.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/luaotfload-features.lua b/luaotfload-features.lua
index 494d02d..cd00a0f 100644
--- a/luaotfload-features.lua
+++ b/luaotfload-features.lua
@@ -465,6 +465,18 @@ end
local handle_request = function (specification)
local request = lpegmatch(font_request,
specification.specification)
+ if not request then
+ --- happens when called with an absolute path
+ --- in an anonymous lookup;
+ --- we try to behave as friendly as possible
+ --- just go with it ...
+ report("log", 0, "load", "invalid request ā€œ%sā€ of type anon",
+ specification.specification)
+ report("log", 0, "load", "use square bracket syntax or consult the documentation.")
+ specification.name = specification.specification
+ specification.lookup = "file"
+ return specification
+ end
local lookup, name = select_lookup(request)
request.features = set_default_features(request.features)