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

Herbert Schulz herbs at wideopenwest.com
Sat Jan 30 15:37:04 CET 2016


> On Jan 30, 2016, at 8:23 AM, jfbu <jfbu at free.fr> wrote:
> 
> Hi everybody,
> 
> 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
> 
> http://tex.stackexchange.com/questions/287705/making-a-new-font-family-based-on-the-default-font/287711#comment695929_287711
> 
> 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:
> 
> \documentclass{article}
> 
> \usepackage{fontspec}
> 
> \setmainfont{GFS Didot}
> 
> \begin{document}
> 
> 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 
> \end{document}
> 
> 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).
> 
> 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.

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
                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



More information about the macostex-archives mailing list