texlive[63210] trunk: luafindfont (2may22)
commits+karl at tug.org
commits+karl at tug.org
Mon May 2 21:57:55 CEST 2022
Revision: 63210
http://tug.org/svn/texlive?view=revision&revision=63210
Author: karl
Date: 2022-05-02 21:57:54 +0200 (Mon, 02 May 2022)
Log Message:
-----------
luafindfont (2may22)
Modified Paths:
--------------
trunk/Build/source/texk/texlive/linked_scripts/luafindfont/luafindfont.lua
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/CHANGELOG
trunk/Master/texmf-dist/doc/support/luafindfont/README.md
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/luafindfont.lua
trunk/Master/tlpkg/libexec/ctan2tds
Removed Paths:
-------------
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
Modified: trunk/Build/source/texk/texlive/linked_scripts/luafindfont/luafindfont.lua
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/luafindfont/luafindfont.lua 2022-05-02 19:42:09 UTC (rev 63209)
+++ trunk/Build/source/texk/texlive/linked_scripts/luafindfont/luafindfont.lua 2022-05-02 19:57:54 UTC (rev 63210)
@@ -4,10 +4,10 @@
-- 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
+-- AUTHOR: Herbert Voß (C) 2022-05-01
-----------------------------------------------------------------------
luafindfont = luafindfont or { }
- local version = 0.06
+ local version = 0.07
luafindfont.version = version
--[[
@@ -63,6 +63,7 @@
-n,--nosymbolicnames
-o,--otfinfo (default 0)
-i,--info (default 0)
+ -x, --xetex
-v, --verbose
-m,--max_string (default 90)
<font> (string) ]])
@@ -70,6 +71,8 @@
args_verbose = 1
elseif arg[i] == "-n" or arg[i] == "--nosymbolicnames" then
args_nosymbolicnames = 1
+ elseif arg[i] == "-x" or arg[i] == "--xetex" then
+ args_xetex = 1
elseif arg[i] == "-o" or arg[i] == "--otfinfo" then
local o_arg = arg[i+1]
otfinfo_arg = "i"
@@ -174,10 +177,12 @@
end
function readBinaryOrZippedFile(file)
- print("Check for file "..file)
+ if vlevel > 0 then print("Check for file "..file..".luc") end
local f,err = io.open (file..".luc", "rb")
if not f then
- if vlevel > 0 then print("There is no binary data file ... ") end
+ if vlevel > 0 then
+ print("There is no binary data file ... checking for lua.gz")
+ 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
@@ -308,20 +313,43 @@
local SymbolicName = "Symbolic Name"
local lfdNr = "No."
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))
+ if args_xetex then
+ print(string.format("%5s %"..l_max[1].."s %"..l_max[2].."s %"..l_max[3].."s".."%4s",lfdNr,Fontname,SymbolicName,Path,"X"))
+ else
+ print(string.format("%5s %"..l_max[1].."s %"..l_max[2].."s %"..l_max[3].."s",lfdNr,Fontname,SymbolicName,Path))
+ end
+else
+ if args_xetex then
+ print(string.format("%5s %"..l_max[1].."s %"..l_max[3].."s".."%4s",lfdNr,Fontname,Path,"X"))
else
- print(string.format("%4s %"..l_max[1].."s %"..l_max[3].."s",lfdNr,Fontname,Path))
+ print(string.format("%5s %"..l_max[1].."s %"..l_max[3].."s",lfdNr,Fontname,Path))
+ end
end
+local kpsewhich = "0" -- test if font is present for xetex
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
+ local exrun = io.popen("kpsewhich "..v["basename"],'r')
+ if string.len(exrun:read('*all')) > 0 then
+ kpsewhich = "1"
+ else
+ kpsewhich = "0"
+ 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))
+ if args_xetex then
+ print(string.format("%4d. %"..l_max[1].."s %"..l_max[2].."s %"..l_max[3].."s".." %3s",i,v["basename"],v["familyname"],path,kpsewhich))
+ else
+ print(string.format("%4d. %"..l_max[1].."s %"..l_max[2].."s %"..l_max[3].."s",i,v["basename"],v["familyname"],path))
+ end
else
- print(string.format("%4d. %"..l_max[1].."s %"..l_max[3].."s",i,v["basename"],path))
+ if args_xetex then
+ print(string.format("%4d. %"..l_max[1].."s %"..l_max[3].."s".." %3s",i,v["basename"],path,kpsewhich))
+ else
+ print(string.format("%4d. %"..l_max[1].."s %"..l_max[3].."s",i,v["basename"],path))
+ end
end
end
Modified: trunk/Master/texmf-dist/doc/man/man1/luafindfont.1
===================================================================
--- trunk/Master/texmf-dist/doc/man/man1/luafindfont.1 2022-05-02 19:42:09 UTC (rev 63209)
+++ trunk/Master/texmf-dist/doc/man/man1/luafindfont.1 2022-05-02 19:57:54 UTC (rev 63210)
@@ -22,6 +22,8 @@
for the font with the given number
.IP -v,--verbose Verbosity level
Give more informations, by now only -v works
+.IP -x,--xetex
+test, if font is found by xetex via kpsewhich
.IP -m,--max_string (default 90)
The maximum of the stringlength of the full path of fonts
.IP -n,--nosymbolicnames
Modified: trunk/Master/texmf-dist/doc/man/man1/luafindfont.man1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/support/luafindfont/CHANGELOG
===================================================================
--- trunk/Master/texmf-dist/doc/support/luafindfont/CHANGELOG 2022-05-02 19:42:09 UTC (rev 63209)
+++ trunk/Master/texmf-dist/doc/support/luafindfont/CHANGELOG 2022-05-02 19:57:54 UTC (rev 63210)
@@ -1,3 +1,4 @@
+0.07 2022-05-01 - added -x option for a kpsewhich test
0.06 2022-02-08 - small fix for output log
0.05 2021-12-04 - use always lowercase for internal search
- allow combined search like "times & bold"
Modified: trunk/Master/texmf-dist/doc/support/luafindfont/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/support/luafindfont/README.md 2022-05-02 19:42:09 UTC (rev 63209)
+++ trunk/Master/texmf-dist/doc/support/luafindfont/README.md 2022-05-02 19:57:54 UTC (rev 63210)
@@ -14,6 +14,7 @@
- -h,--help
- -o,--otfinfo (default 0)
- -i,--info (default 0)
+- -x,--xetex
- -v,--verbose
- -m,--max_string (default 90)
- -n,--nosymbolicnames
Deleted: trunk/Master/texmf-dist/doc/support/luafindfont/exa01.txt
===================================================================
--- trunk/Master/texmf-dist/doc/support/luafindfont/exa01.txt 2022-05-02 19:42:09 UTC (rev 63209)
+++ trunk/Master/texmf-dist/doc/support/luafindfont/exa01.txt 2022-05-02 19:57:54 UTC (rev 63210)
@@ -1,11 +0,0 @@
-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
Deleted: trunk/Master/texmf-dist/doc/support/luafindfont/exa02.txt
===================================================================
--- trunk/Master/texmf-dist/doc/support/luafindfont/exa02.txt 2022-05-02 19:42:09 UTC (rev 63209)
+++ trunk/Master/texmf-dist/doc/support/luafindfont/exa02.txt 2022-05-02 19:57:54 UTC (rev 63210)
@@ -1,16 +0,0 @@
-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
Deleted: trunk/Master/texmf-dist/doc/support/luafindfont/exa03.txt
===================================================================
--- trunk/Master/texmf-dist/doc/support/luafindfont/exa03.txt 2022-05-02 19:42:09 UTC (rev 63209)
+++ trunk/Master/texmf-dist/doc/support/luafindfont/exa03.txt 2022-05-02 19:57:54 UTC (rev 63210)
@@ -1,34 +0,0 @@
-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
Deleted: trunk/Master/texmf-dist/doc/support/luafindfont/exa04.txt
===================================================================
--- trunk/Master/texmf-dist/doc/support/luafindfont/exa04.txt 2022-05-02 19:42:09 UTC (rev 63209)
+++ trunk/Master/texmf-dist/doc/support/luafindfont/exa04.txt 2022-05-02 19:57:54 UTC (rev 63210)
@@ -1,14 +0,0 @@
-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 |
Deleted: trunk/Master/texmf-dist/doc/support/luafindfont/exa05.txt
===================================================================
--- trunk/Master/texmf-dist/doc/support/luafindfont/exa05.txt 2022-05-02 19:42:09 UTC (rev 63209)
+++ trunk/Master/texmf-dist/doc/support/luafindfont/exa05.txt 2022-05-02 19:57:54 UTC (rev 63210)
@@ -1,28 +0,0 @@
-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/
Deleted: trunk/Master/texmf-dist/doc/support/luafindfont/exa06.txt
===================================================================
--- trunk/Master/texmf-dist/doc/support/luafindfont/exa06.txt 2022-05-02 19:42:09 UTC (rev 63209)
+++ trunk/Master/texmf-dist/doc/support/luafindfont/exa06.txt 2022-05-02 19:57:54 UTC (rev 63210)
@@ -1,19 +0,0 @@
-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/
Modified: trunk/Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.tex 2022-05-02 19:42:09 UTC (rev 63209)
+++ trunk/Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.tex 2022-05-02 19:57:54 UTC (rev 63210)
@@ -1,4 +1,4 @@
- %% $Id: luafindfont-doc.tex 341 2021-12-05 10:38:08Z herbert $
+ %% $Id: luafindfont-doc.tex 533 2022-05-01 18:31:44Z herbert $
%
\listfiles\setcounter{errorcontextlines}{100}
\documentclass[paper=a4,fontsize=11pt,DIV=14,parskip=half-,
@@ -37,7 +37,7 @@
\usepackage{xltabular,pdflscape}
\usepackage{hvlogos} % for Wikipedia W
\usepackage{listings}
-\usepackage{dtk-extern} % for Wikipedia W
+\usepackage{hvextern} % for Wikipedia W
\lstset{basicstyle=\ttfamily\small,language=[LaTeX]TeX}
\usepackage{ragged2e}
\usepackage{makeidx}\makeindex
@@ -77,9 +77,9 @@
\def\setVersion#1{\setVVersion#1!!}
\def\setVVersion#1=#2!!{\def\luafindfontVersion{#2}}
-\setVersion{version = 0.06}% can be automatically changed by perl
+\setVersion{version = 0.07}% can be automatically changed by perl
-\setkeys{dtk}{cleanup=true,force}
+\setkeys{hv}{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}}}
@@ -166,6 +166,7 @@
-h,--help
-o,--otfinfo (default 0)
-i,--info (default 0)
+ -x,--xetex
-n,--nosymbolicnames
-v... Verbosity output
-m,--max_string (default 90)
@@ -292,7 +293,31 @@
is a BoldItalic version.
+\subsection{Option \texttt{-x}}\label{xetex}
+\XeTeX\ will find OpenType and TrueType fonts only, if they are part of the system fonts or
+found by \texttt{kpsewhich} by its filename. With the option \texttt{-x} you'll an additional
+column, which shows if the font is found by \texttt{kpsewhich} (1) or not (0). If not, then
+it is obvious, that you have to update the filename database of the \TeX\ distribution in
+the usual way by running \texttt{texhash} or via a menu entry if using a file manager.
+
+
+
+\begin{Verbatim}
+bash-3.2$ ./luafindfont.lua -x PStricksdotfont
+We are using Lua 5.3
+Looking for font "pstricksdotfont"
+No. Fontname Symbolic Name Path X
+ 1. myFont.otf pstricksdotfont /usr/local/texlive/texmf-local/fonts/opentype/ 0
+ 2. PSTricksDotFont.otf pstricksdotfont /usr/local/texlive/texmf-local/fonts/opentype/ 1
+\end{Verbatim}
+
+
+The font \texttt{myFont.otf} is found by \LuaTeX\ but not by \XeTeX.
+
+
+
+
\section{Examples}
\begin{Verbatim}
Modified: trunk/Master/texmf-dist/scripts/luafindfont/luafindfont.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/luafindfont/luafindfont.lua 2022-05-02 19:42:09 UTC (rev 63209)
+++ trunk/Master/texmf-dist/scripts/luafindfont/luafindfont.lua 2022-05-02 19:57:54 UTC (rev 63210)
@@ -4,10 +4,10 @@
-- 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
+-- AUTHOR: Herbert Voß (C) 2022-05-01
-----------------------------------------------------------------------
luafindfont = luafindfont or { }
- local version = 0.06
+ local version = 0.07
luafindfont.version = version
--[[
@@ -63,6 +63,7 @@
-n,--nosymbolicnames
-o,--otfinfo (default 0)
-i,--info (default 0)
+ -x, --xetex
-v, --verbose
-m,--max_string (default 90)
<font> (string) ]])
@@ -70,6 +71,8 @@
args_verbose = 1
elseif arg[i] == "-n" or arg[i] == "--nosymbolicnames" then
args_nosymbolicnames = 1
+ elseif arg[i] == "-x" or arg[i] == "--xetex" then
+ args_xetex = 1
elseif arg[i] == "-o" or arg[i] == "--otfinfo" then
local o_arg = arg[i+1]
otfinfo_arg = "i"
@@ -174,10 +177,12 @@
end
function readBinaryOrZippedFile(file)
- print("Check for file "..file)
+ if vlevel > 0 then print("Check for file "..file..".luc") end
local f,err = io.open (file..".luc", "rb")
if not f then
- if vlevel > 0 then print("There is no binary data file ... ") end
+ if vlevel > 0 then
+ print("There is no binary data file ... checking for lua.gz")
+ 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
@@ -308,20 +313,43 @@
local SymbolicName = "Symbolic Name"
local lfdNr = "No."
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))
+ if args_xetex then
+ print(string.format("%5s %"..l_max[1].."s %"..l_max[2].."s %"..l_max[3].."s".."%4s",lfdNr,Fontname,SymbolicName,Path,"X"))
+ else
+ print(string.format("%5s %"..l_max[1].."s %"..l_max[2].."s %"..l_max[3].."s",lfdNr,Fontname,SymbolicName,Path))
+ end
+else
+ if args_xetex then
+ print(string.format("%5s %"..l_max[1].."s %"..l_max[3].."s".."%4s",lfdNr,Fontname,Path,"X"))
else
- print(string.format("%4s %"..l_max[1].."s %"..l_max[3].."s",lfdNr,Fontname,Path))
+ print(string.format("%5s %"..l_max[1].."s %"..l_max[3].."s",lfdNr,Fontname,Path))
+ end
end
+local kpsewhich = "0" -- test if font is present for xetex
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
+ local exrun = io.popen("kpsewhich "..v["basename"],'r')
+ if string.len(exrun:read('*all')) > 0 then
+ kpsewhich = "1"
+ else
+ kpsewhich = "0"
+ 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))
+ if args_xetex then
+ print(string.format("%4d. %"..l_max[1].."s %"..l_max[2].."s %"..l_max[3].."s".." %3s",i,v["basename"],v["familyname"],path,kpsewhich))
+ else
+ print(string.format("%4d. %"..l_max[1].."s %"..l_max[2].."s %"..l_max[3].."s",i,v["basename"],v["familyname"],path))
+ end
else
- print(string.format("%4d. %"..l_max[1].."s %"..l_max[3].."s",i,v["basename"],path))
+ if args_xetex then
+ print(string.format("%4d. %"..l_max[1].."s %"..l_max[3].."s".." %3s",i,v["basename"],path,kpsewhich))
+ else
+ print(string.format("%4d. %"..l_max[1].."s %"..l_max[3].."s",i,v["basename"],path))
+ end
end
end
Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds 2022-05-02 19:42:09 UTC (rev 63209)
+++ trunk/Master/tlpkg/libexec/ctan2tds 2022-05-02 19:57:54 UTC (rev 63210)
@@ -3415,7 +3415,7 @@
);
-# scripts to install under texmf*/.../scripts, but not bindir.
+# scripts to install under texmf*/.../scripts, but no bindir links.
%specialscripts_nobin = (
'albatross' => '\.jar$',
'bib2gls' => '\.jar$',
@@ -3514,7 +3514,7 @@
'ltxfileinfo' => 'ltxfileinfo$',
'ltximg' => 'ltximg\.pl$',
'lua2dox' => 'lua2dox_filter?$',
- 'luafindfont' => 'luafindfont.lua',
+ 'luafindfont' => 'luafindfont\.lua$',
'luaotfload' => 'luaotfload-tool',
'lwarp' => 'lwarpmk.lua',
'm-tx' => 'm-tx.lua',
@@ -4158,6 +4158,7 @@
&dodvi;
# rebuild again, as we have .dvi files now
&buildfilelist;
+ &doscripts; # scripts first since otherwise may match tex
&dobst;
&domp;
&dobib;
@@ -4167,7 +4168,6 @@
&doomega;
&dosource;
&dotype1;
- &doscripts;
&dotexinfos;
&doinfos;
&domans;
@@ -4249,6 +4249,7 @@
# move the runtime files
sub dotex {
my $texpatt = $specialtex{$package} || $standardtex;
+ print "\t DOTEX $texpatt\n";
&install("$DEST/tex/$whichformat/$package", $texpatt);
}
@@ -4256,11 +4257,13 @@
sub domakeindex {
$makeindexpatt = $specialmakeindex{$package};
if ($makeindexpatt eq "") { $makeindexpatt=$standardmakeindex; }
+ print "\t DOMAKEINDEX $makeindexpatt\n";
&install("$DEST/makeindex/$package",$makeindexpatt);
}
# BibTeX style files:
sub dobst {
+ print "\t DOBST\n";
$csfpatt = $specialcsf{$package};
if ($csfpatt eq "") { $csfpatt=$standardcsf; }
&install("$DEST/bibtex/csf/$package",$csfpatt);
@@ -4272,6 +4275,7 @@
# simple MF files, e.g., if specialfoundry eq "metafont".
sub dosimplemf {
my $mfpatt = $specialmf{$package} || $standardmf;
+ print "\t DOSIMPLEMF $mfpatt\n";
&install ("$DEST/metafont/$package", $mfpatt);
}
@@ -4278,6 +4282,7 @@
# MetaPost files:
sub domp {
$mppatt = $specialmp{$package} || $standardmp;
+ print "\t DOMP $mppatt\n";
&install("$DEST/metapost/$package", $mppatt);
}
@@ -4284,6 +4289,7 @@
# BibTeX bibliography files:
sub dobib {
$bibpatt = $specialbib{$package} || $standardbib;
+ print "\t DOBIB $bibpatt\n";
&install("$DEST/bibtex/bib/$package", $bibpatt);
}
@@ -4292,12 +4298,13 @@
$sourceformat = $specialsourcefmt{$package} || $standardsourcefmt;
# default to using specialdocfmt, as we do in setup?
$sourcepatt = $specialsource{$package} || $standardsource;
+ print "\t DOSOURCE $sourcepatt\n";
&install("$DEST/source/$sourceformat/$package", $sourcepatt);
}
# omega files:
-sub doomega
-{
+sub doomega {
+ print "\t DOOMEGA\n";
$ovfpatt = $specialovf{$package};
if ($ovfpatt eq "") { $ovfpatt=$standardovf; }
&install("$DEST/fonts/ovf/public/$package",$ovfpatt);
@@ -4317,6 +4324,7 @@
# the dvips and font mapping files:
sub dotype1{
+ print "\t DOTYPE1\n";
my $encpatt = $specialenc{$package} || $standardenc;
&install("$DEST/fonts/enc/dvips/$package", $encpatt);
@@ -4361,7 +4369,7 @@
# We also make the symlinks/w32-wrapper-copy in Master/bin.
#
sub doscripts {
- print "doing doscripts()...\n";
+ print "\t DOSCRIPTS\n";
my $pwd = getcwd();
my $scriptsdir = "$DEST/scripts/$package";
@@ -4373,6 +4381,7 @@
# first do the user-visible bindir entries.
$scriptpatt = $specialscripts_bin{$package};
if ($scriptpatt) {
+ print " doing bindir pattern $scriptpatt...\n";
if (! $tds_zip) {
&install ($scriptsdir, $scriptpatt);
&SYSTEM ("chmod a+x $scriptsdir/*");
@@ -4391,6 +4400,7 @@
# (and hence also not in Build.)
my $nobin_scriptpatt = $specialscripts_nobin{$package};
if ($nobin_scriptpatt) {
+ print " doing nobin pattern $nobin_scriptpatt...\n";
if (! $tds_zip) {
&install ($scriptsdir, $nobin_scriptpatt);
&SYSTEM ("chmod a+x $scriptsdir/*");
@@ -4497,6 +4507,7 @@
sub doinfos {
my $infopatt = $specialinfos{$package};
return unless $infopatt;
+ print "\t DOINFOS $infopatt\n";
&install ("$TOPDEST/texmf-dist/doc/info/", $infopatt);
}
@@ -4506,6 +4517,7 @@
sub dotexinfos {
my $texipatt = $specialtexinfos{$package};
return unless $texipatt;
+ print "\t DOTEXINFOS $texipatt\n";
local *DOT;
opendir (DOT, ".") || die "opendir(.) failed: $! in " . `pwd`;
@@ -4530,6 +4542,7 @@
sub domans {
my $manpatt = $specialmans{$package};
return unless $manpatt;
+ print "\t DOMANS $manpatt\n";
&install ("$TOPDEST/texmf-dist/doc/man/man1/", $manpatt);
&tl_man_to_pdf (); # make pdfs for them
}
@@ -4590,8 +4603,8 @@
sub runmf {
my ($mfpatt) = @_;
- print "\t doing runmf for $package ($mfpatt)\n";
- print " from filenames: @filenames\n";
+ print "\t RUNMF for package $package ($mfpatt)\n";
+ print "\t against filenames: @filenames\n";
for my $file (grep (/$mfpatt/, @filenames)) {
($FileBase,$Filepath,$Filesuffix) = fileparse ($file, "\.[A-z]*");
if (! -e "$FileBase.tfm") {
More information about the tex-live-commits
mailing list.