Dear fellow XeTeX users --

The following short program iterates through a list of all system fonts (already indexed into D:\Fonts.txt) and displays a short sample text followed by the font filename.  I would prefer it if the font filename could be replaced by the actual font name by which the font is known to the system, but I can find no appropriate primitive in the output from "TeXdoc XeTeX"; can anyone help, please ?

Philip Taylor
--------
% !TeX Program=XeTeX

\magnification \magstep 4

\vsize = 210 true mm

\hsize = 297 true mm

\pdfpagewidth = \hsize

\pdfpageheight = \vsize

\advance \hoffset by -1 true in

\advance \voffset by -1 true in

\newdimen \margin

\margin = 1 cm

\advance \hsize by -2 \margin

\advance \vsize by -2 \margin

\advance \hoffset by \margin

\advance \voffset by \margin

\parindent 0 pt


\begingroup

    \catcode `\_ = \catcode `\@

    \everypar = {\shewfont}

    \obeylines \def \shewfont #1

        {\hbox to 0,5 \hsize {\font \thisfont = "[#1]" at 10 pt \thisfont Sample / SAMPLE\hfil }{\rm}}\par%

    \input d:/fonts.txt

\endgroup

\end


Where D:/Fonts.txt starts :


Adobe-Caslon-Bold-Italic.otf

Adobe-Caslon-Bold.otf

Adobe-Caslon-Italic.otf

Adobe-Caslon-Semibold-Italic.otf

Adobe-Caslon-Semibold.otf

Adobe-Caslon.otf

AGaramondPro-Bold.otf

AGaramondPro-BoldItalic.otf

AGaramondPro-Italic.otf

AGaramondPro-Regular.otf

...


--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex

Reply via email to