Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
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

1 Answer 1

up vote 21 down vote accepted

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.

share|improve this answer
    
This is perfect. I have too check if the names listed are the names I need in my teX document... –  towi Mar 14 '11 at 17:07
1  
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
3  
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
    
@user1313312: It should be available on Linux systems (though it is not mandatory for XeTeX), not sure if it is available as part of TeX distributions on Windows or not. We don’t use FontConfig on Mac. –  Khaled Hosny Jun 5 '13 at 11:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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