[OS X TeX] strange behaviour on Intel Macs of \NewOSXFontFamily (XeLateX; TeXshop)

Jonathan Kew jonathan_kew at sil.org
Fri Jul 13 03:05:23 EDT 2007


On 13 Jul 2007, at 7:26 am, Peter Robinson wrote:

> Dear everyone (this is my first posting to this list..)
> I am happily using XeLateX in TeXshop to typeset the next number of  
> Variants.  This package is lovely in its support for unicode, and  
> the full range of Macintosh fonts.
> I have been using this for a few years on older Macs, no problems.   
> However, when running the package on my newest Intel Mac, I hit  
> this error message:
>
>
>
> ! Font \testfont=Baskervilleat10pt not loadable: Metric (TFM) file  
> or installed
> font not found.
> <to be read again>
>                    \font
> l.21 \NewOSXFontFamily{baskerville}{Baskerville}
>                   (./toc.aux)
> ?
>

This looks like you've been using the old osxfonts.sty file from the  
early XeTeX days, and now you've installed a newer distribution where  
it no longer works. (Sorry!)

Simple solution: switch to the fontspec package for all your XeLaTeX  
font specifications. That's a far more capable package anyway. E.g.,

   \usepackage{fontspec}
   \setmainfont{Baskerville}

See "texdoc fontspec" for extensive documentation of many more  
features and options.

The underlying cause of your problem is that there was a change in  
how filenames and font names are scanned (to be more compatible with  
pdfTeX).... it is now necessary to have a space after the font name  
and before the "at <size>", even if the font name is in quotes.

You could probably fix this by modifying osxfonts.sty to include an  
explicit space wherever it defines a quoted font name with  
\DeclareFontShape.... e.g.,
         \DeclareFontShape{U}{#1}{m}{n}{<-> "#2"}{} % regular
would become
         \DeclareFontShape{U}{#1}{m}{n}{<-> "#2"\space}{} % regular
and similarly for other instances. (Untested.) However, using  
fontspec is a **much** better idea. That file was just a quick "proof  
of concept"; I should remove it from the samples archive now that  
it's obsolete.

JK




------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the MacOSX-TeX mailing list