diff options
author | Philipp Gesang <phg@phi-gamma.net> | 2016-02-15 08:26:54 +0100 |
---|---|---|
committer | Philipp Gesang <phg@phi-gamma.net> | 2016-02-15 08:27:00 +0100 |
commit | 0a1b9b746b5ce4cd740af8948f083685879c4eb9 (patch) | |
tree | 36933ee515a9d0991dd2afeaeb7bd4a86f60fdb1 /src/luaotfload-features.lua | |
parent | fdefa722cdbf92c38e02f26a1a7092ef70a14cae (diff) | |
download | luaotfload-0a1b9b746b5ce4cd740af8948f083685879c4eb9.tar.gz |
[parsers,features] parse combo requests
Highly experimental at this point. The font request parser has been
extended to handle combinations of already defined fonts. Nothing else
has been implemented yet, so the request handler will simply error out
with a message.
Diffstat (limited to 'src/luaotfload-features.lua')
-rw-r--r-- | src/luaotfload-features.lua | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/luaotfload-features.lua b/src/luaotfload-features.lua index fd43e58..6df04b2 100644 --- a/src/luaotfload-features.lua +++ b/src/luaotfload-features.lua @@ -993,7 +993,10 @@ local import_values = { { "mode", true }, } -local lookup_types = { "anon", "file", "kpse", "my", "name", "path" } +local lookup_types = { "anon" , "file", "kpse" + , "my" , "name", "path" + , "combo" + } local select_lookup = function (request) for i=1, #lookup_types do @@ -1049,6 +1052,7 @@ end local handle_request = function (specification) local request = lpegmatch(luaotfload.parsers.font_request, specification.specification) +----inspect(request) if not request then --- happens when called with an absolute path --- in an anonymous lookup; @@ -1077,7 +1081,13 @@ local handle_request = function (specification) specification.lookup = "path" return specification end + local lookup, name = select_lookup(request) + if lookup == "combo" then + report ("both", 0, "load", + "‘combo’ lookup not implemented at this stage.") + os.exit(-42) + end request.features = apply_default_features(request.features) if name then @@ -1749,4 +1759,4 @@ return { end } --- vim:tw=71:sw=4:ts=4:expandtab +-- vim:tw=79:sw=4:ts=4:expandtab |