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

jfbu jfbu at free.fr
Sat Jan 30 09:49:05 EST 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:
>> 
>> 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)
> 

Hi, 

I will check and keep you informed ;-)

Changes to texmf-dist/fonts/opentype seem to occur from time to time, I see for example that repertory nimbus15 has modification date Jan 16 22:16, of this year.

I will try to keep an eye to what happens, but I am not yet a fluent XeLaTeX user, most of the time I am still using traditional TeX fonts.

For info, my FontBook managed to open after a while; I had to re-activate the fonts I wanted to get rid off, before "suppressing" them from the Font library. 

At any rate, before next MacTeX2016 which is build upon TeXLive, some means should be found for the Mac OS X specific info to makes its way into TeXLive documentation http://tug.org/texlive/doc/texlive-en/texlive-en.html


best,

Jean-François




More information about the MacOSX-TeX mailing list