From 0a1b9b746b5ce4cd740af8948f083685879c4eb9 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Mon, 15 Feb 2016 08:26:54 +0100 Subject: [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. --- src/luaotfload-features.lua | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/luaotfload-features.lua') 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 -- cgit v1.2.3