I am trying to get XeTeX to generate a table of all the possible glyphs of a given font, but can not figure out how to make XeTeX know how many glyphs the font has, so I have to specify an exact number.
This is what I have got so far:
\documentclass[border=0.5cm,10pt,landscape]{standalone}
\usepackage{geometry}
\usepackage{xunicode, xltxtra}
\usepackage{fontspec}
\usepackage{multicol}
\setmainfont[Mapping=tex-text, Ligatures={Historical}, Alternate=0]{Linux Libertine O}
\setlength{\columnsep}{0.3cm}
\setlength{\columnseprule}{1pt}
\begin{document}
\begin{multicols}{10}
\newcount\charcount
\charcount=0
\loop
\number\charcount \hspace{1ex} \XeTeXglyph\charcount
\par
\ifnum\charcount<2500
\advance\charcount1
\repeat
\end{multicols}
\end{document}
Fig. 1: Example of the output.
How can it automatically know the exact number of accessible glyphs?
Bonus: Is anyone willing to waste his time by making it put everything inside a table with 10 columns? :-) It also reports an error probably caused by multicol
which a I could not fix yet.