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.

On a Mac using XeLaTeX and the fontspec package, what is meant by font name?

The Font Book application lists several possibilities:

  • PostScript name
  • Full name
  • Family

I.e. which name should I type into the \setmainfont [⟨font features⟩] {⟨font name⟩} command?

For example, for the font named as Times (top unexpanded item) in Font Book, the following values exist:

 PostScript name: Times-Roman
 Full name:       Times Roman
 Family:          Times

Viewing the Times font in Font Book

share|improve this question
    
Usually it should be what's in the "Family" field –  egreg Feb 8 '12 at 10:43
add comment

3 Answers

up vote 4 down vote accepted

XeTeX checks Full name first if no match and the name has a hyphen, it checks it as Family-Style, if no match checks PostScript name and finally if non of this matches, it will check Family name.

In most cases, you want to use Family name, so that XeTeX takes care of loading various font styles automatically (bold, italic etc.) unless you want only a specific style, then Full or PostScript names would be recommended (e.g. with \newfontface).

share|improve this answer
    
Thanks! Feels good to know a bit more about the inner workings. –  fnurl Feb 8 '12 at 18:41
add comment

Both the Postscript Name and the Full Name should work with XeLaTeX.

share|improve this answer
add comment

with lualatex I use:

\documentclass{article}
\usepackage{unicode-math}
\setmainfont
  [UprightFont = * Roman,
      BoldFont = * Bold,
    ItalicFont = * Italic,
BoldItalicFont = * Bold Italic,
]{Times}
\setmathfont{XITS Math}
\begin{document}

Text $x+y=\sqrt{z}$ \textbf{Text} \textsc{Text}

\end{document}

If you do not have the XITS math then use another math font, like Asana Math

share|improve this answer
    
So to answer the OP's question, the family is a suitable value for the \setmainfont font name. –  Matthew Leingang Feb 8 '12 at 13:13
add comment

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.