texlive[61207] trunk: luafindfont

commits+karl at tug.org commits+karl at tug.org
Thu Dec 2 22:56:38 CET 2021


Revision: 61207
          http://tug.org/svn/texlive?view=revision&revision=61207
Author:   karl
Date:     2021-12-02 22:56:38 +0100 (Thu, 02 Dec 2021)
Log Message:
-----------
luafindfont

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/Makefile.am
    trunk/Build/source/texk/texlive/linked_scripts/Makefile.in
    trunk/Build/source/texk/texlive/linked_scripts/scripts.lst
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/libexec/ctan2tds
    trunk/Master/tlpkg/tlpsrc/collection-fontutils.tlpsrc

Added Paths:
-----------
    trunk/Build/source/texk/texlive/linked_scripts/luafindfont/
    trunk/Build/source/texk/texlive/linked_scripts/luafindfont/luafindfont.lua
    trunk/Master/bin/aarch64-linux/luafindfont
    trunk/Master/bin/amd64-freebsd/luafindfont
    trunk/Master/bin/amd64-netbsd/luafindfont
    trunk/Master/bin/armhf-linux/luafindfont
    trunk/Master/bin/i386-cygwin/luafindfont
    trunk/Master/bin/i386-freebsd/luafindfont
    trunk/Master/bin/i386-linux/luafindfont
    trunk/Master/bin/i386-netbsd/luafindfont
    trunk/Master/bin/i386-solaris/luafindfont
    trunk/Master/bin/universal-darwin/luafindfont
    trunk/Master/bin/win32/luafindfont.exe
    trunk/Master/bin/x86_64-cygwin/luafindfont
    trunk/Master/bin/x86_64-darwinlegacy/luafindfont
    trunk/Master/bin/x86_64-linux/luafindfont
    trunk/Master/bin/x86_64-linuxmusl/luafindfont
    trunk/Master/bin/x86_64-solaris/luafindfont
    trunk/Master/texmf-dist/doc/man/man1/luafindfont.1
    trunk/Master/texmf-dist/doc/man/man1/luafindfont.man1.pdf
    trunk/Master/texmf-dist/doc/support/luafindfont/
    trunk/Master/texmf-dist/doc/support/luafindfont/CHANGELOG
    trunk/Master/texmf-dist/doc/support/luafindfont/README.md
    trunk/Master/texmf-dist/doc/support/luafindfont/exa01.txt
    trunk/Master/texmf-dist/doc/support/luafindfont/exa02.txt
    trunk/Master/texmf-dist/doc/support/luafindfont/exa03.txt
    trunk/Master/texmf-dist/doc/support/luafindfont/exa04.txt
    trunk/Master/texmf-dist/doc/support/luafindfont/exa05.txt
    trunk/Master/texmf-dist/doc/support/luafindfont/exa06.txt
    trunk/Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.pdf
    trunk/Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.tex
    trunk/Master/texmf-dist/scripts/luafindfont/
    trunk/Master/texmf-dist/scripts/luafindfont/luafindfont.lua
    trunk/Master/tlpkg/tlpsrc/luafindfont.tlpsrc

Modified: trunk/Build/source/texk/texlive/linked_scripts/Makefile.am
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/Makefile.am	2021-12-02 21:52:29 UTC (rev 61206)
+++ trunk/Build/source/texk/texlive/linked_scripts/Makefile.am	2021-12-02 21:56:38 UTC (rev 61207)
@@ -167,6 +167,7 @@
 	lilyglyphs/lily-image-commands.py \
 	lilyglyphs/lily-rebuild-pdfs.py \
 	ltximg/ltximg.pl \
+	luafindfont/luafindfont.lua \
 	luaotfload/luaotfload-tool.lua \
 	lwarp/lwarpmk.lua \
 	m-tx/m-tx.lua \

Modified: trunk/Build/source/texk/texlive/linked_scripts/Makefile.in
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/Makefile.in	2021-12-02 21:52:29 UTC (rev 61206)
+++ trunk/Build/source/texk/texlive/linked_scripts/Makefile.in	2021-12-02 21:56:38 UTC (rev 61207)
@@ -384,6 +384,7 @@
 	lilyglyphs/lily-image-commands.py \
 	lilyglyphs/lily-rebuild-pdfs.py \
 	ltximg/ltximg.pl \
+	luafindfont/luafindfont.lua \
 	luaotfload/luaotfload-tool.lua \
 	lwarp/lwarpmk.lua \
 	m-tx/m-tx.lua \

