[XeTeX] access to composite characters

musa furber musaf at runbox.com
Wed Nov 2 04:23:47 CET 2005


On Nov 2, 2005, at 12:53 AM, Will Robertson wrote:

> 01/11/2005, 11pm - Malte Rosenau wrote:
>
>> what's the best way to typeset latin unicode characters like ?  
>> with XeTeX? The OTF font I'm currently using does not contain the  
>> glyph, so how can I fake it? Is there a recommended way to declare  
>> unicode characters similiarly to the definitions for composite  
>> characters in t1enc.def???
>
> Hi Malte,
>
> The character you're after didn't turn up in my mail reader :) but  
> if you're after fancy accents and so on, then check out Ross  
> Moore's xunicode package. I suspect it'll do what you want.
>
> Sorry my information is a little brief...

If his font does not contain the actual glyph, is this really doing  
to help? Loading xunicode will not get xelatex to render "ṭḥīṣ"  
since those glyphs are missing in the default font.

I think what Malte is after is faking the glyph, like what I  
sometimes have to do to produce "ṣ". Somadevah (see Re: [XeTeX]  
XeTeX segmentation faults, from June 16, 2004) provided this snippet:

####
I had a similar problem and added the following code to the preamble  
(after setting up Hoefler or some OTF font).


%
%Diatop lets you put one character (or accent) above another
\def\diatop[#1|#2]{{\leavevmode\setbox1=\hbox{{#1{}}}\setbox2=\hbox 
{{#2{}}}%
\dimen0=\ifdim\wd1>\wd2\wd1\else\wd2\fi%
\dimen1=\ht2\advance\dimen1by-1ex%
\setbox1=\hbox to1\dimen0{\hss#1\hss}%
\rlap{\raise1\dimen1\box1}%
\hbox to1\dimen0{\hss#2\hss}}}
%
%Redefinitions of \d{}
\def\d#1{\smash{\diatop[\raise-.55em\hbox{\hskip.125em.}|#1]}}
%

\begin{document}

Normal text. \d{H}e\d{r}e are \d{s}o\d{m}e un\d{d}erdots.

\end{document}
####

Unfortunately, the dot placement varies from font to font, and within  
the font from regular to italic.

Every once in a while I ask for a hint on how to adjust the placement  
of the dot when I switch back and forth between regular and italic,  
but so far no luck. Since the dot placement is fine in plain LaTeX,  
shouldn't it be possible to do the same thing with XeTeX? At some  
point usability outweighs philosophical purity.

Regards,
Musa



More information about the XeTeX mailing list