From bc5490e6a3f47df0943c6ddbdc41723898c40156 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Mon, 7 Jun 2010 07:41:18 +0300 Subject: Fix XeTeX's square brackets syntax It should force "file" not "name" lookup. --- otfl-font-xtx.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/otfl-font-xtx.lua b/otfl-font-xtx.lua index 413769d..c8bcd22 100644 --- a/otfl-font-xtx.lua +++ b/otfl-font-xtx.lua @@ -176,7 +176,7 @@ local spaces = lpeg.P(" ")^0 local namespec = (1-lpeg.S("/:("))^0 -- was: (1-lpeg.S("/: ("))^0 local filespec = (lpeg.R("az", "AZ") * lpeg.P(":"))^-1 * (1-lpeg.S(":("))^1 local crapspec = spaces * lpeg.P("/") * (((1-lpeg.P(":"))^0)/isstyle) * spaces -local filename = (lpeg.P("file:")/isfile * (filespec/thename)) + (lpeg.P("[") * lpeg.P(true)/isname * (((1-lpeg.P("]"))^0)/thename) * lpeg.P("]")) +local filename = (lpeg.P("file:")/isfile * (filespec/thename)) + (lpeg.P("[") * lpeg.P(true)/isfile * (((1-lpeg.P("]"))^0)/thename) * lpeg.P("]")) local fontname = (lpeg.P("name:")/isname * (namespec/thename)) + lpeg.P(true)/issome * (namespec/thename) local sometext = (lpeg.R("az","AZ","09") + lpeg.S("+-."))^1 local truevalue = lpeg.P("+") * spaces * (sometext/istrue) -- cgit v1.2.3