[XeTeX] eTeX font char extensions

Will Robertson wspr81 at gmail.com
Mon Jun 19 04:28:10 CEST 2006


Hi,

Before I forget entirely, eTeX defines some things that XeTeX should  
be aware of. From the eTeX manual

"\iffontchar<font><8-bit number> (test if char exists)
True if \char<8-bit number> in \font<font> exists."

This should probably be extended to support unicode ranges. It  
probably doesn't work for non-TFM fonts (not tested).

"The commands \fontcharht, \fontcharwd, \fontchardp, and \fontcharic
followed by a font specification and a character code, return a  
dimension: the height, width, depth, or italic correction of the  
character in the font, or 0pt if no such character exists."

These don't work in XeTeX currently, as shown in the attached  
document. I guess they also need to be extended for unicode.

It's not urgent, but something that should be addressed (before v1.0  
I guess :).

All the best,

Will

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
\begin{document}
\fboxsep0pt

\font\1=cmr10 at 10pt
\font\2="Palatino" at 10pt

\1 This is Computer Modern (tfm):

\fbox{\char 65}
\fbox{\vrule height \fontcharht\1 65 width \fontcharwd\1 65 depth  
\fontchardp\1 65}

\the\fontcharht\1 65 \endgraf
\the\fontcharwd\1 65 \endgraf
\the\fontchardp\1 65 \endgraf
\the\fontcharic\1 65 \endgraf

\fbox{\char 106}
\fbox{\vrule height \fontcharht\1 106 width \fontcharwd\1 106 depth  
\fontchardp\1 106}

\the\fontcharht\1 106 \endgraf
\the\fontcharwd\1 106 \endgraf
\the\fontchardp\1 106 \endgraf
\the\fontcharic\1 106 \endgraf

\vskip 1cm

\2 This is Palatino (atsui)

\fbox{\char 65}
\fbox{\vrule height \fontcharht\2 65 width \fontcharwd\2 65 depth  
\fontchardp\2 65}

\the\fontcharht\2 65 \endgraf
\the\fontcharwd\2 65 \endgraf
\the\fontchardp\2 65 \endgraf
\the\fontcharic\2 65 \endgraf

\fbox{\char 106}
\fbox{\vrule height \fontcharht\2 106 width \fontcharwd\2 106 depth  
\fontchardp\2 106}

\the\fontcharht\2 106 \endgraf
\the\fontcharwd\2 106 \endgraf
\the\fontchardp\2 106 \endgraf
\the\fontcharic\2 106 \endgraf
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



More information about the XeTeX mailing list