[latex3-commits] [git/LaTeX3-latex3-luaotfload] dev: Drop support for paths in file: lookups (a2a3951)

Marcel Fabian Krüger tex at 2krueger.de
Sun May 29 04:18:02 CEST 2022


Repository : https://github.com/latex3/luaotfload
On branch  : dev
Link       : https://github.com/latex3/luaotfload/commit/a2a39517564f342714094732f62a5cd0475112fe

>---------------------------------------------------------------

commit a2a39517564f342714094732f62a5cd0475112fe
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Sun May 29 04:18:02 2022 +0200

    Drop support for paths in file: lookups
    
    This has been deprecated for about 9 years and is no longer used in
    fontspec since 5 years ago.


>---------------------------------------------------------------

a2a39517564f342714094732f62a5cd0475112fe
 src/luaotfload-parsers.lua | 26 +-------------------------
 1 file changed, 1 insertion(+), 25 deletions(-)

diff --git a/src/luaotfload-parsers.lua b/src/luaotfload-parsers.lua
index e293ea7..2bada98 100644
--- a/src/luaotfload-parsers.lua
+++ b/src/luaotfload-parsers.lua
@@ -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; don’t
-    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 ---------------------------------------------------------
@@ -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
@@ -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 we’ll add a less strict rule here.  anyways,
 --- we’ll 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")
 --- Bracketed “path” lookups: These may contain any character except





More information about the latex3-commits mailing list.