# How to get a list of all available (TTF-) Fonts with XeTeX?

Very neat that I can use any available Truetype font on my Windows machien with MikTex and XeTeX.

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[]{article}
\usepackage{xltxtra,fontspec,xunicode}
\defaultfontfeatures{Scale=MatchLowercase}
\title{Fonttest}
\begin{document}
\section{Section Title} {
\setromanfont{Palatino Linotype}
The quick brown fox jumps over the lazy dog.
}
\section{Section Title} {
\setromanfont{ProggyCleanTTSZBP}
The quick brown fox jumps over the lazy dog.
}
\end{document}


Is there a way to automatically generate a fotn test page for every available font? So that I do not have to type a test page for every available font by hand?

Actually, I do not even know how to get to the Long Font Name required for \setromanfont -- short of typing it from the screen. The Windows directory only lists the file names, obviously. Maybe this can be done in TeX itself, but I could manage it with a Python script or such like.

-
If you double click a font, Windows should preview it and show the full name (if I remember correctly; it has been a long time since I used Windows for anything but playing games :) ) –  Caramdir Mar 7 '11 at 20:15
possible duplicate of stackoverflow.com/questions/5109550 –  Philipp Mar 8 '11 at 16:27
Duplicate, yes. Sorry. I first set the bounty on stackoverflow, then after slow reaction found this Tex Board. I will remove the stackoverflow question after the bounty expires, to give everyone the change to earn their points. –  towi Mar 10 '11 at 8:27

Running fc-list utility, e.g. fc-list : family should do (you might need to post process the output for fonts that have localized names), but I'm not sure if texlive ships that part of FontConfig (it does not on Linux, but it is part of system tools anyway). You can also use fc-list -f "%{family}\n" for more customisable output. Check fc-list manual (very terse though, FontConfig's user guide can be a bit helpful as well).
Update: using fc-list :outline -f "%{family}\n" avoids listing bitmap only fonts which are unusable for TeX.
Shouldn't that be fc-list :fontformat=TrueType so that it only lists fonts that are actually usable with fontspec? –  Caramdir Aug 15 '11 at 22:22
fontspec is format neutral, it passes whatever the users asks for to the engine. AFAIK both XeTeX and LuaTeX support several other font formats besides TrueType. –  Khaled Hosny Aug 16 '11 at 1:37
Can I assume that the fc-list utility is always present on systems with XeTeX installed? –  pwuertz Jun 5 '13 at 11:05