From 939da416b5435352ca46975701a69b8c0965cda6 Mon Sep 17 00:00:00 2001 From: Elie Roux Date: Wed, 20 Jan 2010 15:09:56 +0100 Subject: Allowing font file name to start by c:/... --- otfl-font-xtx.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'otfl-font-xtx.lua') diff --git a/otfl-font-xtx.lua b/otfl-font-xtx.lua index ddc3d66..128219e 100644 --- a/otfl-font-xtx.lua +++ b/otfl-font-xtx.lua @@ -91,8 +91,10 @@ local function isfalse(s) list[s] = nil end -- see mpg/luaotfload#4 local function iskey (k,v) list[k] = v end local spaces = lpeg.P(" ")^0 -local namespec = (1-lpeg.S("/:("))^0 -- was: (1-lpeg.S("/: ("))^0 +-- ER: now accepting names like C:/program files/texlive/2009/... +local namespec = (lpeg.R("az", "AZ") * lpeg.P(":"))^-1 * (1-lpeg.S("/:("))^1 -- was: (1-lpeg.S("/: ("))^0 local crapspec = spaces * lpeg.P("/") * (((1-lpeg.P(":"))^0)/isstyle) * spaces +-- ER: can't understand why the 'file:' thing doesn't work with fontnames starting by c:... local filename = (lpeg.P("file:")/isfile * (namespec/thename)) + (lpeg.P("[") * lpeg.P(true)/isname * (((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") + lpeg.R("AZ") + lpeg.R("09"))^1 -- cgit v1.2.3