[XeTeX] \fontname bugs?

Will Robertson will at guerilla.net.au
Mon Jan 16 07:40:59 CET 2006


Bug? XeTeX 0.99b:

\font\1="Hoefler Text/B" at 10pt
% output: "Hoefler Text Black/B"
% Shouldn't the "/B" disappear after the bold font name is resolved?

Rationale: I want to present better error messages in fontspec. I  
have a macro that holds the user's requested font name, say, \def\fn 
{Hoefler Text}. When dealing with the italic and bold fonts, this is  
changed to \def\fn{Hoefler Text/B}; if I resolve this name (as  
above), then strip the quotes, it will function the same in the  
macros that use it but will make more sense when displayed.



P.S. It seems a side effect of TeX's "weird" parsing of the arguments  
of \font that
   \font\1="Hoefler Text"        \fontname\1
   \font\1="Hoefler Text" at 12pt\fontname\1
return 'nullfont' and '"Hoefler Text"' respectively -- not what I  
expected (a \relax fixes things, which was this time indeed  
expected). I checked, and pdfTeX behaves the same.

More information about the XeTeX mailing list