[OS X TeX] Using FontBook to help XeTeX find TeXLive/MacTeX distributed fonts

Herbert Schulz herbs at wideopenwest.com
Sun Jan 31 03:07:24 CET 2016

> On Jan 30, 2016, at 7:51 PM, Michael Sharpe <msharpe at ucsd.edu> wrote:
>> On Jan 30, 2016, at 6:23 AM, jfbu <jfbu at free.fr> wrote:
>> for many years I have been a bit frustrated with using XeLaTeX w.r.t. the OpenType fonts as distributed with MacTeX/TeXLive, rather than system fonts or fonts in ~/Library/Fonts.
>> The texlive recipe http://tug.org/texlive/doc/texlive-en/texlive-en.html#x1-340003.4.4 is irrelevant to Mac OS X users, as XeTeX does not use fontconfig for us.
>> The usual recommendation is to make a copy into ~/Library/Fonts of those fonts one is interested into using.
>> Else, under LaTeX+fontspec one must load fonts via filenames, and one then has to specify explicitly the filenames for Bold, Italic, BoldItalic. Which is annoying. Also it makes testing/contributing posts to places like tex.stackexchange.com cumbersome, as people there are not generally using Mac OS X.
> Many font packages in the TeXLIve distribution which contain Opentype fonts also contain one or more .fontspec files, usually located in a .../tex/latex/ branch, that work on all platforms and reduces the effort involved in font selection under xelatex. Just as an example, though not a good one typographically, 
> \usepackage{fontspec}
> \defaultfontfeatures{Mapping=tex-text}
> \setromanfont{erewhon} % reads erewhon.fontspec, extension of 'Utopia' 
> \setsansfont[Scale=MatchLowercase]{zhv} % reads zhv.fontspec in nimbus15, 'Helvetica'
> \setmonofont[Scale=MatchLowercase]{zco} % reads zco.fontspec in nimbus15, 'Courier' Medium
> You can easily create your own .fontspec files along the model of erewhon.fontspec, and no fiddling with FontBook or moving fonts to a Mac font folder is needed.
> Michael


Thanks Michael, that's very interesting. I assume fontspec is picking up those files automatically and the .otf files DON'T have to be associated with FontBook, either in Font Libraries or directly in */Library/Fonts (* = nothing or System or ~). Very interesting indeed.

PS: I usually DON'T use \defaultfontfeatures{Mapping=tex-text} (actually, recent usage would be \defaultfontfeatures{Ligatures=TeX}) since I DON'T want my mono-spaced font to show TeX ligatures (e.g., I don't want -- to become – when using the mono-spaced font); I only give my roman and sans fonts that property.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://www.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex

More information about the macostex-archives mailing list