diff options
author | Elie Roux <eroux@dedibox.ebzao.info> | 2010-01-20 15:09:56 +0100 |
---|---|---|
committer | Elie Roux <eroux@dedibox.ebzao.info> | 2010-01-20 15:09:56 +0100 |
commit | 939da416b5435352ca46975701a69b8c0965cda6 (patch) | |
tree | dc1e7ad3229c036d74a91d8c8a51cde2fe92dd33 | |
parent | 1588a9673bb14157388a3f808ea0eee32c9d9bbf (diff) | |
download | luaotfload-939da416b5435352ca46975701a69b8c0965cda6.tar.gz |
Allowing font file name to start by c:/...
-rw-r--r-- | otfl-font-xtx.lua | 4 |
1 files changed, 3 insertions, 1 deletions
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 |