summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-05-02 19:57:54 +0000
committerKarl Berry <karl@freefriends.org>2022-05-02 19:57:54 +0000
commit72582827168a64968833d01417cc1af5186b0f41 (patch)
treed38425388d590f1cce2bf5f7d87239e7b7e2ccb7
parent238f63289d90ebfcb5dbfaf34ef85bbf4881d3c3 (diff)
luafindfont (2may22)
git-svn-id: svn://tug.org/texlive/trunk@63210 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/luafindfont/luafindfont.lua44
-rw-r--r--Master/texmf-dist/doc/man/man1/luafindfont.12
-rw-r--r--Master/texmf-dist/doc/man/man1/luafindfont.man1.pdfbin25730 -> 24444 bytes
-rw-r--r--Master/texmf-dist/doc/support/luafindfont/CHANGELOG1
-rw-r--r--Master/texmf-dist/doc/support/luafindfont/README.md1
-rw-r--r--Master/texmf-dist/doc/support/luafindfont/exa01.txt11
-rw-r--r--Master/texmf-dist/doc/support/luafindfont/exa02.txt16
-rw-r--r--Master/texmf-dist/doc/support/luafindfont/exa03.txt34
-rw-r--r--Master/texmf-dist/doc/support/luafindfont/exa04.txt14
-rw-r--r--Master/texmf-dist/doc/support/luafindfont/exa05.txt28
-rw-r--r--Master/texmf-dist/doc/support/luafindfont/exa06.txt19
-rw-r--r--Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.pdfbin81252 -> 80641 bytes
-rw-r--r--Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.tex33
-rwxr-xr-xMaster/texmf-dist/scripts/luafindfont/luafindfont.lua44
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds29
15 files changed, 126 insertions, 150 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/luafindfont/luafindfont.lua b/Build/source/texk/texlive/linked_scripts/luafindfont/luafindfont.lua
index 2008194bb7f..e3389ca9f7e 100755
--- a/Build/source/texk/texlive/linked_scripts/luafindfont/luafindfont.lua
+++ b/Build/source/texk/texlive/linked_scripts/luafindfont/luafindfont.lua
@@ -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 @@ while i <= #arg do
-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 @@ while i <= #arg do
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 @@ function getFileLocation()
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 Path = "Path"
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
diff --git a/Master/texmf-dist/doc/man/man1/luafindfont.1 b/Master/texmf-dist/doc/man/man1/luafindfont.1
index 50186a9f523..b3efcdcc07f 100644
--- a/Master/texmf-dist/doc/man/man1/luafindfont.1
+++ b/Master/texmf-dist/doc/man/man1/luafindfont.1
@@ -22,6 +22,8 @@ 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 -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
diff --git a/Master/texmf-dist/doc/man/man1/luafindfont.man1.pdf b/Master/texmf-dist/doc/man/man1/luafindfont.man1.pdf
index 5bc9eec523c..5b1b2e6aec4 100644
--- a/Master/texmf-dist/doc/man/man1/luafindfont.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/luafindfont.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/luafindfont/CHANGELOG b/Master/texmf-dist/doc/support/luafindfont/CHANGELOG
index c71c5f90c5c..d809b8dec2c 100644
--- a/Master/texmf-dist/doc/support/luafindfont/CHANGELOG
+++ b/Master/texmf-dist/doc/support/luafindfont/CHANGELOG
@@ -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"
diff --git a/Master/texmf-dist/doc/support/luafindfont/README.md b/Master/texmf-dist/doc/support/luafindfont/README.md
index f16decd3a2c..6298fc3f95a 100644
--- a/Master/texmf-dist/doc/support/luafindfont/README.md
+++ b/Master/texmf-dist/doc/support/luafindfont/README.md
@@ -14,6 +14,7 @@ parameter handling
- -h,--help
- -o,--otfinfo (default 0)
- -i,--info (default 0)
+- -x,--xetex
- -v,--verbose
- -m,--max_string (default 90)
- -n,--nosymbolicnames
diff --git a/Master/texmf-dist/doc/support/luafindfont/exa01.txt b/Master/texmf-dist/doc/support/luafindfont/exa01.txt
deleted file mode 100644
index e530f26082d..00000000000
--- a/Master/texmf-dist/doc/support/luafindfont/exa01.txt
+++ /dev/null
@@ -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
diff --git a/Master/texmf-dist/doc/support/luafindfont/exa02.txt b/Master/texmf-dist/doc/support/luafindfont/exa02.txt
deleted file mode 100644
index 8c113341de4..00000000000
--- a/Master/texmf-dist/doc/support/luafindfont/exa02.txt
+++ /dev/null
@@ -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
diff --git a/Master/texmf-dist/doc/support/luafindfont/exa03.txt b/Master/texmf-dist/doc/support/luafindfont/exa03.txt
deleted file mode 100644
index 2bb02df1a6a..00000000000
--- a/Master/texmf-dist/doc/support/luafindfont/exa03.txt
+++ /dev/null
@@ -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
diff --git a/Master/texmf-dist/doc/support/luafindfont/exa04.txt b/Master/texmf-dist/doc/support/luafindfont/exa04.txt
deleted file mode 100644
index 5de45e30c6a..00000000000
--- a/Master/texmf-dist/doc/support/luafindfont/exa04.txt
+++ /dev/null
@@ -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 |
diff --git a/Master/texmf-dist/doc/support/luafindfont/exa05.txt b/Master/texmf-dist/doc/support/luafindfont/exa05.txt
deleted file mode 100644
index ddcd0b86a34..00000000000
--- a/Master/texmf-dist/doc/support/luafindfont/exa05.txt
+++ /dev/null
@@ -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/
diff --git a/Master/texmf-dist/doc/support/luafindfont/exa06.txt b/Master/texmf-dist/doc/support/luafindfont/exa06.txt
deleted file mode 100644
index c076ffffd3d..00000000000
--- a/Master/texmf-dist/doc/support/luafindfont/exa06.txt
+++ /dev/null
@@ -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/
diff --git a/Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.pdf b/Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.pdf
index 11fa8bff88c..2d71f09f948 100644
--- a/Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.pdf
+++ b/Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.tex b/Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.tex
index b896d5953a5..be0ea0c3c80 100644
--- a/Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.tex
+++ b/Master/texmf-dist/doc/support/luafindfont/luafindfont-doc.tex
@@ -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@tug.org}{hvoss@tug.org}}}
@@ -166,6 +166,7 @@ long form which, of course, can be mixed:
-h,--help
-o,--otfinfo (default 0)
-i,--info (default 0)
+ -x,--xetex
-n,--nosymbolicnames
-v... Verbosity output
-m,--max_string (default 90)
@@ -292,6 +293,30 @@ For the font number 4 there also exists a Regular, Bold, and a Italic font. The
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}
diff --git a/Master/texmf-dist/scripts/luafindfont/luafindfont.lua b/Master/texmf-dist/scripts/luafindfont/luafindfont.lua
index 2008194bb7f..e3389ca9f7e 100755
--- a/Master/texmf-dist/scripts/luafindfont/luafindfont.lua
+++ b/Master/texmf-dist/scripts/luafindfont/luafindfont.lua
@@ -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 @@ while i <= #arg do
-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 @@ while i <= #arg do
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 @@ function getFileLocation()
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 Path = "Path"
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
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index 6f428ddb1f8..9e7c53ad992 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -3415,7 +3415,7 @@ $standardttf = '\.ttf|\.TTC';
);
-# 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 @@ $standardttf = '\.ttf|\.TTC';
'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 @@ sub donormal {
&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 @@ sub donormal {
&doomega;
&dosource;
&dotype1;
- &doscripts;
&dotexinfos;
&doinfos;
&domans;
@@ -4249,6 +4249,7 @@ sub dodvi {
# 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 dotex {
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,18 +4275,21 @@ sub dobst {
# 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);
}
# MetaPost files:
sub domp {
$mppatt = $specialmp{$package} || $standardmp;
+ print "\t DOMP $mppatt\n";
&install("$DEST/metapost/$package", $mppatt);
}
# BibTeX bibliography files:
sub dobib {
$bibpatt = $specialbib{$package} || $standardbib;
+ print "\t DOBIB $bibpatt\n";
&install("$DEST/bibtex/bib/$package", $bibpatt);
}
@@ -4292,12 +4298,13 @@ sub dosource {
$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 @@ sub doomega
# 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 @@ sub dotype1{
# 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 @@ sub doscripts {
# 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 @@ sub doscripts {
# (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 doscripts {
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 doinfos {
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 dotexinfos {
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 domf {
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") {