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

Jonathan Kew jonathan_kew at sil.org
Wed Jun 28 10:22:34 CEST 2006


On 28 Jun 2006, at 8:10 am, Ralf Stubner wrote:

> Peter Dyballa <Peter_Dyballa at Web.DE> writes:
>
>> So I tried XeLaTeX -- on screen and on paper perfect (and in Adobe
>> Reader, too), maybe because a TTF version of dijkstra is used. But
>> the real problem is with the Lucida Sans family of fonts that comes
>> with others with Java (/System/Library/Frameworks/JavaVM.framework/
>> Versions/{1.3.1,1.4.2,1.5.0}/Home/lib/fonts/):
> [...]
>> LucidaSans-Typewriter and Lucida Bright are fine, but Lucida Sans
>> leads to:
>>
>> 	fontspec.cfg loaded.
>> 	(/usr/local/teTeX/share/texmf.local/tex/xelatex/fontspec/ 
>> fontspec.cfg))
>> 	(/usr/local/teTeX/share/texmf.local/tex/xelatex/xltxtra/xltxtra.sty
>> 	(/usr/local/teTeX/share/texmf.tetex/tex/latex/etex/etex.sty)
>> 	(/usr/local/teTeX/share/texmf.local/tex/latex/base/fixltx2e.sty))
>> 	(/usr/local/teTeX/share/texmf.local/tex/xelatex/xunicode.sty)
>> 	! Cannot use \XeTeXOTcountfeatures with Lucida Sans Demibold; not an
>> OpenType Layout font.

Aha.... this is a fontspec limitation -- you listening, Will? :)

Apparently the Regular font includes GSUB and/or GPOS features, and  
therefore xetex loads it by default using the ICU-based OpenType  
layout engine; and then fontspec can use \XeTeXOTcountfeatures, etc.,  
to examine it further.

But the Demibold face doesn't include these OpenType tables, and  
therefore xetex loads it using the default ATSUI rendering engine  
instead, which supports an entirely different font feature model and  
therefore also a different set of low-level font inspection primitives.

(This applies only on OS X; on other platforms, ATSUI doesn't exist  
and therefore the problem doesn't arise, as there's only one  
renderer..... so far.)

What fontspec needs to do is to check the type of each individual  
font, not just check the Regular and then assume that the other  
members of the family use the same renderer. Or alternatively, it  
could check the regular face, and then explicitly load other members  
with the same renderer.

You should be able to work around it by specifying \setsansfont 
[Renderer=ICU]{Lucida Sans} to fontspec, to tell it you want to use  
ICU for all the Lucida Sans fonts, regardless of what layout tables  
they have (or don't have).


>> 	\zf at check@ot at feat ...OTcountfeatures \zf at basefont
>> 	                                                  \c at zf@script
>
> Interesting. When I try
>
> \documentclass[a4paper]{article}
> \usepackage{fontspec,xltxtra,xunicode}
> \setromanfont[Mapping=tex-text]{LucidaBright}
> \setmonofont{Lucida Sans Typewriter}
> \setsansfont[Mapping=tex-text]{Lucida Sans}
> \begin{document}
> test \textsf{test \textbf{test}} \texttt{test}
> \end{document}
>
> on Linux (XeTeX v0.994a, Rev 292; xdvipdfmx Rev 38; fontspec  
> 2006/06/07
> v1.10), I don't have this problem.

This makes sense, because on Linux there's no ATSUI rendering option  
for xetex to try in the absence of OT-specific font tables.

> However, I get these messages from
> xdvipdfmx:
>
> *** Embedding disabled due to licensing restriction ***
>
> *** Embedding disabled due to licensing restriction ***
>
> *** Embedding disabled due to licensing restriction ***
>
> ** NOTICE: This document contains a `Preview & Print only' licensed  
> font **
>
>
> Indeed pdffonts tells me
>
> name                                 type         emb sub uni  
> object ID
> ------------------------------------ ------------ --- --- ---  
> ---------
> LucidaBright                         CID TrueType no  no  yes       
> 5  0
> LucidaSans                           CID TrueType no  no  yes       
> 7  0
> LucidaSans-Demi                      CID TrueType no  no  yes       
> 9  0
> GEHMAD+LucidaSans-Typewriter         CID TrueType yes yes yes      
> 11  0
>

If you pass the -E option to xdvipdfmx (e.g, xelatex -output- 
driver="xdvipdfmx -E" filename.tex), it will allow you to use the fonts.

>
>> I have put the versions I use into /Library/Fonts. The fontconfig
>> systems knows the font locations in /System/... because I can see
>> fonts.cache-1 files.
>
> Does XeTeX on the Mac use fontconfig? I am surprised.

No, it doesn't.

JK




More information about the XeTeX mailing list