# [OS X TeX] Understanding fonts and fontspec

Herbert Schulz herbs at wideopenwest.com
Sat Dec 8 17:18:50 EST 2012

On Dec 8, 2012, at 4:05 PM, Johann Spies <johann.spies at gmail.com> wrote:

> I am struggling to understand how to use the installed fonts in Texlive 2012.
>
> I have run updmap (and updmap.sys) but do not understand how to use the information in the resultant files.
>
> e.g.  I see the following entry:
>
> pncr8g NewCenturySchlbk-Roman " groffEncoding ReEncodeFont " <groff.enc
>
> And when I try to use it like this:
>
> \setmainfont[Mapping=tex-text]{NewCenturySchlbk-Roman}
>
> and compile using XeLateX, I get:
>
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> !
> ! fontspec error: "font-not-found"
> !
> ! The font "NewCenturySchlbk-Roman" cannot be found.
> !
> ! See the fontspec documentation for further information.
> !
> ! For immediate help type H <return>.
> !...............................................
>
> l.20 ...[Mapping=tex-text]{NewCenturySchlbk-Roman}
>
> So what is the use to me of the information contained in those files?
>
> How do I know the correct names of the fonts (to use in \setmainfont{}?
>
> How do I get a list of all the available fonts to use on my system?
>
> Regards
> Johann

Howdy,

The fonts in the files created via updmap or updmap-sys are for use by latex, pdflatex, and dvips (well a few more things too). When you use xelatex you most likely want to use the fonts available via the Mac OS. Open Font Book and look at the fonts there and use the font names given there; so

\usepackage{fontspec}
\setmainfont{New Century Schoolbook}

should use that font.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)