[latex3-commits] [git/LaTeX3-latex3-luaotfload] dev: Match sanitized names in luaotfload-tool --list (81e0ab6)

Marcel Fabian Krüger tex at 2krueger.de
Thu Feb 13 17:25:45 CET 2020


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

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

commit 81e0ab6308e94ae214e9b709629b30f2d01793fe
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Thu Feb 13 17:24:51 2020 +0100

    Match  sanitized names in luaotfload-tool --list
    
    Closes #104.


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

81e0ab6308e94ae214e9b709629b30f2d01793fe
 src/luaotfload-tool.lua | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/luaotfload-tool.lua b/src/luaotfload-tool.lua
old mode 100644
new mode 100755
index 95a7c8e..d20c3a1
--- a/src/luaotfload-tool.lua
+++ b/src/luaotfload-tool.lua
@@ -1324,6 +1324,7 @@ function actions.list (job)
     else
         criterion = stringexplode(criterion, ":") --> { field, value }
         local asked_value  = criterion[2]
+        local sane_asked_value  = fonts.names.sanitize_fontname(criterion[2])
         criterion          = criterion[1]
         asked_fields       = set_primary_field(asked_fields, criterion)
 
@@ -1335,8 +1336,9 @@ function actions.list (job)
             logreport (false, 2, "list", "Restricting to value %s", asked_value)
             for i=1, nmappings do
                 local entry = mappings[i]
-                if  entry[criterion]
-                and tostring(entry[criterion]) == asked_value
+                local entryvalue = tostring(entry[criterion])
+                if entryvalue
+                and (entryvalue == asked_value or entryvalue == sane_asked_value)
                 then
                     targets[#targets+1] = entry
                 end





More information about the latex3-commits mailing list.