summaryrefslogtreecommitdiff
path: root/support/luafindfont
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-05-06 03:00:50 +0000
committerNorbert Preining <norbert@preining.info>2022-05-06 03:00:50 +0000
commit3e3ecb7f722d0904c12ee0648c343b865dc99187 (patch)
tree8c13ed895e7191ed6c6a583a9730bde9cdd2a92f /support/luafindfont
parentc8185bb3cd55c24b45c9b19c4ea36b8c7057199d (diff)
CTAN sync 202205060300
Diffstat (limited to 'support/luafindfont')
-rw-r--r--support/luafindfont/CHANGELOG2
-rw-r--r--support/luafindfont/doc/luafindfont-doc.pdfbin80641 -> 81978 bytes
-rw-r--r--support/luafindfont/doc/luafindfont-doc.tex209
-rw-r--r--support/luafindfont/man/luafindfont.130
-rwxr-xr-xsupport/luafindfont/scripts/luafindfont.lua50
5 files changed, 120 insertions, 171 deletions
diff --git a/support/luafindfont/CHANGELOG b/support/luafindfont/CHANGELOG
index d809b8dec2..38c1a9726a 100644
--- a/support/luafindfont/CHANGELOG
+++ b/support/luafindfont/CHANGELOG
@@ -1,3 +1,5 @@
+0.08 2022-05-05 - added --no-symbolic-names as a synonym
+ edited some output messages
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
diff --git a/support/luafindfont/doc/luafindfont-doc.pdf b/support/luafindfont/doc/luafindfont-doc.pdf
index 2d71f09f94..4dc4203bd5 100644
--- a/support/luafindfont/doc/luafindfont-doc.pdf
+++ b/support/luafindfont/doc/luafindfont-doc.pdf
Binary files differ
diff --git a/support/luafindfont/doc/luafindfont-doc.tex b/support/luafindfont/doc/luafindfont-doc.tex
index be0ea0c3c8..90d0c57d94 100644
--- a/support/luafindfont/doc/luafindfont-doc.tex
+++ b/support/luafindfont/doc/luafindfont-doc.tex
@@ -37,7 +37,9 @@
\usepackage{xltabular,pdflscape}
\usepackage{hvlogos} % for Wikipedia W
\usepackage{listings}
-\usepackage{hvextern} % for Wikipedia W
+\usepackage{hvextern}
+
+\setkeys{hv}{moveToExampleDir,ExampleDir=Examples,showFilename=false}
\lstset{basicstyle=\ttfamily\small,language=[LaTeX]TeX}
\usepackage{ragged2e}
\usepackage{makeidx}\makeindex
@@ -77,9 +79,9 @@
\def\setVersion#1{\setVVersion#1!!}
\def\setVVersion#1=#2!!{\def\luafindfontVersion{#2}}
-\setVersion{version = 0.07}% can be automatically changed by perl
+\setVersion{version = 0.08}% can be automatically changed by perl
-\setkeys{hv}{cleanup=true,force}
+\setkeys{hv}{cleanup={},force}
\title{Program \texttt{luafindfont} \\--\\ \normalsize \luafindfontVersion\ (\today)}
\author{\shortstack{Herbert Voß\\\small \href{mailto:hvoss@tug.org}{hvoss@tug.org}}}
@@ -93,6 +95,7 @@
\vfill
Thanks to: \\
Gerhard Bachmaier;
+Karl Berry;
Rolf Niepraschk;
\clearpage
@@ -103,53 +106,31 @@ The already existing Lua program \Lprog{luaotfload-tool} can also be used for se
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, where can it be found. For example:
-\begin{Verbatim}[frame=lines,label=luaotfload-tool]
-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}
+
+\begin{externalDocument}[redirect,includegraphic=false,force,code,docType=sh,ext=sh,compiler=sh]{exa}
+#StartVisibleMain
+luaotfload-tool --find=times
+#StopVisibleMain
+\end{externalDocument}
+
+\begin{externalDocument}[redirect,includegraphic=false,force,code,docType=sh,ext=sh,compiler=sh]{exa}
+#StartVisibleMain
+luaotfload-tool --fuzzy --find="times new roman"
+#StopVisibleMain
+\end{externalDocument}
+
+
+
But that 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}[frame=lines,label=luafindfont times]
-bash-3.2$ luafindfont 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}
+\begin{externalDocument}[redirect,includegraphic=false,force,code,docType=sh,ext=sh,compiler=sh]{exa}
+#StartVisibleMain
+luafindfont times
+#StopVisibleMain
+\end{externalDocument}
-%$
\subsection{Syntax}
@@ -167,10 +148,10 @@ long form which, of course, can be mixed:
-o,--otfinfo (default 0)
-i,--info (default 0)
-x,--xetex
- -n,--nosymbolicnames
+ -n,--no-symbolic-names
-v... Verbosity output
-m,--max_string (default 90)
- <font> (string)
+ <(partial) fontname>
\end{Verbatim}
For example:
@@ -225,41 +206,13 @@ The possible options are (i is the default):
\end{Verbatim}
-\begin{Verbatim}[frame=lines,label=luafindfont -o 2f "myriad \& semibold"]
-bash-3.2$ luafindfont -o 2f "myriad & semibold"
-We are using Lua 5.3
-Looking for font "myriad & semibold"
-Check for file /usr/local/texlive/2021/texmf-var/luatex-cache/generic/names/luaotfload-names
- No. Fontname Symbolic Name Path
- 1. MyriadPro-Semibold.otf myriadpro /Users/voss/Library/Fonts/MyriadPro/
- 2. MyriadPro-SemiboldCond.otf myriadpro /Users/voss/Library/Fonts/MyriadPro/
- 3. MyriadPro-SemiboldCondIt.otf myriadpro /Users/voss/Library/Fonts/MyriadPro/
- 4. MyriadPro-SemiboldIt.otf myriadpro /Users/voss/Library/Fonts/MyriadPro/
- 5. MyriadPro-SemiboldSemiCn.otf myriadpro /Users/voss/Library/Fonts/MyriadPro/
- 6. MyriadPro-SemiboldSemiCnIt.otf myriadpro /Users/voss/Library/Fonts/MyriadPro/
- 7. MyriadPro-SemiboldSemiExt.otf myriadpro /Users/voss/Library/Fonts/MyriadPro/
- 8. MyriadPro-SemiboldSemiExtIt.otf myriadpro /Users/voss/Library/Fonts/MyriadPro/
-
-Run otfinfo -f: 2
-otfinfo -f "/Users/voss/Library/Fonts/MyriadPro/MyriadPro-SemiboldCond.otf"
-aalt Access All Alternates
-case Case-Sensitive Forms
-cpsp Capital Spacing
-dnom Denominators
-fina Terminal Forms
-frac Fractions
-kern Kerning
-liga Standard Ligatures
-lnum Lining Figures
-numr Numerators
-onum Oldstyle Figures
-ordn Ordinals
-pnum Proportional Figures
-sinf Scientific Inferiors
-sups Superscript
-tnum Tabular Figures
-zero Slashed Zero
-\end{Verbatim}
+
+
+\begin{externalDocument}[redirect,includegraphic=false,force,code,docType=sh,ext=sh,compiler=sh]{exa}
+#StartVisibleMain
+luafindfont -o 2f "myriad & semibold"
+#StopVisibleMain
+\end{externalDocument}
if no parameter is given, then \texttt{-i} is assumed.
@@ -269,25 +222,13 @@ For a given font number \texttt{luafindfont} will list the font styles which wer
and which correspond to the font number. This is useful if a fontname doesn't has the style in its name or
only in short form.
-\begin{Verbatim}[frame=lines,label=luafindfont -i 4 "myriad \& semibold"]
-bash-3.2$ luafindfont -i 4 "myriad & semibold"
-We are using Lua 5.3
-Looking for font "myriad & semibold"
-Check for file /usr/local/texlive/2021/texmf-var/luatex-cache/generic/names/luaotfload-names
- No. Fontname Symbolic Name Path
- 1. MyriadPro-Semibold.otf myriadpro /Users/voss/Library/Fonts/MyriadPro/
- 2. MyriadPro-SemiboldCond.otf myriadpro /Users/voss/Library/Fonts/MyriadPro/
- 3. MyriadPro-SemiboldCondIt.otf myriadpro /Users/voss/Library/Fonts/MyriadPro/
- 4. MyriadPro-SemiboldIt.otf myriadpro /Users/voss/Library/Fonts/MyriadPro/
- 5. MyriadPro-SemiboldSemiCn.otf myriadpro /Users/voss/Library/Fonts/MyriadPro/
- 6. MyriadPro-SemiboldSemiCnIt.otf myriadpro /Users/voss/Library/Fonts/MyriadPro/
- 7. MyriadPro-SemiboldSemiExt.otf myriadpro /Users/voss/Library/Fonts/MyriadPro/
- 8. MyriadPro-SemiboldSemiExtIt.otf myriadpro /Users/voss/Library/Fonts/MyriadPro/
-
-Font: myriadpro
-
-Fonttype otf(system) --> | Regular | Bold | Italic | BoldItalic |
-\end{Verbatim}
+\begin{externalDocument}[redirect,includegraphic=false,force,code,docType=sh,ext=sh,compiler=sh]{exa}
+#StartVisibleMain
+luafindfont -i 4 "myriad & semibold"
+#StopVisibleMain
+\end{externalDocument}
+
+
For the font number 4 there also exists a Regular, Bold, and a Italic font. The font no 4 itself
is a BoldItalic version.
@@ -303,14 +244,11 @@ the usual way by running \texttt{texhash} or via a menu entry if using a file ma
-\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}
+\begin{externalDocument}[redirect,includegraphic=false,force,code,docType=sh,ext=sh,compiler=sh]{exa}
+#StartVisibleMain
+luafindfont -x PStricksdotfont
+#StopVisibleMain
+\end{externalDocument}
The font \texttt{myFont.otf} is found by \LuaTeX\ but not by \XeTeX.
@@ -320,32 +258,41 @@ The font \texttt{myFont.otf} is found by \LuaTeX\ but not by \XeTeX.
\section{Examples}
-\begin{Verbatim}
-bash-3.2$ luafindfont segoe
-\end{Verbatim}
-\VerbatimInput{Examples/exa01.txt}
+\begin{externalDocument}[redirect,includegraphic=false,force,code,docType=sh,ext=sh,compiler=sh]{exa}
+#StartVisibleMain
+luafindfont segoe
+#StopVisibleMain
+\end{externalDocument}
-\begin{Verbatim}
-bash-3.2$ luafindfont -m 40 libertinus
-\end{Verbatim}
+\begin{externalDocument}[redirect,includegraphic=false,force,code,docType=sh,ext=sh,compiler=sh]{exa}
+#StartVisibleMain
+luafindfont -m 40 libertinus
+#StopVisibleMain
+\end{externalDocument}
-\VerbatimInput{Examples/exa02.txt}
+\begin{externalDocument}[redirect,includegraphic=false,force,code,docType=sh,ext=sh,compiler=sh]{exa}
+#StartVisibleMain
+luafindfont -i 9 sego
+#StopVisibleMain
+\end{externalDocument}
-\begin{Verbatim}
-bash-3.2$ luafindfont -i 9 sego
-\end{Verbatim}
+\begin{landscape}
-\VerbatimInput{Examples/exa04.txt}
+\begin{externalDocument}[redirect,includegraphic=false,force,code,docType=sh,ext=sh,compiler=sh]{exa}
+#StartVisibleMain
+luafindfont -o 6 arial
+#StopVisibleMain
+\end{externalDocument}
-\begin{landscape}
-\begin{Verbatim}[fontsize=\small]
-bash-3.2$ luafindfont -o 6 arial
-\end{Verbatim}
+\begin{externalDocument}[redirect,includegraphic=false,force,code,docType=sh,ext=sh,compiler=sh]{exa}
+#StartVisibleMain
+luafindfont --no-symbolic-names minion
+#StopVisibleMain
+\end{externalDocument}
-\VerbatimInput[fontsize=\small]{Examples/exa03.txt}
\section{List of all fonts}
@@ -363,16 +310,6 @@ This list maybe really long and is shortend here!
\end{landscape}
-\begin{Verbatim}[fontsize=\small]
-bash-3.2$ luafindfont -n minion
-\end{Verbatim}
-
-\VerbatimInput[fontsize=\small]{Examples/exa06.txt}
-
-
-
-
-
\printindex
\end{document}
diff --git a/support/luafindfont/man/luafindfont.1 b/support/luafindfont/man/luafindfont.1
index b3efcdcc07..8bc78a2a59 100644
--- a/support/luafindfont/man/luafindfont.1
+++ b/support/luafindfont/man/luafindfont.1
@@ -1,6 +1,6 @@
.\" Manpage for luafindfont.
.\" Contact hvoss@tug.org to correct errors or typos.
-.TH luafindfont 1 "08 feb 2022" "0.06" "luafindfont man page"
+.TH luafindfont 1 "05 may 2022" "0.08" "luafindfont man page"
.SH NAME
luafindfont
\- retrieve font informations of all installed system and TeX fonts.
@@ -23,10 +23,10 @@ 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
+test, if font is found by xetex via kpsewhich 0->no; 1->yes
.IP -m,--max_string (default 90)
The maximum of the stringlength of the full path of fonts
-.IP -n,--nosymbolicnames
+.IP -n,--no-symbolic-names (altenatively --nosymbolicnames)
The fontlist contains only fontfile and fontpath
.IP <fontname>
Can be a substring, e.g. times, or a combination of two substrings
@@ -34,21 +34,19 @@ which act like a boolean and, e.g. "times & bold" (must be in quotes).
All strings are not case sensitive. Upper and lowercase can be mixed.
.SH EXAMPLES
-$ luafindfont libertinssans
+$ luafindfont libertinussans
.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
+bash-3.2$ ./luafindfont.lua libertinussans
+ No. Fontname Symbolic Name Path
+ 1. LibertinusSans-Bold.otf libertinussans /usr/local/texlive/2022/texmf-dist/fonts/opentype/public/libertinus-fonts/
+ 2. LibertinusSans-Italic.otf libertinussans /usr/local/texlive/2022/texmf-dist/fonts/opentype/public/libertinus-fonts/
+ 3. LibertinusSans-Regular.otf libertinussans /usr/local/texlive/2022/texmf-dist/fonts/opentype/public/libertinus-fonts/
+
.ft R
.fi
@@ -62,8 +60,6 @@ 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
@@ -71,7 +67,7 @@ Check for file /usr/local/texlive/texmf-var/luatex-cache/generic/names/luaotfloa
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
+Running otfinfo on font no.3
Family: Libertinus Sans
Subfamily: Italic
Full name: Libertinus Sans Italic
@@ -90,7 +86,7 @@ Vendor ID: QUE
.fi
.Pp
-The --nosymbilcnames:
+The --no-symbolc-names:
$ luafindfont -n
@@ -100,8 +96,6 @@ This produces the following output:
.nf
.ft CW
bash-3.2$ luafindfont -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/
diff --git a/support/luafindfont/scripts/luafindfont.lua b/support/luafindfont/scripts/luafindfont.lua
index e3389ca9f7..62d0e8cd4f 100755
--- a/support/luafindfont/scripts/luafindfont.lua
+++ b/support/luafindfont/scripts/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) 2022-05-01
+-- AUTHOR: Herbert Voß (C) 2022-05-05
-----------------------------------------------------------------------
luafindfont = luafindfont or { }
- local version = 0.07
+ local version = 0.08
luafindfont.version = version
--[[
@@ -42,12 +42,13 @@ if #arg == 0 then
end
local args_verbose = 0
-local args_nosymbolixnames = 0
+local args_nosymbolicnames = false
local args_otfinfo = 0
local args_info = 0
+local args_xetex = 0
local args_max_string = 90
-local otfinfo_arg
+local otfinfo_arg = ""
local fontNo = 0
local i = 1
@@ -61,6 +62,7 @@ while i <= #arg do
parameter handling
-h,--help
-n,--nosymbolicnames
+ ,--no-symbolic-names
-o,--otfinfo (default 0)
-i,--info (default 0)
-x, --xetex
@@ -69,8 +71,8 @@ while i <= #arg do
<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] == "-n") or (arg[i] == "--nosymbolicnames") or (arg[i] == "--no-symbolic-names") then
+ args_nosymbolicnames = true
elseif arg[i] == "-x" or arg[i] == "--xetex" then
args_xetex = 1
elseif arg[i] == "-o" or arg[i] == "--otfinfo" then
@@ -110,6 +112,16 @@ while i <= #arg do
i = i + 1
end
+if args_verbose > 0 then
+ print("Parameter:")
+ print("args_verbose = "..args_verbose)
+ print("args_nosymbolicnames = "..tostring(args_nosymbolicnames))
+ print("args_xetex = "..args_xetex)
+ print("otfinfo_arg = "..otfinfo_arg)
+ print("fontNo = "..fontNo)
+ print("args_max_string = "..args_max_string)
+end
+
if not args_font then
print("No fontname given, will close ...")
os.exit()
@@ -124,10 +136,13 @@ local font_str = args_font:lower():gsub("%s+", ""):split("&")
if #font_str == 1 then font_str[2] = "" end
local luaVersion = _VERSION
-print("We are using "..luaVersion)
-if font_str[2] ~= "" then
- print('Looking for font \"'..font_str[1]..' & '..font_str[2]..'\"')
-else
+if vlevel > 0 then
+ print("We are using "..luaVersion)
+ if font_str[2] ~= "" then
+ print('Looking for font \"'..font_str[1]..' & '..font_str[2]..'\"')
+ end
+end
+if font_str[1] == "*" or vlevel > 0 then
print('Looking for font \"'..font_str[1]..'\"')
end
@@ -243,7 +258,7 @@ fontData = readBinaryOrZippedFile(fontListFile)
if not fontData then
print("umghhh ....")
- print("It does not work! I'll give it up ... :-(")
+ print("It does not work! I cannote find the base data file ... I'll give it up ... :-(")
os.exit()
end
@@ -290,7 +305,7 @@ local fontList = {}
local l_max = {1, 1, 1}
for i, v in ipairs(fontDataMap) do
if v["familyname"] then
- if (string.find (v["familyname"]:lower(), font_str[1], 1, true) and string.find (v["basename"]:lower(), font_str[2], 1, true) ) or (font_str == "*") then
+ if (string.find (v["familyname"]:lower(), font_str[1], 1, true) and string.find (v["basename"]:lower(), font_str[2], 1, true) ) or (font_str[1] == "*") 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
@@ -312,14 +327,15 @@ local Fontname = "Fontname"
local Path = "Path"
local SymbolicName = "Symbolic Name"
local lfdNr = "No."
+
if (font_str ~= "*") and not noSymbolicNames then
- if args_xetex then
+ if args_xetex > 0 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
+ if args_xetex > 0 then
print(string.format("%5s %"..l_max[1].."s %"..l_max[3].."s".."%4s",lfdNr,Fontname,Path,"X"))
else
print(string.format("%5s %"..l_max[1].."s %"..l_max[3].."s",lfdNr,Fontname,Path))
@@ -339,13 +355,13 @@ for i, v in ipairs(fontList) do
kpsewhich = "0"
end
if (font_str ~= "*") and not noSymbolicNames then
- if args_xetex then
+ if args_xetex > 0 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
- if args_xetex then
+ if args_xetex > 0 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))
@@ -355,7 +371,7 @@ end
if fontNo > 0 then
print()
- print("Run otfinfo -"..otfinfo_arg..": "..fontNo)
+ print("Running otfinfo -"..otfinfo_arg.." on font no."..fontNo)
local font = fontList[fontNo]["fullpath"]
print("otfinfo -"..otfinfo_arg.." \""..font.."\"")
local exrun = io.popen("otfinfo -"..otfinfo_arg.." \""..font.."\"", 'r') -- ".." font may have spaces