Skip to content

Commit

Permalink
Drop support for paths in file: lookups
Browse files Browse the repository at this point in the history
This has been deprecated for about 9 years and is no longer used in
fontspec since 5 years ago.
  • Loading branch information
zauguin committed May 29, 2022
1 parent afcb14b commit a2a3951
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions src/luaotfload-parsers.lua
Expand Up @@ -498,27 +498,6 @@ local function handle_xetex_option (val)
return tostring(1 + tonumber(val))
end
--[[doc--
Dirty test if a file: request is actually a path: lookup; dont
ask! Note this fails on Windows-style absolute paths. These will
*really* have to use the correct request.
--doc]]--
local function check_garbage (_,i, garbage)
if stringfind(garbage, "/") then
logreport("log", 0, "load", --- ffs use path!
"warning: path in file: lookups is deprecated; ")
logreport("log", 0, "load", "use bracket syntax instead!")
logreport("log", 0, "load",
"position: %d; full match: %q",
i, garbage)
return true
end
return false
end
local featuresep = comma + semicolon
--- modifiers ---------------------------------------------------------
Expand Down Expand Up @@ -601,7 +580,6 @@ local subfont = P"(" * Cg(R'09'^1 / function (s)
--- lookups -----------------------------------------------------------
local fontname = C((1-S":(/")^1) --- like luatex-fonts
local unsupported = Cmt((1-S":(")^1, check_garbage)
local combo = Cg(P"combo", "lookup") * colon * ws
* Cg(combolist, "name")
--- initially we intended file: to emulate the behavior of
Expand All @@ -610,9 +588,7 @@ local combo = Cg(P"combo", "lookup") * colon * ws
--- turns out fontspec and other widely used packages rely on file:
--- with paths already, so well add a less strict rule here. anyways,
--- well emit a warning.
local prefixed = P"file:" * ws * Cg(Cc"path", "lookup")
* Cg(unsupported, "name")
+ Cg(P"name" + "file" + "kpse" + "my", "lookup")
local prefixed = Cg(P"name" + "file" + "kpse" + "my", "lookup")
* colon * ws * Cg(fontname, "name")
local unprefixed = Cg(Cc"anon", "lookup") * Cg(fontname, "name")
--- Bracketedpathlookups: These may contain any character except
Expand Down

0 comments on commit a2a3951

Please sign in to comment.