diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2009-12-29 19:49:28 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2009-12-30 13:20:32 +0200 |
commit | b348e3c3a5cbd55536bad53d98f44caa1ff612b6 (patch) | |
tree | 83ffd1cfab0c451276242f60af637864c0b78886 /otfl-font-xtx.lua | |
parent | 40e5474605a264df191cc78459df32c840fe83d0 (diff) | |
download | luaotfload-b348e3c3a5cbd55536bad53d98f44caa1ff612b6.tar.gz |
Support floating point and negative values
Things like "slan=-.14;extend=1.5" should work now.
Diffstat (limited to 'otfl-font-xtx.lua')
-rw-r--r-- | otfl-font-xtx.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/otfl-font-xtx.lua b/otfl-font-xtx.lua index 574221b..3899a50 100644 --- a/otfl-font-xtx.lua +++ b/otfl-font-xtx.lua @@ -80,7 +80,8 @@ local fontname = (lpeg.P("name:")/isname * (namespec/thename)) + lpeg.P(true)/ local sometext = (lpeg.R("az") + lpeg.R("AZ") + lpeg.R("09"))^1 local truevalue = lpeg.P("+") * spaces * (sometext/istrue) local falsevalue = lpeg.P("-") * spaces * (sometext/isfalse) -local keyvalue = (lpeg.C(sometext) * spaces * lpeg.P("=") * spaces * lpeg.C(sometext))/iskey +local someval = (lpeg.S("+-.") + sometext)^1 +local keyvalue = (lpeg.C(sometext) * spaces * lpeg.P("=") * spaces * lpeg.C(someval))/iskey local somevalue = sometext/istrue local subvalue = lpeg.P("(") * (lpeg.C(lpeg.P(1-lpeg.S("()"))^1)/issub) * lpeg.P(")") -- for Kim local option = spaces * (keyvalue + falsevalue + truevalue + somevalue) * spaces |