From 2b0964ac028a724842ad37514d30c8bccbf9c354 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Mon, 17 Oct 2011 10:33:24 +0200 Subject: Accept comma-separated key values This mainly fixes passing a comma-separated list to `featurefile`. --- luaotfload.dtx | 10 +++++----- otfl-font-ltx.lua | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/luaotfload.dtx b/luaotfload.dtx index 90909da..e6bef4d 100644 --- a/luaotfload.dtx +++ b/luaotfload.dtx @@ -290,11 +290,11 @@ and the derived files % default value is |latn|. % % \item [featurefile] \hfill \\ -% feature files are textual representation of OpenType tables and can be used -% to extend OpenType features of the font on fly. The file name of the feature -% file is passed, then features defined in the file can be enabled/disabled -% like any other feature. The syntax is documented in Adobe's OpenType Feature -% File +% a comma-separated list of feature files to be applied to the font. Feature +% files are textual representation of OpenType tables and can be used to extend +% OpenType features of the font on fly. Features defined in a feature file, +% after being applied to the font, can be enabled/disabled like any other +% feature. The syntax is documented in Adobe's OpenType Feature File % Specification\footnote{\url{http://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html}}. % % For example, to set a |tkrn| feature from |mykern.fea| file: diff --git a/otfl-font-ltx.lua b/otfl-font-ltx.lua index e52360c..655a22e 100644 --- a/otfl-font-ltx.lua +++ b/otfl-font-ltx.lua @@ -126,7 +126,7 @@ local filespec = (R("az", "AZ") * P(":"))^-1 * (1-S(":("))^1 local stylespec = spaces * P("/") * (((1-P(":"))^0)/isstyle) * spaces local filename = (P("file:")/isfile * (filespec/thename)) + (P("[") * P(true)/isname * (((1-P("]"))^0)/thename) * P("]")) local fontname = (P("name:")/isname * (namespec/thename)) + P(true)/issome * (namespec/thename) -local sometext = (R("az","AZ","09") + S("+-."))^1 +local sometext = (R("az","AZ","09") + S("+-.,"))^1 local truevalue = P("+") * spaces * (sometext/istrue) local falsevalue = P("-") * spaces * (sometext/isfalse) local keyvalue = P("+") + (C(sometext) * spaces * P("=") * spaces * C(sometext))/iskey -- cgit v1.2.3