6

Is there a package witch allow the printing of a “specimen”¹ of a given font?

I don’t search to print just a neutral table like what \xfonttable{} do. But something more human readable, witch will show list of character depending of the alphabet used (latin, cyrillic, greek) or the kind (currencies, various symbols, dingbats, etc).

It would be great if it exist a command like \specimen{<font name>} witch print on a fool page the whole specimen.

¹ A specimen is a page witch display in a nice rendering the ability and the supported characters of a font. You can see the Anonymous Pro’s example.

  • A specimen is highly dependent on the font. You will include very different characters in a mono font specimen than you would into a renaissance serif specimen. But it is not that hard to set up such a page using packages like lipsum and a bit of TikZ magic (or another sledgehammer to crack that nut). – TeXnician Dec 22 '18 at 21:32
  • I was thinking that such \specimen{} could have some options like mono for mono font as you said, or it could force the display of all a specific laguage characters. Like if I ask \speciment[mono,french,cyrl]{Anonymous Pro} it will display all programming characters and also all extend french character available (like éèêç…) and all cyrillics character of this font. But, it’s not my ask for the moment. If this command could only print all characters of a font and a lipsum text sample, it would be great. – fauve Dec 22 '18 at 21:38
  • You can get all characters of a font with LuaTeX (I have seen this somewhere) and a lipsum text is provided by the package… – TeXnician Dec 22 '18 at 21:50
  • I think it isn’tdoesn’t exist. So I will make a package. It seems the better solution. – fauve Dec 22 '18 at 22:42
  • 2
    You may be interested in ctan.org/pkg/typespec I’d love to know how adapt this for use with fontspec and lualatex, but no luck yet. – Thérèse Dec 23 '18 at 1:29
7

Find the family name of the font and run pdflatex nfssfont from the command line.

Hit return at the first prompt, then the encoding you wish to test, the font family name and then the other font specs (just hit return if you want the proposed default). At the last * prompt type \bigtest\bye and return.

Here's the console output

> pdflatex nfssfont
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/nfssfont.tex
LaTeX2e <2018-12-01>
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/article.cls
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/size10.clo))
No auxiliary output files.

**********************************************
* NFSS font test program version <v2.2d>
*
* Follow the instructions
**********************************************

Input external font name, e.g., cmr10
(or <enter> for NFSS classification of font):

\currfontname= 


*** NFSS classification ***

Font encoding [T1]:

\encoding=T1
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/t1enc.def)
Font family [cmr]:

\family=EBGaramond-LF
Font series [m]:

\series=
Font shape [n]:

\shape=
Font size [10pt]:

\size=
(/usr/local/texlive/2018/texmf-dist/tex/latex/ebgaramond/T1EBGaramond-LF.fd)
Now type a test command (\help for help):)
*\bigtest\bye  
[1{/usr/local/texlive/2018/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
[2] [3] [4]{/usr/local/texlive/2018/texmf-dist/fonts/enc/dvips/ebgaramond/ebgm_
xxcxg5.enc}</usr/local/texlive/2018/texmf-dist/fonts/type1/public/ebgaramond/EB
Garamond-Regular.pfb></usr/local/texlive/2018/texmf-dist/fonts/type1/public/ams
fonts/cm/cmr10.pfb></usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfo
nts/cm/cmr7.pfb></usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfonts
/cm/cmti10.pfb></usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfonts/
cm/cmtt10.pfb>
Output written on nfssfont.pdf (4 pages, 199258 bytes).
Transcript written on nfssfont.log.

and here's an excerpt from page 2:

enter image description here

2

Use the fonttable package. It has many options but you will have to read the documentation (> texdoc fonttable) to get the full glory of what it enables you to do.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.