Added: trunk/Build/source/texk/texlive/linked_scripts/luafindfont/luafindfont.lua
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/luafindfont/luafindfont.lua	                        (rev 0)
+++ trunk/Build/source/texk/texlive/linked_scripts/luafindfont/luafindfont.lua	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1,461 @@
+#!/usr/bin/env texlua
+-- % $Id: luafindfont.lua 330 2021-11-28 13:47:56Z herbert $
+
+-----------------------------------------------------------------------
+--         FILE:  luafindfont.lua
+--  DESCRIPTION:  search for fonts in the database
+-- REQUIREMENTS:  luatex v.0.80 or later; packages lualibs, xindex-lapp
+--       AUTHOR:  Herbert Voß  (C) 2021-11-27
+-----------------------------------------------------------------------
+        luafindfont = luafindfont or { }
+   local version = 0.04
+luafindfont.version = version
+
+--[[
+Search the font database for fontnames. The database is used
+by Lua(La)TeX and created by default with the first run of
+Lua(La)TeX. If there is no such data file then "luafindfont" 
+will execute the command to create it.
+
+luafindfont(1)
+
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%%    http://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+
+Report bugs to  hvoss at tug.org
+
+]]
+
+kpse.set_program_name("luatex")
+local f = kpse.find_file("lualibs.lua")
+
+require("lualibs")  -- all part of LuaTeX
+--require("luafindfont-utflib")
+
+if #arg == 0 then
+  print("I need at least one argument or option! Will exit ...")
+  os.exit()
+end
+
+local args_verbose = 0
+local args_nosymbolixnames = 0
+local args_otfinfo = 0
+local args_info = 0
+local args_max_string = 90
+
+local i = 1
+while i <= #arg do
+  if arg[i] == "-h" or arg[i] == "--help" then
+    print("Version "..version..", Copyright 2021 by Herbert Voß") 
+    print([[Syntax: luafintfont [options] <font> 
+    By default the Lua program 'luafindfont' creates a list of the
+    fonts which have in its names the given string.  
+
+    parameter handling
+    -h,--help
+    -n,--nosymbolicnames
+    -o,--otfinfo (default 0)
+    -i,--info (default 0)
+    -v, --verbose
+    -m,--max_string (default 90)
+    <font> (string)  ]])
+  elseif arg[i] == "-v" or arg[i] == "--verbose" then
+    args_verbose = 1
+  elseif arg[i] == "-n" or arg[i] == "--nosymbolicnames" then
+    args_nosymbolicnames = 1
+  elseif arg[i] == "-o" or arg[i] == "--otfinfo" then
+    local fontNr = tonumber(arg[i+1])
+    if fontNr then
+      args_otfinfo = fontNr
+      i = i + 1
+    else
+      print("Option -o needs a following fontnumber!")
+      args_otfinfo = 0
+    end
+  elseif arg[i] == "-i" or arg[i] == "--info" then
+    local fontNr = tonumber(arg[i+1])
+    if fontNr then
+      args_info = fontNr
+      i = i + 1
+    else
+      print("Option -i needs a following fontnumber!")
+      args_info = 0
+    end
+  elseif arg[i] == "-m" or arg[i] == "--max_string" then
+    local string_len = tonumber(arg[i+1])
+    if string_len then
+      args_max_string = string_len
+      i = i + 1
+    else
+      print("Option -m needs a following fontnumber!")
+      args_max_string = 90
+    end
+  else
+    args_font = arg[i]
+  end    
+  i = i + 1
+end
+
+if not args_font then
+  print("No fontname given, will close ...")
+  os.exit()
+end
+
+local vlevel = args_verbose
+local otfinfo = args_otfinfo
+local info = args_info
+local noSymbolicNames = args_nosymbolicnames
+local maxStrLength = args_max_string
+local font_str = args_font
+
+local luaVersion = _VERSION
+print("We are using "..luaVersion)
+print('Looking for font \"'..font_str..'\"')
+
+function getFileParts(fullpath,part)
+  local path, file, ext = string.match(fullpath, "(.-)([^/]-([^%.]+))$")
+  if part == "path" then return path 
+  elseif part == "ext" then return ext
+  else return file end
+end
+
+function getFileLocation()
+  local cachepaths = kpse.expand_var('$TEXMFCACHE') or ""
+  if cachepaths == "" or cachepaths == "$TEXMFCACHE" then
+    cachepaths = kpse.expand_var('$TEXMFVAR') or ""
+  end
+  if vlevel > 0 then print("cachepaths: ",cachepaths) end
+  if cachepaths == "" then
+    print("umghhh ....")
+    print("No cache path found ... ")
+    return ""
+  end  
+  if os.type == "windows" then
+    paths = string.split(cachepaths,";")
+  else
+    paths = string.split(cachepaths,":")
+  end
+  if vlevel > 0 then print ("Pathes: ", paths[1], paths[2]) end
+  local file = paths[1].."/luatex-cache/generic/names" 
+  if vlevel > 0 then print("try: ",file) end
+  local f,err = io.open (file.."/test.tmp", "w") 
+  if not f and #paths > 1 then
+    if vlevel > 0 then print("first path has no file, I'll try the second one ...") end
+    file = paths[2].."/luatex-cache/generic/names"
+  if vlevel > 0 then print("try: ",file) end
+    f,err = io.open (file.."/test.tmp", "w") 
+    if not f then
+      print("Error getting file location: \n",err)
+      return ""
+    else
+      f:close()
+    end
+  else
+    f:close()
+  end
+-- print("File: "..fontListFile)
+  return file
+end
+
+function readBinaryOrZippedFile(file)
+  print("Check for file "..file)
+  local f,err = io.open (file..".luc", "rb") 
+  if not f then
+    if vlevel > 0 then print("There is no binary data file ... ") end
+    f,err = io.open (file..".lua.gz", "r") 
+    if not f then
+      if vlevel > 0 then print("There is no gzipped data file ... ") end
+      f,err = io.open (file..".lua", "r") 
+      if not f then
+        if vlevel > 0 then print("There is no data file ... ") end
+        print("Error reading file: ",err)
+        return nil
+      else
+        if vlevel > 0 then print("Found a normal data file ... ") end
+        local str = dofile(f)
+        f:close()
+        return str
+      end
+    else  
+      if vlevel > 0 then print("Found a gzipped data file ... ") end
+      local str = f:read("*all")
+      local str2 = loadstring(gzip.decompress(str))
+      str = str2()
+      f:close()
+      return str
+    end
+  else
+    if vlevel > 0 then print("Found a binary data file ... ") end
+    local chunk = f:read"*all"
+    f:close()
+    local func = load (chunk, "b")
+    str = func()
+    return str
+  end
+end
+
+function compareEntries(f1, f2)
+  if (f1["basename"]   == f2["basename"])   and
+     (f1["familyname"] == f2["familyname"]) and
+     (f1["fullpath"]   == f2["fullpath"]) then
+     return true 
+  else 
+    return false
+  end
+end
+
+
+local fontData = {}
+local fontListFile = getFileLocation()
+if fontListFile == "" then
+    print("There is no cached font file list!")
+    print('Will run at first "luaotfload-tool --update --force" ... Wait a minute, please ...')
+    local exrun = io.popen('luaotfload-tool --update --force', 'r')
+    local output = exrun:read('*all')
+    print(output)
+    exrun:close()
+    fontListFile = getFileLocation()
+end
+
+fontListFile = fontListFile.."/luaotfload-names"
+fontData = readBinaryOrZippedFile(fontListFile)
+
+if not fontData then   
+  print("umghhh ....")
+  print("It does not work! I'll give it up ... :-(")
+  os.exit()
+end
+
+--print(require 'xindex-pretty'.dump(fontData)) --["families"]["system"]["otf"]))
+
+fontDataMap = fontData["mappings"]
+fontFilesTable = fontData["files"]["full"]
+
+--print(require 'xindex-pretty'.dump(fontFilesTable)) --["families"]["system"]["otf"]))
+--print(require 'xindex-pretty'.dump(fontFilesTable["bare"]["system"]["otf"])) --["families"]["system"]["otf"]))
+
+--[[
+print("Dateiliste für System->OTF")
+for i, v in ipairs(fontFilesTable) do 
+  print(i,v)
+end
+]]
+
+table.sort(fontDataMap, 
+    function(a,b) 
+	if not a["basename"] or not b["basename"] then 
+	    return false 
+	else 
+	    return string.lower(a["basename"]) < string.lower(b["basename"]) 
+	end end)
+-- strip duplicates
+local newFontDataMap = {}
+if #fontDataMap > 0 then
+    newFontDataMap[1] = fontDataMap[1]
+end
+for i = 2,#fontDataMap do
+    if not compareEntries(fontDataMap[i],newFontDataMap[#newFontDataMap]) then
+	newFontDataMap[#newFontDataMap+1] = fontDataMap[i]
+    end
+end
+
+fontDataMap = newFontDataMap
+--for i, v in ipairs(fontDataMap) do 
+--  print(i, v["basename"],v["familyname"], v["fullpath"]) 
+-- end
+
+local j = 1
+local fontList = {}
+local l_max = {1, 1, 1}
+for i, v in ipairs(fontDataMap) do 
+  if v["familyname"] then
+      if string.find (v["familyname"], font_str, 1, true) or (font_str == "*") then
+--	print(string.format("%2d. %30s %20s  %50s",j,v["basename"],v["familyname"],v["fullpath"])) 
+        fontList[#fontList+1] = v
+        local fullpath = getFileParts(v["fullpath"],"path")  -- strip file name
+        local basename = v["basename"]
+--      local basename = string.fromutf8(v["basename"])
+        if string.len(basename) > l_max[1] then l_max[1] = string.len(basename) end
+        if string.len(v["familyname"]) > l_max[2] then l_max[2] = string.len(v["familyname"]) end
+        if string.len(fullpath) > l_max[3] then l_max[3] = string.len(fullpath) end
+	j = j + 1
+      end
+  end
+end
+
+-- print(l_max[1],l_max[2],l_max[3])
+if l_max[3] > maxStrLength then l_max[3] = maxStrLength end
+
+local minChars = 26
+local Fontname = "Fontname"
+local Path = "Path"
+local SymbolicName = "Symbolic Name"
+local lfdNr = "Nr."
+if (font_str ~= "*") and not noSymbolicNames then
+    print(string.format("%4s %"..l_max[1].."s %"..l_max[2].."s  %"..l_max[3].."s",lfdNr,Fontname,SymbolicName,Path)) 
+  else
+    print(string.format("%4s %"..l_max[1].."s  %"..l_max[3].."s",lfdNr,Fontname,Path)) 
+end
+
+for i, v in ipairs(fontList) do
+  local path = getFileParts(v["fullpath"],"path")
+  if string.len(path) > l_max[3] then
+    path = string.sub (path, 1, minChars).."..."..string.sub (path, string.len(path)-maxStrLength+minChars+4)    
+  end
+  if (font_str ~= "*") and not noSymbolicNames then
+    print(string.format("%4d. %"..l_max[1].."s %"..l_max[2].."s  %"..l_max[3].."s",i,v["basename"],v["familyname"],path)) 
+  else
+    print(string.format("%4d. %"..l_max[1].."s  %"..l_max[3].."s",i,v["basename"],path)) 
+  end
+end
+
+if otfinfo > 0 then
+  print()
+  print("Run otfinfo:"..otfinfo)
+  local font = fontList[otfinfo]["fullpath"]
+  local exrun = io.popen("otfinfo -i \""..font.."\"", 'r') -- ".." font may have spaces
+  local output = exrun:read('*all')
+  print(output)
+  exrun:close()
+end
+
+if info > 0 then
+  font = fontList[info]["familyname"]
+  print("\nFont: "..font)
+  local font_dir = {"local","system","texmf"}
+  local font_ext = {"ttf","otf","ttc"}
+  for j = 1,#font_dir do
+    for i = 1,#font_ext do
+      local fonttype = ""
+      local ext = font_ext[i]
+      local dir = font_dir[j]
+      if fontData["families"][dir][ext]  then  -- font extension exists?
+        local entry = fontData["families"][dir][ext][font]
+        if entry then
+          if entry["r"]  then fonttype = fonttype.."Regular "      end
+          if entry["b"]  then fonttype = fonttype.."| Bold "       end
+          if entry["i"]  then fonttype = fonttype.."| Italic "     end
+          if entry["bi"] then fonttype = fonttype.."| BoldItalic"  end
+          io.write("Fonttype "..ext.."("..dir..") --> ")
+          if #fonttype > 0 then
+            print("| "..fonttype.." |")
+          else
+            print(" undefined ") --- no regular definiert
+          end
+        else
+          print()
+        end
+      end
+    end
+  end
+end
+--print(require 'xindex-pretty'.dump(fontData["families"]["system"]["otf"])) --["families"]["system"]["otf"]))
+
+
+--[[
+
+ ["families"]={
+  ["local"]={},
+  ["system"]={
+   ["otf"]={
+    ["adobecaslonpro"]={
+     ["b"]={
+      ["default"]=3143,
+     },
+     ["bi"]={
+      ["default"]=3146,
+     },
+     ["i"]={
+      ["default"]=3145,
+     },
+     ["r"]={
+      ["default"]=3147,
+     },
+    },
+   },
+  },
+ },
+
+]]
+
+--[[
+This is a sketch of the luaotfload db:
+
+    type dbobj = {
+        families    : familytable;
+        fontnames   : fontnametable;
+        files       : filemap;
+        status      : filestatus;
+        mappings    : fontentry list;
+        meta        : metadata;
+    }
+    and familytable = {
+        local  : (format, familyentry) hash; // specified with include dir
+        texmf  : (format, familyentry) hash;
+        system : (format, familyentry) hash;
+    }
+    and familyentry = {
+        r  : sizes; // regular
+        i  : sizes; // italic
+        b  : sizes; // bold
+        bi : sizes; // bold italic
+    }
+    and sizes = {
+        default : int;              // points into mappings or names
+        optical : (int, int) list;  // design size -> index entry
+    }
+    and fontnametable = {
+        local  : (format, index) hash;
+        texmf  : (format, index) hash;
+        system : (format, index) hash;
+    }
+    and metadata = {
+        created     : string       // creation time
+        formats     : string list; // { "otf", "ttf", "ttc" }
+        local       : bool;        (* set if local fonts were added to the db *)
+        modified    : string       // modification time
+        statistics  : TODO;        // created when built with "--stats"
+        version     : float;       // index version
+    }
+    and filemap = { // created by generate_filedata()
+        base : {
+            local  : (string, int) hash; // basename -> idx
+            system : (string, int) hash;
+            texmf  : (string, int) hash;
+        };
+        bare : {
+            local  : (string, (string, int) hash) hash; // location -> (barename -> idx)
+            system : (string, (string, int) hash) hash;
+            texmf  : (string, (string, int) hash) hash;
+        };
+        full : (int, string) hash; // idx -> full path
+    }
+    and fontentry = { // finalized by collect_families()
+        basename             : string;   // file name without path "foo.otf"
+        conflicts            : { barename : int; basename : int }; // filename conflict with font at index; happens with subfonts
+        familyname           : string;   // sanitized name of the font family the font belongs to, usually from the names table
+        fontname             : string;   // sanitized name of the font
+        format               : string;   // "otf" | "ttf" | "afm" (* | "pfb" *)
+        fullname             : string;   // sanitized full name of the font including style modifiers
+        fullpath             : string;   // path to font in filesystem
+        index                : int;      // index in the mappings table
+        italicangle          : float;    // italic angle; non-zero with oblique faces
+        location             : string;   // "texmf" | "system" | "local"
+        plainname            : string;   // unsanitized font name
+        typographicsubfamily : string;   // sanitized preferred subfamily (names table 14)
+        psname               : string;   // PostScript name
+        size                 : (false | float * float * float);  // if available, size info from the size table converted from decipoints
+        subfamily            : string;   // sanitized subfamily (names table 2)
+        subfont              : (int | bool);     // integer if font is part of a TrueType collection ("ttc")
+        version              : string;   // font version string
+        weight               : int;      // usWeightClass
+    }
+    and filestatus = (string,       // fullname
+                      { index       : int list; // pointer into mappings
+                        timestamp   : int;      }) dict
+]]


Property changes on: trunk/Build/source/texk/texlive/linked_scripts/luafindfont/luafindfont.lua
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Modified: trunk/Build/source/texk/texlive/linked_scripts/scripts.lst
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/scripts.lst	2021-12-02 21:52:29 UTC (rev 61206)
+++ trunk/Build/source/texk/texlive/linked_scripts/scripts.lst	2021-12-02 21:56:38 UTC (rev 61207)
@@ -33,6 +33,12 @@
 texlive-extra/texlinks.sh
 texlive-extra/xetex-unsafe.sh
 texlive-extra/xelatex-unsafe.sh
+texosquery/texosquery.sh
+texosquery/texosquery-jre5.sh
+texosquery/texosquery-jre8.sh
+tikztosvg/tikztosvg
+typeoutfileinfo/typeoutfileinfo.sh
+wordcount/wordcount.sh
 a2ping/a2ping.pl
 accfonts/mkt1font
 accfonts/vpl2ovp
@@ -103,6 +109,7 @@
 lilyglyphs/lily-image-commands.py
 lilyglyphs/lily-rebuild-pdfs.py
 ltximg/ltximg.pl
+luafindfont/luafindfont.lua
 luaotfload/luaotfload-tool.lua
 lwarp/lwarpmk.lua
 m-tx/m-tx.lua

Added: trunk/Master/bin/aarch64-linux/luafindfont
===================================================================
--- trunk/Master/bin/aarch64-linux/luafindfont	                        (rev 0)
+++ trunk/Master/bin/aarch64-linux/luafindfont	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/luafindfont/luafindfont.lua
\ No newline at end of file


Property changes on: trunk/Master/bin/aarch64-linux/luafindfont
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/amd64-freebsd/luafindfont
===================================================================
--- trunk/Master/bin/amd64-freebsd/luafindfont	                        (rev 0)
+++ trunk/Master/bin/amd64-freebsd/luafindfont	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/luafindfont/luafindfont.lua
\ No newline at end of file


Property changes on: trunk/Master/bin/amd64-freebsd/luafindfont
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/amd64-netbsd/luafindfont
===================================================================
--- trunk/Master/bin/amd64-netbsd/luafindfont	                        (rev 0)
+++ trunk/Master/bin/amd64-netbsd/luafindfont	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/luafindfont/luafindfont.lua
\ No newline at end of file


Property changes on: trunk/Master/bin/amd64-netbsd/luafindfont
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/armhf-linux/luafindfont
===================================================================
--- trunk/Master/bin/armhf-linux/luafindfont	                        (rev 0)
+++ trunk/Master/bin/armhf-linux/luafindfont	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/luafindfont/luafindfont.lua
\ No newline at end of file


Property changes on: trunk/Master/bin/armhf-linux/luafindfont
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/i386-cygwin/luafindfont
===================================================================
--- trunk/Master/bin/i386-cygwin/luafindfont	                        (rev 0)
+++ trunk/Master/bin/i386-cygwin/luafindfont	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/luafindfont/luafindfont.lua
\ No newline at end of file


Property changes on: trunk/Master/bin/i386-cygwin/luafindfont
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/i386-freebsd/luafindfont
===================================================================
--- trunk/Master/bin/i386-freebsd/luafindfont	                        (rev 0)
+++ trunk/Master/bin/i386-freebsd/luafindfont	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/luafindfont/luafindfont.lua
\ No newline at end of file


Property changes on: trunk/Master/bin/i386-freebsd/luafindfont
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/i386-linux/luafindfont
===================================================================
--- trunk/Master/bin/i386-linux/luafindfont	                        (rev 0)
+++ trunk/Master/bin/i386-linux/luafindfont	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/luafindfont/luafindfont.lua
\ No newline at end of file


Property changes on: trunk/Master/bin/i386-linux/luafindfont
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/i386-netbsd/luafindfont
===================================================================
--- trunk/Master/bin/i386-netbsd/luafindfont	                        (rev 0)
+++ trunk/Master/bin/i386-netbsd/luafindfont	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/luafindfont/luafindfont.lua
\ No newline at end of file


Property changes on: trunk/Master/bin/i386-netbsd/luafindfont
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/i386-solaris/luafindfont
===================================================================
--- trunk/Master/bin/i386-solaris/luafindfont	                        (rev 0)
+++ trunk/Master/bin/i386-solaris/luafindfont	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/luafindfont/luafindfont.lua
\ No newline at end of file


Property changes on: trunk/Master/bin/i386-solaris/luafindfont
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/universal-darwin/luafindfont
===================================================================
--- trunk/Master/bin/universal-darwin/luafindfont	                        (rev 0)
+++ trunk/Master/bin/universal-darwin/luafindfont	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/luafindfont/luafindfont.lua
\ No newline at end of file


Property changes on: trunk/Master/bin/universal-darwin/luafindfont
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/win32/luafindfont.exe
===================================================================
(Binary files differ)

Index: trunk/Master/bin/win32/luafindfont.exe
===================================================================
--- trunk/Master/bin/win32/luafindfont.exe	2021-12-02 21:52:29 UTC (rev 61206)
+++ trunk/Master/bin/win32/luafindfont.exe	2021-12-02 21:56:38 UTC (rev 61207)

Property changes on: trunk/Master/bin/win32/luafindfont.exe
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/bin/x86_64-cygwin/luafindfont
===================================================================
--- trunk/Master/bin/x86_64-cygwin/luafindfont	                        (rev 0)
+++ trunk/Master/bin/x86_64-cygwin/luafindfont	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/luafindfont/luafindfont.lua
\ No newline at end of file


Property changes on: trunk/Master/bin/x86_64-cygwin/luafindfont
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/x86_64-darwinlegacy/luafindfont
===================================================================
--- trunk/Master/bin/x86_64-darwinlegacy/luafindfont	                        (rev 0)
+++ trunk/Master/bin/x86_64-darwinlegacy/luafindfont	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/luafindfont/luafindfont.lua
\ No newline at end of file


Property changes on: trunk/Master/bin/x86_64-darwinlegacy/luafindfont
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/x86_64-linux/luafindfont
===================================================================
--- trunk/Master/bin/x86_64-linux/luafindfont	                        (rev 0)
+++ trunk/Master/bin/x86_64-linux/luafindfont	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/luafindfont/luafindfont.lua
\ No newline at end of file


Property changes on: trunk/Master/bin/x86_64-linux/luafindfont
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/x86_64-linuxmusl/luafindfont
===================================================================
--- trunk/Master/bin/x86_64-linuxmusl/luafindfont	                        (rev 0)
+++ trunk/Master/bin/x86_64-linuxmusl/luafindfont	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/luafindfont/luafindfont.lua
\ No newline at end of file


Property changes on: trunk/Master/bin/x86_64-linuxmusl/luafindfont
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/bin/x86_64-solaris/luafindfont
===================================================================
--- trunk/Master/bin/x86_64-solaris/luafindfont	                        (rev 0)
+++ trunk/Master/bin/x86_64-solaris/luafindfont	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1 @@
+link ../../texmf-dist/scripts/luafindfont/luafindfont.lua
\ No newline at end of file


Property changes on: trunk/Master/bin/x86_64-solaris/luafindfont
___________________________________________________________________
Added: svn:special
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/man/man1/luafindfont.1
===================================================================
--- trunk/Master/texmf-dist/doc/man/man1/luafindfont.1	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/man/man1/luafindfont.1	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1,124 @@
+.\" Manpage for luafindfont.
+.\" Contact hvoss at tug.org to correct errors or typos.
+.TH luafindfont 1 "29 nov 2021" "0.04" "luafindfont man page"
+.SH NAME
+luafindfont
+\- retrieve font informations of all installed system and TeX fonts.
+.SH SYNOPSIS
+luafindfont [options] <fontname>
+.SH DESCRIPTION
+This command lists informations about installed otf|ttf|ttc fonts,
+installed by the system and by the TeX distribution
+.SH OPTIONS
+.IP -h,--help
+obvious ... :-)
+.IP -o,--otfinfo (default 0)
+Use the program otfinfo for the font with the given number
+.IP -i,--info (default 0)
+List the given fontstyles (regular, bold, italic, bolditalic)
+for the font with the given number
+.IP -v,--verbose  Verbosity level
+Give more informations, by now only -v works
+.IP -m,--max_string (default 90)
+The maximum of the stringlength of the full path of fonts
+.IP -n,--nosymbolicnames
+The fontlist contains only fontfile and fontpath
+.SH EXAMPLES
+
+$ luafindfont libertinssans
+
+.Pp 
+Lists all fonts which have names or part of like libertinussans 
+
+.nf
+.ft CW
+We are using Lua 5.3
+Check for file /usr/local/texlive/texmf-var/luatex-cache/generic/names/luaotfload-names
+ 1.    LibertinusSans-Bold.otf libertinussans                          /Users/voss/Library/Fonts/libertinus-fonts/LibertinusSans-Bold.otf
+ 2.    LibertinusSans-Bold.otf libertinussans  /usr/local/texlive/texmf-d...onts/opentype/public/libertinus-fonts/LibertinusSans-Bold.otf
+ 3.  LibertinusSans-Italic.otf libertinussans                        /Users/voss/Library/Fonts/libertinus-fonts/LibertinusSans-Italic.otf
+ 4.  LibertinusSans-Italic.otf libertinussans  /usr/local/texlive/texmf-d...ts/opentype/public/libertinus-fonts/LibertinusSans-Italic.otf
+ 5. LibertinusSans-Regular.otf libertinussans                       /Users/voss/Library/Fonts/libertinus-fonts/LibertinusSans-Regular.otf
+ 6. LibertinusSans-Regular.otf libertinussans  /usr/local/texlive/texmf-d...s/opentype/public/libertinus-fonts/LibertinusSans-Regular.otf
+.ft R
+.fi
+
+.Pp
+The --otfinfo:
+
+$ luafindfont -o 3 libertinussans
+
+.Pp
+This produces the following output:
+
+.nf
+.ft CW
+We are using Lua 5.3
+Check for file /usr/local/texlive/texmf-var/luatex-cache/generic/names/luaotfload-names
+ 1.    LibertinusSans-Bold.otf libertinussans                          /Users/voss/Library/Fonts/libertinus-fonts/LibertinusSans-Bold.otf
+ 2.    LibertinusSans-Bold.otf libertinussans  /usr/local/texlive/texmf-d...onts/opentype/public/libertinus-fonts/LibertinusSans-Bold.otf
+ 3.  LibertinusSans-Italic.otf libertinussans                        /Users/voss/Library/Fonts/libertinus-fonts/LibertinusSans-Italic.otf
+ 4.  LibertinusSans-Italic.otf libertinussans  /usr/local/texlive/texmf-d...ts/opentype/public/libertinus-fonts/LibertinusSans-Italic.otf
+ 5. LibertinusSans-Regular.otf libertinussans                       /Users/voss/Library/Fonts/libertinus-fonts/LibertinusSans-Regular.otf
+ 6. LibertinusSans-Regular.otf libertinussans  /usr/local/texlive/texmf-d...s/opentype/public/libertinus-fonts/LibertinusSans-Regular.otf
+
+Run otfinfo:3
+Family:              Libertinus Sans
+Subfamily:           Italic
+Full name:           Libertinus Sans Italic
+PostScript name:     LibertinusSans-Italic
+Version:             Version 7.020;RELEASE
+Unique ID:           1.000;QUE ;LibertinusSans-Italic
+Designer:            Philipp H. Poll, Khaled Hosny
+Manufacturer:        Caleb Maclennan
+Vendor URL:          https://github.com/alerque/libertinus
+Copyright:           Copyright © 2012-2020 The Libertinus Project Authors.
+License URL:         https://scripts.sil.org/OFL
+License Description: This Font Software is licensed under the SIL Open Font License, Version 1.1
+Vendor ID:           QUE
+
+.ft R
+.fi
+
+.Pp
+The --nosymbilcnames:
+
+$ luafindfont -n 
+
+.Pp
+This produces the following output:
+
+.nf
+.ft CW
+bash-3.2$ ./luafindfont.lua -n minion
+We are using Lua 5.3
+Check for file /usr/local/texlive/texmf-var/luatex-cache/generic/names/luaotfload-names
+ Nr.                 Fontname                                   Path
+   1.      MinionMath-Bold.otf  /Users/voss/Library/Fonts/MinionMath/
+   2.   MinionMath-Regular.otf  /Users/voss/Library/Fonts/MinionMath/
+   3.       MinionPro-Bold.otf   /Users/voss/Library/Fonts/MinionPro/
+   4.     MinionPro-BoldCn.otf   /Users/voss/Library/Fonts/MinionPro/
+   5.   MinionPro-BoldCnIt.otf   /Users/voss/Library/Fonts/MinionPro/
+   6.     MinionPro-BoldIt.otf   /Users/voss/Library/Fonts/MinionPro/
+   7.       MinionPro-Capt.otf   /Users/voss/Library/Fonts/MinionPro/
+   8.       MinionPro-Disp.otf   /Users/voss/Library/Fonts/MinionPro/
+   9.         MinionPro-It.otf   /Users/voss/Library/Fonts/MinionPro/
+  10.     MinionPro-Medium.otf   /Users/voss/Library/Fonts/MinionPro/
+  11.   MinionPro-MediumIt.otf   /Users/voss/Library/Fonts/MinionPro/
+  12.    MinionPro-Regular.otf   /Users/voss/Library/Fonts/MinionPro/
+  13.   MinionPro-Semibold.otf   /Users/voss/Library/Fonts/MinionPro/
+  14. MinionPro-SemiboldIt.otf   /Users/voss/Library/Fonts/MinionPro/
+  15.       MinionPro-Subh.otf   /Users/voss/Library/Fonts/MinionPro/
+.ft R
+.fi
+
+.SH See also
+See luafindfont-doc.pdf for more details
+.SH BUGS
+No known bugs.
+.SH AUTHOR
+Herbert Voß (hvoss at tug.org)
+.SH LICENSE
+Permission is granted to copy, distribute and/or modify this software
+under the terms of the LaTeX Project Public License, version 1.3.
+


Property changes on: trunk/Master/texmf-dist/doc/man/man1/luafindfont.1
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/man/man1/luafindfont.man1.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/man/man1/luafindfont.man1.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/man/man1/luafindfont.man1.pdf	2021-12-02 21:52:29 UTC (rev 61206)
+++ trunk/Master/texmf-dist/doc/man/man1/luafindfont.man1.pdf	2021-12-02 21:56:38 UTC (rev 61207)

Property changes on: trunk/Master/texmf-dist/doc/man/man1/luafindfont.man1.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/support/luafindfont/CHANGELOG
===================================================================
--- trunk/Master/texmf-dist/doc/support/luafindfont/CHANGELOG	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/support/luafindfont/CHANGELOG	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1,9 @@
+0.04  2021-11-29  - rename the lua file to luafindfont
+                  - do not use xindex-lapp, handle the options by
+                    standard arg field
+0.03  2021-11-27  - added manpage
+                  - added "*" for output of all fonts
+                  - added option -n for no output of symbolic names
+                  - updated documentation
+0.02  2021-11-24  - correct README.md file
+0.01  2021-11-24  - first CTAN version

Added: trunk/Master/texmf-dist/doc/support/luafindfont/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/support/luafindfont/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/support/luafindfont/README.md	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1,41 @@
+# luafindfont
+
+Searching for fonts in the font database. It needs Lua 5.3 which
+will be included in at least LuaTeX 1.09 (TeXLive 2019)
+
+## Usage
+The syntax of `luafindfont`
+
+```
+luafindfont [options] <font name> 
+```
+
+parameter handling
+-    -h,--help
+-    -o,--otfinfo (default 0)
+-    -i,--info (default 0)
+-    -v,--verbose
+-    -m,--max_string (default 90)
+-    -n,--nosymbolicnames
+-    <font> (string)  
+
+
+## Examples:
+
+```
+-luafindfont times 
+-luafindfont palatino -o 3
+-luafindfont -i 3 -m 50 arial
+```
+
+## copyright
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%%    http://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+
+
+hvoss at tug.org


Property changes on: trunk/Master/texmf-dist/doc/support/luafindfont/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/support/luafindfont/exa01.txt
===================================================================
--- trunk/Master/texmf-dist/doc/support/luafindfont/exa01.txt	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/support/luafindfont/exa01.txt	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1,11 @@
+We are using Lua 5.3
+Check for file /usr/local/texlive/2021/texmf-var/luatex-cache/generic/names/luaotfload-names
+ 1.      Segoe UI Symbol.ttf segoeuisymbol       /Users/voss/Library/Fonts/Segoe/Segoe UI Symbol.ttf
+ 2.          Segoe_Print.ttf    segoeprint           /Users/voss/Library/Fonts/Segoe/Segoe_Print.ttf
+ 3.     Segoe_Print_Bold.ttf    segoeprint      /Users/voss/Library/Fonts/Segoe/Segoe_Print_Bold.ttf
+ 4.         Segoe_Script.ttf   segoescript          /Users/voss/Library/Fonts/Segoe/Segoe_Script.ttf
+ 5.    Segoe_Script_Bold.ttf   segoescript     /Users/voss/Library/Fonts/Segoe/Segoe_Script_Bold.ttf
+ 6.             Segoe_UI.ttf       segoeui              /Users/voss/Library/Fonts/Segoe/Segoe_UI.ttf
+ 7.        Segoe_UI_Bold.ttf       segoeui         /Users/voss/Library/Fonts/Segoe/Segoe_UI_Bold.ttf
+ 8. Segoe_UI_Bold_Italic.ttf       segoeui  /Users/voss/Library/Fonts/Segoe/Segoe_UI_Bold_Italic.ttf
+ 9.      Segoe_UI_Italic.ttf       segoeui       /Users/voss/Library/Fonts/Segoe/Segoe_UI_Italic.ttf


Property changes on: trunk/Master/texmf-dist/doc/support/luafindfont/exa01.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/support/luafindfont/exa02.txt
===================================================================
--- trunk/Master/texmf-dist/doc/support/luafindfont/exa02.txt	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/support/luafindfont/exa02.txt	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1,16 @@
+We are using Lua 5.3
+Check for file /usr/local/texlive/2021/texmf-var/luatex-cache/generic/names/luaotfload-names
+ 1.      LibertinusKeyboard-Regular.otf      libertinuskeyboard  /usr/local/texlive/2021/te...Regular.otf
+ 2.          LibertinusMath-Regular.otf          libertinusmath  /usr/local/texlive/2021/te...Regular.otf
+ 3.          LibertinusMono-Regular.otf          libertinusmono  /usr/local/texlive/2021/te...Regular.otf
+ 4.             LibertinusSans-Bold.otf          libertinussans  /usr/local/texlive/2021/te...ns-Bold.otf
+ 5.           LibertinusSans-Italic.otf          libertinussans  /usr/local/texlive/2021/te...-Italic.otf
+ 6.          LibertinusSans-Regular.otf          libertinussans  /usr/local/texlive/2021/te...Regular.otf
+ 7.            LibertinusSerif-Bold.otf         libertinusserif  /usr/local/texlive/2021/te...if-Bold.otf
+ 8.      LibertinusSerif-BoldItalic.otf         libertinusserif  /usr/local/texlive/2021/te...dItalic.otf
+ 9.          LibertinusSerif-Italic.otf         libertinusserif  /usr/local/texlive/2021/te...-Italic.otf
+10.         LibertinusSerif-Regular.otf         libertinusserif  /usr/local/texlive/2021/te...Regular.otf
+11.        LibertinusSerif-Semibold.otf         libertinusserif  /usr/local/texlive/2021/te...emibold.otf
+12.  LibertinusSerif-SemiboldItalic.otf         libertinusserif  /usr/local/texlive/2021/te...dItalic.otf
+13.  LibertinusSerifDisplay-Regular.otf  libertinusserifdisplay  /usr/local/texlive/2021/te...Regular.otf
+14. LibertinusSerifInitials-Regular.otf libertinusserifinitials  /usr/local/texlive/2021/te...Regular.otf


Property changes on: trunk/Master/texmf-dist/doc/support/luafindfont/exa02.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/support/luafindfont/exa03.txt
===================================================================
--- trunk/Master/texmf-dist/doc/support/luafindfont/exa03.txt	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/support/luafindfont/exa03.txt	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1,34 @@
+We are using Lua 5.3
+Check for file /usr/local/texlive/2021/texmf-var/luatex-cache/generic/names/luaotfload-names
+ 1.              Arial Black.ttf               arialblack               /System/Library/Fonts/Supplemental/Arial Black.ttf
+ 2.        Arial Bold Italic.ttf                    arial         /System/Library/Fonts/Supplemental/Arial Bold Italic.ttf
+ 3.               Arial Bold.ttf                    arial                /System/Library/Fonts/Supplemental/Arial Bold.ttf
+ 4.             Arial Italic.ttf                    arial              /System/Library/Fonts/Supplemental/Arial Italic.ttf
+ 5. Arial Narrow Bold Italic.ttf              arialnarrow  /System/Library/Fonts/Supplemental/Arial Narrow Bold Italic.ttf
+ 6.        Arial Narrow Bold.ttf              arialnarrow         /System/Library/Fonts/Supplemental/Arial Narrow Bold.ttf
+ 7.      Arial Narrow Italic.ttf              arialnarrow       /System/Library/Fonts/Supplemental/Arial Narrow Italic.ttf
+ 8.             Arial Narrow.ttf              arialnarrow              /System/Library/Fonts/Supplemental/Arial Narrow.ttf
+ 9.       Arial Rounded Bold.ttf       arialroundedmtbold        /System/Library/Fonts/Supplemental/Arial Rounded Bold.ttf
+10.            Arial Unicode.ttf           arialunicodems                                 /Library/Fonts/Arial Unicode.ttf
+11.            Arial Unicode.ttf           arialunicodems             /System/Library/Fonts/Supplemental/Arial Unicode.ttf
+12.                    Arial.ttf                    arial                     /System/Library/Fonts/Supplemental/Arial.ttf
+13.                    Arial.ttf                    arial                        /Users/voss/Library/Fonts/Arial/Arial.ttf
+14.                  ArialHB.ttc              arialhebrew                                /System/Library/Fonts/ArialHB.ttc
+15.                  ArialHB.ttc arialhebrewdeskinterface                                /System/Library/Fonts/ArialHB.ttc
+16.                  ArialHB.ttc       arialhebrewscholar                                /System/Library/Fonts/ArialHB.ttc
+17.                  ArialHB.ttc              arialhebrew                                /System/Library/Fonts/ArialHB.ttc
+
+Run otfinfo:6
+Family:              Arial Narrow
+Subfamily:           Bold
+Full name:           Arial Narrow Bold
+PostScript name:     ArialNarrow-Bold
+Version:             Version 2.38.1x
+Unique ID:           Arial Narrow Bold : 2007
+Description:         Monotype Drawing Office 1982. A contemporary sans serif design, Arial contains more humanist characteristics than many of its predecessors and as such is more in tune with the mood of the last decades of the twentieth century. The overall treatment of curves is softer and fuller than in most industrial-style sans serif faces. Terminal strokes are cut on the diagonal which helps to give the face a less mechanical appearance. Arial is an extremely versatile family of typefaces which can be used with equal success for text setting in reports, presentations, magazines etc, and for display use in newspapers, advertising and promotions.
+Designer:            Robin Nicholas, Patricia Saunders
+Manufacturer:        The Monotype Corporation
+Trademark:           Arial is a trademark of The Monotype Corporation in the United States and/or other countries.
+Copyright:           © 2007 The Monotype Corporation. All Rights Reserved.
+License Description: You may use this font to display and print content as permitted by the license terms for the product in which this font is included. You may only (i) embed this font in content as permitted by the embedding restrictions included in this font; and (ii) temporarily download this font to a printer or other output device to help print content.
+Vendor ID:           TMC
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/doc/support/luafindfont/exa03.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/support/luafindfont/exa04.txt
===================================================================
--- trunk/Master/texmf-dist/doc/support/luafindfont/exa04.txt	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/support/luafindfont/exa04.txt	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1,14 @@
+We are using Lua 5.3
+Check for file /usr/local/texlive/2021/texmf-var/luatex-cache/generic/names/luaotfload-names
+ 1.      Segoe UI Symbol.ttf segoeuisymbol       /Users/voss/Library/Fonts/Segoe/Segoe UI Symbol.ttf
+ 2.          Segoe_Print.ttf    segoeprint           /Users/voss/Library/Fonts/Segoe/Segoe_Print.ttf
+ 3.     Segoe_Print_Bold.ttf    segoeprint      /Users/voss/Library/Fonts/Segoe/Segoe_Print_Bold.ttf
+ 4.         Segoe_Script.ttf   segoescript          /Users/voss/Library/Fonts/Segoe/Segoe_Script.ttf
+ 5.    Segoe_Script_Bold.ttf   segoescript     /Users/voss/Library/Fonts/Segoe/Segoe_Script_Bold.ttf
+ 6.             Segoe_UI.ttf       segoeui              /Users/voss/Library/Fonts/Segoe/Segoe_UI.ttf
+ 7.        Segoe_UI_Bold.ttf       segoeui         /Users/voss/Library/Fonts/Segoe/Segoe_UI_Bold.ttf
+ 8. Segoe_UI_Bold_Italic.ttf       segoeui  /Users/voss/Library/Fonts/Segoe/Segoe_UI_Bold_Italic.ttf
+ 9.      Segoe_UI_Italic.ttf       segoeui       /Users/voss/Library/Fonts/Segoe/Segoe_UI_Italic.ttf
+
+Font: segoeui
+Fonttype ttf(system) --> | Regular | Bold | Italic | BoldItalic |


Property changes on: trunk/Master/texmf-dist/doc/support/luafindfont/exa04.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/support/luafindfont/exa05.txt
===================================================================
--- trunk/Master/texmf-dist/doc/support/luafindfont/exa05.txt	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/support/luafindfont/exa05.txt	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1,28 @@
+We are using Lua 5.3
+Looking for font "*"
+Check for file /usr/local/texlive/texmf-var/luatex-cache/generic/names/luaotfload-names
+ Nr.                                     Fontname                                                                        Path
+   1.                        Aboensis-Regular.otf               /usr/local/texlive/texmf-dist/fonts/opentype/public/aboensis/
+   2.                             academicons.ttf            /usr/local/texlive/texmf-dist/fonts/truetype/public/academicons/
+   3.              Academy Engraved LET Fonts.ttf                                         /System/Library/Fonts/Supplemental/
+   4.                         ACaslonPro-Bold.otf                                           /Users/voss/Library/Fonts/Caslon/
+   5.                   ACaslonPro-BoldItalic.otf                                           /Users/voss/Library/Fonts/Caslon/
+   6.                       ACaslonPro-Italic.otf                                           /Users/voss/Library/Fonts/Caslon/
+   7.                      ACaslonPro-Regular.otf                                           /Users/voss/Library/Fonts/Caslon/
+   8.                     ACaslonPro-Semibold.otf                                           /Users/voss/Library/Fonts/Caslon/
+   9.               ACaslonPro-SemiboldItalic.otf                                           /Users/voss/Library/Fonts/Caslon/
+  10.                        Acathist-Regular.otf   /usr/local/texlive/texmf-dist/fonts/opentype/public/fonts-churchslavonic/
+  11.                 AccanthisADFStdNo3-Bold.otf            /usr/local/texlive/texmf-dist/fonts/opentype/arkandis/accanthis/
+  12.           AccanthisADFStdNo3-BoldItalic.otf            /usr/local/texlive/texmf-dist/fonts/opentype/arkandis/accanthis/
+  13.               AccanthisADFStdNo3-Italic.otf            /usr/local/texlive/texmf-dist/fonts/opentype/arkandis/accanthis/
+  14.              AccanthisADFStdNo3-Regular.otf            /usr/local/texlive/texmf-dist/fonts/opentype/arkandis/accanthis/
+  15.                                     ACE.ttc                                     /Users/voss/Library/Fonts/AppleSymbols/
+  16.                                     ACE.ttc                                     /Users/voss/Library/Fonts/AppleSymbols/
+  17.                    AdineKirnberg-Script.otf                                      /Users/voss/Library/Fonts/AdineScript/
+  18.                        AdobeArabic-Bold.otf                                            /Users/voss/Library/Fonts/Adobe/
+  19.                  AdobeArabic-BoldItalic.otf                                            /Users/voss/Library/Fonts/Adobe/
+[...]                               [...]                                                         [...]
+6847.                                儷宋_Pro.ttf                                        /Users/voss/Library/Fonts/KozukaPro/
+6848.                                华文仿宋.ttf                                        /Users/voss/Library/Fonts/KozukaPro/
+6849.                                华文宋体.ttf                                        /Users/voss/Library/Fonts/KozukaPro/
+6850.                                华文楷体.ttf                                        /Users/voss/Library/Fonts/KozukaPro/


Property changes on: trunk/Master/texmf-dist/doc/support/luafindfont/exa05.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/support/luafindfont/exa06.txt
===================================================================
--- trunk/Master/texmf-dist/doc/support/luafindfont/exa06.txt	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/support/luafindfont/exa06.txt	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1,19 @@
+We are using Lua 5.3
+Looking for font "minion"
+Check for file /usr/local/texlive/2021/texmf-var/luatex-cache/generic/names/luaotfload-names
+ Nr.                 Fontname                                   Path
+   1.      MinionMath-Bold.otf  /Users/voss/Library/Fonts/MinionMath/
+   2.   MinionMath-Regular.otf  /Users/voss/Library/Fonts/MinionMath/
+   3.       MinionPro-Bold.otf   /Users/voss/Library/Fonts/MinionPro/
+   4.     MinionPro-BoldCn.otf   /Users/voss/Library/Fonts/MinionPro/
+   5.   MinionPro-BoldCnIt.otf   /Users/voss/Library/Fonts/MinionPro/
+   6.     MinionPro-BoldIt.otf   /Users/voss/Library/Fonts/MinionPro/
+   7.       MinionPro-Capt.otf   /Users/voss/Library/Fonts/MinionPro/
+   8.       MinionPro-Disp.otf   /Users/voss/Library/Fonts/MinionPro/
+   9.         MinionPro-It.otf   /Users/voss/Library/Fonts/MinionPro/
+  10.     MinionPro-Medium.otf   /Users/voss/Library/Fonts/MinionPro/
+  11.   MinionPro-MediumIt.otf   /Users/voss/Library/Fonts/MinionPro/
+  12.    MinionPro-Regular.otf   /Users/voss/Library/Fonts/MinionPro/
+  13.   MinionPro-Semibold.otf   /Users/voss/Library/Fonts/MinionPro/
+  14. MinionPro-SemiboldIt.otf   /Users/voss/Library/Fonts/MinionPro/
+  15.       MinionPro-Subh.otf   /Users/voss/Library/Fonts/MinionPro/


Property changes on: trunk/Master/texmf-dist/doc/support/luafindfont/exa06.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.pdf	2021-12-02 21:52:29 UTC (rev 61206)
+++ trunk/Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.pdf	2021-12-02 21:56:38 UTC (rev 61207)

Property changes on: trunk/Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.tex	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1,253 @@
+ %% $Id: findfont-doc.tex 16 2021-11-07 19:42:57Z hvoss $
+%
+\listfiles\setcounter{errorcontextlines}{100}
+\documentclass[paper=a4,fontsize=11pt,DIV=14,parskip=half-,
+               captions=tableabove,twoside=on]{scrartcl}
+\usepackage{fontspec}
+%\usepackage{libertinus-otf}
+\setmainfont{AccanthisADFStdNo3}[
+  UprightFont   =*-Regular,
+  BoldFont      =*-Bold,
+  ItalicFont    =*-Italic,
+  BoldItalicFont=*-BoldItalic,
+  RawFeature    = -rlig,
+]
+\setsansfont{GilliusADF}[
+  UprightFont   =*-Regular,
+  BoldFont      =*-Bold,
+  ItalicFont    =*-Italic,
+  BoldItalicFont=*-BoldItalic,
+  RawFeature    = -rlig,
+]
+\setmonofont{DejaVu Sans Mono}[Scale=MatchLowercase,FakeStretch=0.9]
+%\setmonofont{Anonymous Pro}[Scale=MatchLowercase,FakeStretch=0.9]
+
+\usepackage[english]{babel}
+\usepackage{scrlayer-scrpage}
+\automark[section]{section}
+\automark*[subsection]{}
+\pagestyle{scrheadings}
+
+{\catcode`\%=12 
+ \gdef\perCent{%}
+ \gdef\DoubleperCent{%%}
+}
+
+\usepackage{xcolor,fancyvrb,varioref}
+\usepackage{xltabular,pdflscape}
+\usepackage{hvlogos} % for Wikipedia W
+\usepackage{listings}
+\usepackage{dtk-extern} % for Wikipedia W
+\lstset{basicstyle=\ttfamily\small,language=[LaTeX]TeX}
+\usepackage{ragged2e}
+\usepackage{makeidx}\makeindex
+\usepackage{hvindex}
+\def\Lfile#1{\texttt{#1}\index{#1 file@\texttt{#1} file}}
+\def\Lext#1{\texttt{.#1}\index{#1 file extension@\texttt{.#1} file extension}}
+\def\Lcs#1{\texttt{\textbackslash#1}\index{#1@\texttt{\textbackslash#1}}}
+\def\Lenv#1{\texttt{#1}\index{#1 environment@\texttt{#1} environment}}
+\def\Lpack#1{\texttt{#1}\index{#1 package@\texttt{#1} package}}
+\def\Lprog#1{\texttt{#1}\index{#1 program@\texttt{#1} program}}
+\def\Loption#1{\texttt{#1}\index{#1@\texttt{#1} package option}}
+\def\Largb#1{\emph{\{#1\}}}
+
+%\usepackage[bibstyle=dtk]{biblatex}
+%\addbibresource{\jobname.bib}
+
+\raggedbottom
+\usepackage{url}
+\usepackage[colorlinks,linktocpage]{hyperref}
+
+\makeatletter% from: doc.sty
+\newcommand*\GetFileInfo[1]{%
+  \def\filename{#1}%
+  \def\@tempb##1 ##2 ##3\relax##4\relax{%
+    \def\filedate{##1}%
+    \def\fileversion{##2}%
+    \def\fileinfo{##3}}%
+  \edef\@tempa{\csname ver@#1\endcsname}%
+  \expandafter\@tempb\@tempa\relax? ? \relax\relax}
+\makeatother
+
+%\GetFileInfo{xltabular.sty}
+\usepackage{xspace}
+
+\newcommand\FF{\texttt{luafindfont}\xspace}
+
+\def\setVersion#1{\setVVersion#1!!}
+\def\setVVersion#1=#2!!{\def\luafindfontVersion{#2}} 
+
+\setVersion{version = 0.04}%  can be automatically changed by perl
+
+\setkeys{dtk}{cleanup=true,force}
+
+\title{Program \texttt{luafindfont} \\--\\ \normalsize \luafindfontVersion\ (\today)}
+\author{\shortstack{Herbert Voß\\\small \href{mailto:hvoss at tug.org}{hvoss at tug.org}}}
+\date{}
+\begin{document}
+\maketitle
+\thispagestyle{empty}
+\enlargethispage{1cm}
+\tableofcontents
+
+\vfill
+Thanks to: \\
+Rolf Niepraschk;
+\clearpage
+
+\section{Introduction}
+The Lua program
+\FF is a  program for searching installed fonts which are usable for \LuaLaTeX\ and \XeLaTeX.
+The already existing Lua program \Lprog{luaotfload-tool} can also be used for searching, but
+the search-interface is somewhat cryptic and too complex for a user, who wants only to know
+if a font is present or not. And if present, wher can it be found. For example:
+
+\begin{verbatim}
+H-MacBook:~ voss$ 
+H-MacBook:~ voss$ luaotfload-tool --find=times
+luaotfload | resolve : Font "times" found!
+luaotfload | resolve : Resolved file name "/System/Library/Fonts/Times.ttc", subfont nr. 0
+H-MacBook:~ voss
+H-MacBook:~ voss$ luaotfload-tool --fuzzy --find="times new roman"
+luaotfload | resolve : Font "times new roman" found!
+luaotfload | resolve : Resolved file name "/System/Library/Fonts/Supplemental/Times New Roman.ttf"
+H-MacBook:~ voss$ 
+\end{verbatim}
+
+But this are not \emph{all} Times fonts. Compare it with the output of \Lprog{luafindfont},
+where the searchname \emph{times} must only be a part of a longer name:
+
+\begin{verbatim}
+bash-3.2$ ./luafindfont.lua times
+We are using Lua 5.3
+Check for file /usr/local/texlive/texmf-var/luatex-cache/generic/names/luaotfload-names
+ Nr.                         Fontname      Symbolic Name                                 Path
+   1.  Times New Roman Bold Italic.ttf      timesnewroman     /Users/voss/Library/Fonts/Times/
+   2.  Times New Roman Bold Italic.ttf      timesnewroman  /System/Library/Fonts/Supplemental/
+   3.         Times New Roman Bold.ttf      timesnewroman  /System/Library/Fonts/Supplemental/
+   4.         Times New Roman Bold.ttf      timesnewroman     /Users/voss/Library/Fonts/Times/
+   5.       Times New Roman Italic.ttf      timesnewroman  /System/Library/Fonts/Supplemental/
+   6.       Times New Roman Italic.ttf      timesnewroman     /Users/voss/Library/Fonts/Times/
+   7.              Times New Roman.ttf      timesnewroman  /System/Library/Fonts/Supplemental/
+   8.              Times New Roman.ttf      timesnewroman     /Users/voss/Library/Fonts/Times/
+   9.                        Times.ttc              times               /System/Library/Fonts/
+  10.             Times_Sans_Serif.ttf     timessansserif     /Users/voss/Library/Fonts/Times/
+  11.      TimesNewRomanMTStd-Bold.otf timesnewromanmtstd     /Users/voss/Library/Fonts/Times/
+  12.  TimesNewRomanMTStd-BoldCond.otf timesnewromanmtstd     /Users/voss/Library/Fonts/Times/
+  13.    TimesNewRomanMTStd-BoldIt.otf timesnewromanmtstd     /Users/voss/Library/Fonts/Times/
+  14.      TimesNewRomanMTStd-Cond.otf timesnewromanmtstd     /Users/voss/Library/Fonts/Times/
+  15.    TimesNewRomanMTStd-CondIt.otf timesnewromanmtstd     /Users/voss/Library/Fonts/Times/
+  16.    TimesNewRomanMTStd-Italic.otf timesnewromanmtstd     /Users/voss/Library/Fonts/Times/
+  17.           TimesNewRomanMTStd.otf timesnewromanmtstd     /Users/voss/Library/Fonts/Times/
+  18. TimesNewRomanPS-BoldItalicMT.otf  timesnewromanpsmt     /Users/voss/Library/Fonts/Times/
+  19.       TimesNewRomanPS-BoldMT.otf  timesnewromanpsmt     /Users/voss/Library/Fonts/Times/
+  20.            TimesNewRomanPSMT.otf  timesnewromanpsmt     /Users/voss/Library/Fonts/Times/
+  21.      TimesNewRomanPSStd-Bold.otf timesnewromanpsstd     /Users/voss/Library/Fonts/Times/
+  22.    TimesNewRomanPSStd-BoldIt.otf timesnewromanpsstd     /Users/voss/Library/Fonts/Times/
+  23.    TimesNewRomanPSStd-Italic.otf timesnewromanpsstd     /Users/voss/Library/Fonts/Times/
+  24.   TimesNewRomanPSStd-Regular.otf timesnewromanpsstd     /Users/voss/Library/Fonts/Times/
+\end{verbatim}
+
+
+\subsection{Syntax}
+
+The \Index{syntax} is 
+
+\verb|luafindfont [...] <font>| 
+
+where \verb|[...]|  are optional \Index{argument}s, either in short or
+long form which, of course, can be mixed:
+
+\begin{verbatim}
+  parameter handling
+    -q,--quiet
+    -h,--help
+    -o,--otfinfo (default 0)
+    -i,--info (default 0)
+    -n,--nosymbolicnames
+    -v...          Verbosity output
+    -m,--max_string (default 90)
+    <font> (string)  
+\end{verbatim}
+
+For example:
+
+\begin{verbatim}
+luafindfont times 
+luafindfont palatino -o 3
+luafindfont -i 3 -m 50 arial
+\end{verbatim}
+
+\begin{enumerate}
+\item \texttt{-q}: quiet; 
+\item \texttt{-m <columns>}: How many columns are used for the font with full path. This can be really long, but with e.g. \verb|-m 50| 
+the length is limited to 50 characters.
+\item \texttt{-o <number>}: For the font with the given number from the font list the program \Lprog{otfinfo} is called
+    for some generell font informations.
+\item \texttt{-i <number>}: For the font with the given number from the font list the existing font styles are listed.
+\end{enumerate}
+
+\section{How it works}
+\FF uses the data file \Lfile{luaotfloadtool-names.lua} which is created by \LuaTeX. If it is
+missing it will be created by \FF itself. The name of the font should be in lowercase
+characters and must not be the complete name. A \verb|time| for finding all fonts with
+time in its names is sufficiant.
+
+\section{Examples}
+
+\begin{Verbatim}
+bash-3.2$ luafindfont segoe
+\end{Verbatim}
+
+\VerbatimInput{Examples/exa01.txt}
+
+\begin{Verbatim}
+bash-3.2$ luafindfont -m 40 libertinus
+\end{Verbatim}
+
+\VerbatimInput{Examples/exa02.txt}
+
+
+\begin{Verbatim}
+bash-3.2$ luafindfont -i 9 sego
+\end{Verbatim}
+
+\VerbatimInput{Examples/exa04.txt}
+
+
+\begin{landscape}
+\begin{Verbatim}[fontsize=\small]
+bash-3.2$ luafindfont -o 6 arial
+\end{Verbatim}
+
+\VerbatimInput[fontsize=\small]{Examples/exa03.txt}
+
+
+\section{List of all fonts}
+This possible with the symbolic fontname "*" instead of a real fontname:
+
+\begin{Verbatim}[fontsize=\small]
+bash-3.2$ luafindfont "*"
+\end{Verbatim}
+
+This list maybe really long and is shortend here!
+
+\VerbatimInput[fontsize=\small]{Examples/exa05.txt}
+
+
+\end{landscape}
+
+
+\begin{Verbatim}[fontsize=\small]
+bash-3.2$ luafindfont -n minion
+\end{Verbatim}
+
+\VerbatimInput[fontsize=\small]{Examples/exa06.txt}
+
+
+
+
+
+\printindex
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/scripts/luafindfont/luafindfont.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/luafindfont/luafindfont.lua	                        (rev 0)
+++ trunk/Master/texmf-dist/scripts/luafindfont/luafindfont.lua	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1,461 @@
+#!/usr/bin/env texlua
+-- % $Id: luafindfont.lua 330 2021-11-28 13:47:56Z herbert $
+
+-----------------------------------------------------------------------
+--         FILE:  luafindfont.lua
+--  DESCRIPTION:  search for fonts in the database
+-- REQUIREMENTS:  luatex v.0.80 or later; packages lualibs, xindex-lapp
+--       AUTHOR:  Herbert Voß  (C) 2021-11-27
+-----------------------------------------------------------------------
+        luafindfont = luafindfont or { }
+   local version = 0.04
+luafindfont.version = version
+
+--[[
+Search the font database for fontnames. The database is used
+by Lua(La)TeX and created by default with the first run of
+Lua(La)TeX. If there is no such data file then "luafindfont" 
+will execute the command to create it.
+
+luafindfont(1)
+
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%%    http://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+
+Report bugs to  hvoss at tug.org
+
+]]
+
+kpse.set_program_name("luatex")
+local f = kpse.find_file("lualibs.lua")
+
+require("lualibs")  -- all part of LuaTeX
+--require("luafindfont-utflib")
+
+if #arg == 0 then
+  print("I need at least one argument or option! Will exit ...")
+  os.exit()
+end
+
+local args_verbose = 0
+local args_nosymbolixnames = 0
+local args_otfinfo = 0
+local args_info = 0
+local args_max_string = 90
+
+local i = 1
+while i <= #arg do
+  if arg[i] == "-h" or arg[i] == "--help" then
+    print("Version "..version..", Copyright 2021 by Herbert Voß") 
+    print([[Syntax: luafintfont [options] <font> 
+    By default the Lua program 'luafindfont' creates a list of the
+    fonts which have in its names the given string.  
+
+    parameter handling
+    -h,--help
+    -n,--nosymbolicnames
+    -o,--otfinfo (default 0)
+    -i,--info (default 0)
+    -v, --verbose
+    -m,--max_string (default 90)
+    <font> (string)  ]])
+  elseif arg[i] == "-v" or arg[i] == "--verbose" then
+    args_verbose = 1
+  elseif arg[i] == "-n" or arg[i] == "--nosymbolicnames" then
+    args_nosymbolicnames = 1
+  elseif arg[i] == "-o" or arg[i] == "--otfinfo" then
+    local fontNr = tonumber(arg[i+1])
+    if fontNr then
+      args_otfinfo = fontNr
+      i = i + 1
+    else
+      print("Option -o needs a following fontnumber!")
+      args_otfinfo = 0
+    end
+  elseif arg[i] == "-i" or arg[i] == "--info" then
+    local fontNr = tonumber(arg[i+1])
+    if fontNr then
+      args_info = fontNr
+      i = i + 1
+    else
+      print("Option -i needs a following fontnumber!")
+      args_info = 0
+    end
+  elseif arg[i] == "-m" or arg[i] == "--max_string" then
+    local string_len = tonumber(arg[i+1])
+    if string_len then
+      args_max_string = string_len
+      i = i + 1
+    else
+      print("Option -m needs a following fontnumber!")
+      args_max_string = 90
+    end
+  else
+    args_font = arg[i]
+  end    
+  i = i + 1
+end
+
+if not args_font then
+  print("No fontname given, will close ...")
+  os.exit()
+end
+
+local vlevel = args_verbose
+local otfinfo = args_otfinfo
+local info = args_info
+local noSymbolicNames = args_nosymbolicnames
+local maxStrLength = args_max_string
+local font_str = args_font
+
+local luaVersion = _VERSION
+print("We are using "..luaVersion)
+print('Looking for font \"'..font_str..'\"')
+
+function getFileParts(fullpath,part)
+  local path, file, ext = string.match(fullpath, "(.-)([^/]-([^%.]+))$")
+  if part == "path" then return path 
+  elseif part == "ext" then return ext
+  else return file end
+end
+
+function getFileLocation()
+  local cachepaths = kpse.expand_var('$TEXMFCACHE') or ""
+  if cachepaths == "" or cachepaths == "$TEXMFCACHE" then
+    cachepaths = kpse.expand_var('$TEXMFVAR') or ""
+  end
+  if vlevel > 0 then print("cachepaths: ",cachepaths) end
+  if cachepaths == "" then
+    print("umghhh ....")
+    print("No cache path found ... ")
+    return ""
+  end  
+  if os.type == "windows" then
+    paths = string.split(cachepaths,";")
+  else
+    paths = string.split(cachepaths,":")
+  end
+  if vlevel > 0 then print ("Pathes: ", paths[1], paths[2]) end
+  local file = paths[1].."/luatex-cache/generic/names" 
+  if vlevel > 0 then print("try: ",file) end
+  local f,err = io.open (file.."/test.tmp", "w") 
+  if not f and #paths > 1 then
+    if vlevel > 0 then print("first path has no file, I'll try the second one ...") end
+    file = paths[2].."/luatex-cache/generic/names"
+  if vlevel > 0 then print("try: ",file) end
+    f,err = io.open (file.."/test.tmp", "w") 
+    if not f then
+      print("Error getting file location: \n",err)
+      return ""
+    else
+      f:close()
+    end
+  else
+    f:close()
+  end
+-- print("File: "..fontListFile)
+  return file
+end
+
+function readBinaryOrZippedFile(file)
+  print("Check for file "..file)
+  local f,err = io.open (file..".luc", "rb") 
+  if not f then
+    if vlevel > 0 then print("There is no binary data file ... ") end
+    f,err = io.open (file..".lua.gz", "r") 
+    if not f then
+      if vlevel > 0 then print("There is no gzipped data file ... ") end
+      f,err = io.open (file..".lua", "r") 
+      if not f then
+        if vlevel > 0 then print("There is no data file ... ") end
+        print("Error reading file: ",err)
+        return nil
+      else
+        if vlevel > 0 then print("Found a normal data file ... ") end
+        local str = dofile(f)
+        f:close()
+        return str
+      end
+    else  
+      if vlevel > 0 then print("Found a gzipped data file ... ") end
+      local str = f:read("*all")
+      local str2 = loadstring(gzip.decompress(str))
+      str = str2()
+      f:close()
+      return str
+    end
+  else
+    if vlevel > 0 then print("Found a binary data file ... ") end
+    local chunk = f:read"*all"
+    f:close()
+    local func = load (chunk, "b")
+    str = func()
+    return str
+  end
+end
+
+function compareEntries(f1, f2)
+  if (f1["basename"]   == f2["basename"])   and
+     (f1["familyname"] == f2["familyname"]) and
+     (f1["fullpath"]   == f2["fullpath"]) then
+     return true 
+  else 
+    return false
+  end
+end
+
+
+local fontData = {}
+local fontListFile = getFileLocation()
+if fontListFile == "" then
+    print("There is no cached font file list!")
+    print('Will run at first "luaotfload-tool --update --force" ... Wait a minute, please ...')
+    local exrun = io.popen('luaotfload-tool --update --force', 'r')
+    local output = exrun:read('*all')
+    print(output)
+    exrun:close()
+    fontListFile = getFileLocation()
+end
+
+fontListFile = fontListFile.."/luaotfload-names"
+fontData = readBinaryOrZippedFile(fontListFile)
+
+if not fontData then   
+  print("umghhh ....")
+  print("It does not work! I'll give it up ... :-(")
+  os.exit()
+end
+
+--print(require 'xindex-pretty'.dump(fontData)) --["families"]["system"]["otf"]))
+
+fontDataMap = fontData["mappings"]
+fontFilesTable = fontData["files"]["full"]
+
+--print(require 'xindex-pretty'.dump(fontFilesTable)) --["families"]["system"]["otf"]))
+--print(require 'xindex-pretty'.dump(fontFilesTable["bare"]["system"]["otf"])) --["families"]["system"]["otf"]))
+
+--[[
+print("Dateiliste für System->OTF")
+for i, v in ipairs(fontFilesTable) do 
+  print(i,v)
+end
+]]
+
+table.sort(fontDataMap, 
+    function(a,b) 
+	if not a["basename"] or not b["basename"] then 
+	    return false 
+	else 
+	    return string.lower(a["basename"]) < string.lower(b["basename"]) 
+	end end)
+-- strip duplicates
+local newFontDataMap = {}
+if #fontDataMap > 0 then
+    newFontDataMap[1] = fontDataMap[1]
+end
+for i = 2,#fontDataMap do
+    if not compareEntries(fontDataMap[i],newFontDataMap[#newFontDataMap]) then
+	newFontDataMap[#newFontDataMap+1] = fontDataMap[i]
+    end
+end
+
+fontDataMap = newFontDataMap
+--for i, v in ipairs(fontDataMap) do 
+--  print(i, v["basename"],v["familyname"], v["fullpath"]) 
+-- end
+
+local j = 1
+local fontList = {}
+local l_max = {1, 1, 1}
+for i, v in ipairs(fontDataMap) do 
+  if v["familyname"] then
+      if string.find (v["familyname"], font_str, 1, true) or (font_str == "*") then
+--	print(string.format("%2d. %30s %20s  %50s",j,v["basename"],v["familyname"],v["fullpath"])) 
+        fontList[#fontList+1] = v
+        local fullpath = getFileParts(v["fullpath"],"path")  -- strip file name
+        local basename = v["basename"]
+--      local basename = string.fromutf8(v["basename"])
+        if string.len(basename) > l_max[1] then l_max[1] = string.len(basename) end
+        if string.len(v["familyname"]) > l_max[2] then l_max[2] = string.len(v["familyname"]) end
+        if string.len(fullpath) > l_max[3] then l_max[3] = string.len(fullpath) end
+	j = j + 1
+      end
+  end
+end
+
+-- print(l_max[1],l_max[2],l_max[3])
+if l_max[3] > maxStrLength then l_max[3] = maxStrLength end
+
+local minChars = 26
+local Fontname = "Fontname"
+local Path = "Path"
+local SymbolicName = "Symbolic Name"
+local lfdNr = "Nr."
+if (font_str ~= "*") and not noSymbolicNames then
+    print(string.format("%4s %"..l_max[1].."s %"..l_max[2].."s  %"..l_max[3].."s",lfdNr,Fontname,SymbolicName,Path)) 
+  else
+    print(string.format("%4s %"..l_max[1].."s  %"..l_max[3].."s",lfdNr,Fontname,Path)) 
+end
+
+for i, v in ipairs(fontList) do
+  local path = getFileParts(v["fullpath"],"path")
+  if string.len(path) > l_max[3] then
+    path = string.sub (path, 1, minChars).."..."..string.sub (path, string.len(path)-maxStrLength+minChars+4)    
+  end
+  if (font_str ~= "*") and not noSymbolicNames then
+    print(string.format("%4d. %"..l_max[1].."s %"..l_max[2].."s  %"..l_max[3].."s",i,v["basename"],v["familyname"],path)) 
+  else
+    print(string.format("%4d. %"..l_max[1].."s  %"..l_max[3].."s",i,v["basename"],path)) 
+  end
+end
+
+if otfinfo > 0 then
+  print()
+  print("Run otfinfo:"..otfinfo)
+  local font = fontList[otfinfo]["fullpath"]
+  local exrun = io.popen("otfinfo -i \""..font.."\"", 'r') -- ".." font may have spaces
+  local output = exrun:read('*all')
+  print(output)
+  exrun:close()
+end
+
+if info > 0 then
+  font = fontList[info]["familyname"]
+  print("\nFont: "..font)
+  local font_dir = {"local","system","texmf"}
+  local font_ext = {"ttf","otf","ttc"}
+  for j = 1,#font_dir do
+    for i = 1,#font_ext do
+      local fonttype = ""
+      local ext = font_ext[i]
+      local dir = font_dir[j]
+      if fontData["families"][dir][ext]  then  -- font extension exists?
+        local entry = fontData["families"][dir][ext][font]
+        if entry then
+          if entry["r"]  then fonttype = fonttype.."Regular "      end
+          if entry["b"]  then fonttype = fonttype.."| Bold "       end
+          if entry["i"]  then fonttype = fonttype.."| Italic "     end
+          if entry["bi"] then fonttype = fonttype.."| BoldItalic"  end
+          io.write("Fonttype "..ext.."("..dir..") --> ")
+          if #fonttype > 0 then
+            print("| "..fonttype.." |")
+          else
+            print(" undefined ") --- no regular definiert
+          end
+        else
+          print()
+        end
+      end
+    end
+  end
+end
+--print(require 'xindex-pretty'.dump(fontData["families"]["system"]["otf"])) --["families"]["system"]["otf"]))
+
+
+--[[
+
+ ["families"]={
+  ["local"]={},
+  ["system"]={
+   ["otf"]={
+    ["adobecaslonpro"]={
+     ["b"]={
+      ["default"]=3143,
+     },
+     ["bi"]={
+      ["default"]=3146,
+     },
+     ["i"]={
+      ["default"]=3145,
+     },
+     ["r"]={
+      ["default"]=3147,
+     },
+    },
+   },
+  },
+ },
+
+]]
+
+--[[
+This is a sketch of the luaotfload db:
+
+    type dbobj = {
+        families    : familytable;
+        fontnames   : fontnametable;
+        files       : filemap;
+        status      : filestatus;
+        mappings    : fontentry list;
+        meta        : metadata;
+    }
+    and familytable = {
+        local  : (format, familyentry) hash; // specified with include dir
+        texmf  : (format, familyentry) hash;
+        system : (format, familyentry) hash;
+    }
+    and familyentry = {
+        r  : sizes; // regular
+        i  : sizes; // italic
+        b  : sizes; // bold
+        bi : sizes; // bold italic
+    }
+    and sizes = {
+        default : int;              // points into mappings or names
+        optical : (int, int) list;  // design size -> index entry
+    }
+    and fontnametable = {
+        local  : (format, index) hash;
+        texmf  : (format, index) hash;
+        system : (format, index) hash;
+    }
+    and metadata = {
+        created     : string       // creation time
+        formats     : string list; // { "otf", "ttf", "ttc" }
+        local       : bool;        (* set if local fonts were added to the db *)
+        modified    : string       // modification time
+        statistics  : TODO;        // created when built with "--stats"
+        version     : float;       // index version
+    }
+    and filemap = { // created by generate_filedata()
+        base : {
+            local  : (string, int) hash; // basename -> idx
+            system : (string, int) hash;
+            texmf  : (string, int) hash;
+        };
+        bare : {
+            local  : (string, (string, int) hash) hash; // location -> (barename -> idx)
+            system : (string, (string, int) hash) hash;
+            texmf  : (string, (string, int) hash) hash;
+        };
+        full : (int, string) hash; // idx -> full path
+    }
+    and fontentry = { // finalized by collect_families()
+        basename             : string;   // file name without path "foo.otf"
+        conflicts            : { barename : int; basename : int }; // filename conflict with font at index; happens with subfonts
+        familyname           : string;   // sanitized name of the font family the font belongs to, usually from the names table
+        fontname             : string;   // sanitized name of the font
+        format               : string;   // "otf" | "ttf" | "afm" (* | "pfb" *)
+        fullname             : string;   // sanitized full name of the font including style modifiers
+        fullpath             : string;   // path to font in filesystem
+        index                : int;      // index in the mappings table
+        italicangle          : float;    // italic angle; non-zero with oblique faces
+        location             : string;   // "texmf" | "system" | "local"
+        plainname            : string;   // unsanitized font name
+        typographicsubfamily : string;   // sanitized preferred subfamily (names table 14)
+        psname               : string;   // PostScript name
+        size                 : (false | float * float * float);  // if available, size info from the size table converted from decipoints
+        subfamily            : string;   // sanitized subfamily (names table 2)
+        subfont              : (int | bool);     // integer if font is part of a TrueType collection ("ttc")
+        version              : string;   // font version string
+        weight               : int;      // usWeightClass
+    }
+    and filestatus = (string,       // fullname
+                      { index       : int list; // pointer into mappings
+                        timestamp   : int;      }) dict
+]]


Property changes on: trunk/Master/texmf-dist/scripts/luafindfont/luafindfont.lua
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2021-12-02 21:52:29 UTC (rev 61206)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2021-12-02 21:56:38 UTC (rev 61207)
@@ -489,7 +489,7 @@
     ltxkeys ltxmisc ltxnew ltxtools
     lua-alt-getopt lua-check-hyphen lua-physical lua-typo lua-uca lua-ul
     lua-uni-algos lua-visual-debug lua-widow-control
-    luabibentry luabidi luacode luacolor luahyphenrules
+    luabibentry luabidi luacode luacolor luafindfont luahyphenrules
     luaimageembed luaindex luainputenc luaintro luakeys
     lualatex-doc lualatex-doc-de
     lualatex-math lualatex-truncate lualibs

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2021-12-02 21:52:29 UTC (rev 61206)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2021-12-02 21:56:38 UTC (rev 61207)
@@ -824,6 +824,7 @@
  'lua-visual-debug',    "&MAKEflatten",
  'lua2dox',		"die 'skipping, author request'",
  'luabidi',		"&MAKEflatten",
+ 'luafindfont',		"&MAKEflatten",
  'luamesh',		"&MAKEflatten",
  'luarandom',		"&MAKEflatten",
  'luatex-def',		"die 'skipping, replaced by graphics-def'",
@@ -3455,6 +3456,7 @@
  'ltxfileinfo'          => 'ltxfileinfo$',
  'ltximg'               => 'ltximg\.pl$',
  'lua2dox'              => 'lua2dox_filter?$',
+ 'luafindfont'		=> 'luafindfont.lua',
  'luaotfload'           => 'luaotfload-tool',
  'lwarp'		=> 'lwarpmk.lua',
  'm-tx'			=> 'm-tx.lua',
@@ -3563,6 +3565,7 @@
  'latexmk'              => 'latexmk.1',
  'light-latex-make'	=> '\.1$',
  'ltximg'		=> '\.1$',
+ 'luafindfont'		=> '\.1$',
  'mathspic'             => 'mathspic.1',
  'mkjobtexmf'           => 'mkjobtexmf.man',
  'musixtnt'		=> '\.1$',

Modified: trunk/Master/tlpkg/tlpsrc/collection-fontutils.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-fontutils.tlpsrc	2021-12-02 21:52:29 UTC (rev 61206)
+++ trunk/Master/tlpkg/tlpsrc/collection-fontutils.tlpsrc	2021-12-02 21:56:38 UTC (rev 61207)
@@ -21,6 +21,7 @@
 depend dvipsconfig
 depend fontinst
 depend fontools
+depend luafindfont
 depend mf2pt1
 depend t1utils
 depend ttfutils

Added: trunk/Master/tlpkg/tlpsrc/luafindfont.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/luafindfont.tlpsrc	                        (rev 0)
+++ trunk/Master/tlpkg/tlpsrc/luafindfont.tlpsrc	2021-12-02 21:56:38 UTC (rev 61207)
@@ -0,0 +1 @@
+binpattern f bin/${ARCH}/${PKGNAME}



More information about the tex-live-commits mailing list.