Open main menu

Changes

XeTeX Logo
you need to check that syst-xtx.tex(/texmf.local/tex/context/base/) contained the following lines
seems obsolete to me as well. May this be removed/replaced with something like "make sure that you have the latest ConTeXt"? --[[User:Mojca Miklavec|Mojca]]
 
== XeTeX Logo ==
 
<i>This should be moved to a separate page perhaps, but I have to test/adapt/comment it first. I just wanted to write it down before it gets lost (it answered two of my questions at the same time). This was posted to the XeTeX mailing list by Jonathan Kew. <code>\reflectbox</code> is <code>\mirror</code> in ConTeXt!</i> --[[User:Mojca Miklavec|Mojca]] 13:58, 5 May 2006 (CEST)
 
<b>Q:</b> Is there a way to check the character existence from within XeTeX?
 
<b>A:</b>You can use <code>\XeTeXcharglyph"018E</code> to get the glyph ID of character U
+018E in the current font; if the character isn't supported, this will return 0.
 
So you could use something along the lines of
 
<texcode>
\def\XeTeX{\leavevmode
\setbox0=\hbox{X\lower.5ex
\hbox{\kern-.15em
\ifnum\XeTeXcharglyph"018E>0
\char"018E
else\ifdim\fontdimen1\font=0pt
\reflectbox{E}%
\else % rotation is about the origin, so we need to adjust positioning
\XeTeXuseglyphmetrics=1
\setbox0=\hbox{E}\dimen0=\ht0 \advance\dimen0 by \dp0
\raise\dimen0\hbox{\rotatebox{180}{\box0}}%
\fi\fi
}\kern-.1667em \TeX}%
\dp0=0pt \ht0=0pt \box0 }
</texcode>
 
which uses "018E if available, otherwise it uses \reflectbox for unslanted fonts, and <code>\rotatebox</code> for slanted.