No MWE on this occasion, because it's a very general question! Is there any way to create a LaTeX document which prints out all the available characters (eg letters, numbers, old-style numbers, Greek letters and special characters etc) in any specific font set? This would include, regular, bold, italic, bold italic and small capital versions etc. If I could do this, I might be able to anticipate problems arising from the use of a specific font rather than having to react to them!
Asked
Active
Viewed 2,036 times
4
-
Agreed, the question is very similar. Mine is rather more specific, as I actually require the fonts to be be printed out in a LaTeX document so that I can see what the glyphs look like. As is pointed out in a comment to the previous question, the existence of a character in a font doesn't necessarily mean that the necessary support files have been created to support that character. However, the answer is pretty much the same, so if you want to close this question as a duplicate, feel free! – Mark Birtwistle Nov 02 '14 at 14:06
1 Answers
4
The package fonttable and its \fonttable macro show a table of the glyphs in a font. The macro \fonttable requires the name of a font as mandatory argument.
\documentclass{article}
\usepackage{fonttable}
\begin{document}
\fonttable{cmr10}
\end{document}
Edit I will post a version with \xfonttable later on, due to lack of time right now ;-)
-
-
-
1Maybe, but it doesn't require you know the external font name:
\xfonttable{\encodingdefault}{\familydefault}{\mddefault}{\itdefault}will print the table for the italic font, whatever it is for the current document. – egreg Nov 02 '14 at 11:06 -
@egreg: Admitted, as long
\mddefaultetc. are not\renewcommanded ... I will update my answer later on, taking\xfonttableinto account – Nov 02 '14 at 11:11 -
You may add
\newcommand{\cfonttable}[1]{\begingroup#1 \expandafter\endgroup\expandafter\fonttable\expandafter{\fontname\font}}to be called like\cfonttable{\bfseries}or\cfonttable{\sffamily\scshape}or any other combination. – egreg Nov 02 '14 at 11:21 -
Thanks @ChristianHupfer, I've had a quick look at the fonttable documentation, and I will be able to do exactly what I want. I was going to ask how I find out the name of the .tfm file for the font I want (it's not shown in the LaTeX font catalogue), but egreg has provided a nice workaround. – Mark Birtwistle Nov 02 '14 at 11:24
-
Actually, the same question and the same answer already exist here. It's a good sign, of course, that the answer is the same for both occasions :) – Sverre Nov 02 '14 at 13:56
-
It's the same question, but the answer is by me, in two minutes hacked into the editor ;-) – Nov 02 '14 at 15:40