I need to display some very small numbers in my document (3-5 pt). I want to test out all available fonts within my installation at this size, to find which produces the most readable numbers. Is there a simple way to produce this output (i.e. generate a document which contains a sample text displayed in all fonts at the specified size)??
Tell me more
×
TeX - LaTeX Stack Exchange is a question and answer site for
users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
|
The following ConTeXt/LuaTeX solution prints a pdf with all available fonts in the font size 4pt. Beware: It takes a long time to process and consumes lots of memory. Edit: I replaced the ugly unix command dependency of
\def\sample{Some Sample text\crlf}
\def\testfont#1{\definedfont[name:#1 at 4pt] #1: \sample}
\starttext
\executesystemcommand {mtxrun --script fonts --list --all --pattern=* > \jobname.filelist}
\startluacode
myfile = assert(io.open('\jobname.filelist', 'r'))
for line in myfile:lines() do
local first, second, third = line:match '(%S+)'
if first~= nil then
context('\\testfont{')
context(line)
context('}')
end
end
myfile:close()
\stopluacode
\stoptext
This is a screenshot of the first few fonts:
Edit: Unfortunately there is no method for reading the database directly from within Lua (see: How do I get a list of all available fonts for luaotfload). You either have to use an external command or read in the database file ( |
|||||
|

fc-list, see How to get a list of all available (TTF-) Fonts with XeTeX. – Marco Nov 29 '11 at 14:29fc-listshows the open and true type fonts of the TeX system only with a special config file, eg the TeX Gyre fonts – Herbert Nov 29 '11 at 15:12fc-list? – Marco Nov 30 '11 at 10:11