[OS X TeX] Using FontBook to help XeTeX find TeXLive/MacTeX distributed fonts
jfbu at free.fr
Sat Jan 30 15:23:11 CET 2016
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.
Some weeks ago I was adding some comments on that site, see
and I spent on this occasion some time looking at FontBook.app and discovered the notion of "Font Library".
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.
I then chose "Add Fonts", navigated in the menu via /Library/TeX to "Root", then fonts then opentype. I then selected all repertories and clicked "Open", and after a validating phase which found problems with a few fonts, lo and behold the fonts appeared in my "TeXLive" font library.
I checked that this did not make any modification to the original repertories, but observed a new TeXLive.library file in ~/Library/FontCollections (about 100Kb).
After that compiling for example:
The quick brown fox jumps over the lazy dog
\bfseries The quick brown fox jumps over the lazy dog
\itshape The quick brown fox jumps over the lazy dog
\mdseries The quick brown fox jumps over the lazy dog
works without further ado.
===> I am writing to the list because I don't understand why this procedure is not the one which is prevailingly recommended.<===
One note though: my /usr/local/texlive/2015 is entirely owned by me, I never use sudo to do anything related to it. Thus, I don't know if the procedure above of adding the TeXLive distributed OpenType fonts will work as well with installations where the repertories are owned by root. I guess they at least have the execute bit open to group-other.
Final remark: the dozens of font files under drm/ occupy each a line in the FontBook library list. I chose to "suppress" them from the TeXLive FontBook Library, for a cleaner view of the available fonts.
Really final remark: opening FontBook is now very slow (in fact it doesn't open now, waiting for three minutes... ah ok at last complete; but the drmxxxxx fonts do not disappear, earlier I had "unactivated" them, perhaps that the reason). I think I had a problem of similar type earlier but I forgot.
If anyone has advice on how to improve my procedure please do (the point being that I am keen on avoiding unnecessary duplication of fonts) or please make any additional comment (like the perils of what will happen when the fonts/opentype repertory will get updated by TLU or tlmgr but the "TeXLive" Library in FontBook will lag behing).
----------- 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