[XeTeX] A problem with \XeTeXglyph

Jonathan Kew jonathan_kew at sil.org
Sun Jul 10 20:18:57 CEST 2005


On 10 Jul 2005, at 7:05 pm, Stephen Moye wrote:
> ...It works. I thought I might press \XeTeXglyph into service:
>
> %!TEX TS-program =  xetex
> %!TEX encoding =  UTF-8 Unicode
>
> \font\test="Hoefler Text" at 14pt
>
> \newcount\charcount \charcount0
>
> \raggedright
>
> \loop\number\charcount
> \hbox{\test\XeTeXglyph\charcount}
>  \ifnum\charcount<1000 \advance\charcount1 \repeat
>
> \bye
>
> But that produces a page of nonsense. I guess I need to know how  
> \XeTeXglyph works.

So it does. Ouch! That's an xdv2pdf bug, and I know when it would  
have been introduced.... quite a while back. But \XeTeXglyph is  
hardly a mainstream function, and nobody has noticed!

Here's a workaround for you:

% - - - - - - - - - - - - - - - - - - - -
%!TEX TS-program =  xetex
%!TEX encoding =  UTF-8 Unicode

\font\XXX="Times Roman" at 1pt
\font\YYY="Times Italic" at 1pt
\def\FIXFONT{\rlap{\XXX\char32\YYY\char32}}

\font\test="Hoefler Text" at 14pt

\newcount\charcount \charcount0

\raggedright

\loop\number\charcount
\hbox{\test\XeTeXglyph\charcount\FIXFONT}
\ifnum\charcount<1000 \advance\charcount1 \repeat

\bye
% - - - - - - - - - - - - - - - - - - - -

(You really don't want to know why this works!!!) The underlying bug  
should get fixed in the next update I do; it's a pretty trivial  
little thing.

JK



More information about the XeTeX mailing list