3

This question already has an answer here:

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!

marked as duplicate by Sverre, Svend Tveskæg, Werner, Martin Schröder, moewe Nov 2 '14 at 14:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 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 2 '14 at 14:06
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 ;-)

  • The \xfonttable command is even more useful. – egreg Nov 2 '14 at 11:02
  • @egreg: I know, but for a quick overview... \xfonttable requires more input – user31729 Nov 2 '14 at 11:03
  • 1
    Maybe, 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 2 '14 at 11:06
  • @egreg: Admitted, as long \mddefault etc. are not \renewcommanded ... I will update my answer later on, taking \xfonttable into account – user31729 Nov 2 '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 2 '14 at 11:21

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