[XeTeX] some odds-and-ends questions

Will Robertson will at guerilla.net.au
Wed Jan 19 06:18:51 CET 2005


Hello!

Regarding colour selection, I'm a little unsure of the link between  
using specials (which can do cmyk and all sorts) and using the font  
definition, e.g.:
    \font\tenrm="Cochin:color=CC000099"
(for transparent red).

Am I right in saying that the former method is how it's done in  
'normal' TeX (and what the color package uses), and the latter method  
comes from Mac OS X and avoids any troubles like the color package can  
get into?


Next, I think my definition of the XeTeX logo is a little funny. I've  
noticed in some cases it seems to have extra space preceding it. This  
is what I had:

\def\reflect#1{{\setbox0=\hbox{#1}\rlap{\kern0.5\wd0
   \special{x:gsave}\special{x:scale -1 1}}\box0 \special{x:grestore}}}
\def\XeTeX{\leavevmode
   \setbox0=\hbox{X\lower.5ex\hbox{\kern-.15em\reflect{E}}\kern-.1667em  
\TeX}%
   \dp0=0pt\ht0=0pt\box0}

Since I'm using LaTeX anyway, I edited it some to use \raisebox instead  
of the primitive macros to set the height/depth to zero, and the  
problem goes away:

\def\reflect#1{{\setbox0=\hbox{#1}\rlap{\kern0.5\wd0
   \special{x:gsave}\special{x:scale -1 1}}\box0 \special{x:grestore}}}
\def\XeTeX{\raisebox{0pt}[0pt][0pt]{X\lower.5ex\hbox{\kern- 
.15em\reflect{E}}\kern-.1667em \TeX}}


Finally, I recall that XeTeX has no real knowledge of the height and  
depth of a glyph. For example, \settoheight\xheight{...} of any  
character in a font will give an incorrect number. Also, 1ex  
(\fontdimen5) seems to be equal to 3.9998pt no matter which font is  
chosen (in a 10pt document).

It occurs to me that users would probably like to be able to choose  
fonts without having to worry about x-height difficulties (I, at least,  
would always like the fonts in my document to have the same x-heights).  
My package could do this easily, if I only were able to find out how  
high the characters are. Any comments on whether this would be  
appropriate?

I'm sorry to burden you down with more and more feature requests,  
Jonathan, but would you like to consider adding this to the list as  
well? I'm less interested in the height of each character, but it would  
be fantastic if you could hack in some support for a correct value of  
\fontdimen5 if possible (at a pinch, simply by measuring the height of  
an x, since I cannot).

As always, I'd prefer if you took your time so I can get some real work  
done :)
(I'm sure I'll manage to procrastinate no matter, though.)

Regards,
Will



More information about the XeTeX mailing list