[XeTeX] XeTeX 0.994a and fontspec 1.10 on Mac OS X and Lucida Sans fonts from Java

Will Robertson wspr81 at gmail.com
Wed Jun 28 17:09:13 CEST 2006

On 28/06/2006, at 17:52 , Jonathan Kew wrote:

> Peter Dyballa <Peter_Dyballa at Web.DE> writes:
>> 	! Cannot use \XeTeXOTcountfeatures with Lucida Sans Demibold; not an
>> OpenType Layout font.
> Aha.... this is a fontspec limitation -- you listening, Will? :)

Okay, here's a quick patch for fontspec.sty.
If Peter, at least, could try it out and report if it works generally  
(i.e., no other documents that you test break), I'd be most grateful.  
It certainly fixes the error resulting from

%%% test.ltx %%%
\fontspec{Lucida Sans Regular}
test \textbf{test}

Here's the fix:
In fontspec.sty, v1.10, go to lines 161--163:

   \unless\ifdefined\zf at basefont
     \font\zf at basefont="\zf at fontname\zf at suffix" at \f at size pt

Replace those three lines with:

   \unless\ifdefined\zf at basefont
     \font\zf at basefont="\zf at fontname" at \f at size pt
   \zf at set@font at type
   \ifx\zf at suffix\@empty
     \ifzf at atsui
       \def\zf at suffix{/AAT}%
       \ifzf at icu
         \def\zf at suffix{/ICU}%

(You can see that I don't like collapsing nested \fi's :)

What the code does is set the renderer automatically to whatever is  
chosen by default for the base font passed to \fontspec. It seems to  
work fine, and although I'm not 100% sure that I've tied up all the  
loose ends (all this [Renderer=] and OpenType [Script=] and  
[Language=] stuff has introduced some convolutions in the feature  
processing), I'm pretty sure it should work properly.

Stayed tuned for an eventual 1.11 which will include this patch  
amongst other small changes.


More information about the XeTeX mailing list