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

jfbu jfbu at free.fr
Sun Jan 31 12:58:35 CET 2016

Le 30 janv. 2016 à 15:37, Herbert Schulz <herbs at wideopenwest.com> a écrit :

>> On Jan 30, 2016, at 8:23 AM, jfbu <jfbu at free.fr> wrote:
>>
>>
>>
>> But it is only today that I decided to put it into practice and I did in FontBook.app File>New Library (my system is localized to French, I don't know the English names). I opted for TeXLive as name.
>>
>> [...]
>>
>> Cheers
>>
>> Jean-François
>
> Howdy,
>
> I used Font Libraries, as you noted above, several years ago and they worked fine for a while. Unfortunately whenever there was a change in texmf-dist/fonts/opentype the whole library became inactive and I had to go into FontBook and activate it again. Rather discouraging.
>
> I haven't used that method in a while but hope you keep up the dialog and let me know how it's behaving for you. Fonts on the Mac have become quite a bit more stable (at least I haven't had to rebuild the font cache in quite a while) so the whole notion of Font Libraries may have stabilized too.

Herb,

I updated today with TLU my installation  and there was new "libertinus" repertory in texmf-dist/fonts/opentype

I added the corresponding fonts to my "TeXLive" FontBook.app font library.

This seemingly only (? not sure) does an update to the corresponding XML file

~/Library/FontCollections/TeXLive.library

after that I could check that for example this test compiles fine

(but see the comments therein for my problems with FontBook crashing my Mac)

--- compile with xelatex

% Tested ok on Dimanche 31 janvier 2016 à 12:22:17

% After today's TLU update

% I added new "libertinus" repertory to FontBook.app's "TeXLive" font library.

% Manipulating FontBook caused a system hang and I needed a hard reboot

% After reboot, FontBook hanged again on automatic re-loading. Needed
% Alt-Cmd-Esc.

% Will try loading it again ... ok, but lasts for ages.

\documentclass{article}
\usepackage{fontspec}
%\setmainfont{Lobster Two}
\setmainfont{Libertinus Serif}
\setsansfont[Scale=MatchLowercase]{Mint Spirit}
\setmonofont[Scale=MatchLowercase]{Nimbus Mono}

\begin{document}

\def\sample {%
The quick brown fox jumps over the lazy dog, 0123456789.

Checking random ligatures ff, fi, --, ---

}

\def\test {\rmfamily\sample\sffamily\sample\ttfamily\sample}

\def\TEST{Regular\par\test \smallskip
\bfseries Bold\par\test \smallskip
\itshape Bold Italic\par\test \smallskip
\mdseries Italic\par \test \bigskip\upshape }

\TEST

\end{document}

----

(I am on Mavericks 10.9.5)

As it seems that manipulating FontBook via the Finder GUI is unstable, I am wondering if there could not be rather a script to recreate the

~/Library/FontCollections/TeXLive.library

xml file.

Possibly I should ping Adam Maxwell about this, as this may arguably be made as part of the job of TLU:

" when something is changed inside opentype/, recreate the TeXLive.library file. "

Jean-François
----------- 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
https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex