[XeTeX] On combining diacritics again

John Was john.was at ntlworld.com
Mon Jun 11 16:28:35 CEST 2007


I've sometimes found it simplest to cut the Gordian knot and simply 
superimpose the characters with a simple 'overstrike' macro such as:

\def\overstrike#1#2{\setbox0=\hbox{#1}\setbox1=\hbox{#2}\copy0
   \kern -0.5\wd0 \kern -0.5\wd1 \copy1 \kern -0.5\wd1 \kern 0.5\wd0}

You can then set up \cs definitions such as, say, {\amacronacute} which 
would overstrike a with the acute accent (and if the acute sits too low then 
in #2 of the macro you can put it in an \hbox and \raise it by say 0.05em or 
whatever looks best - one can easily fine-tune the \cs until it looks just 
right, and you can nest \overstrikes if you have really complicated 
accumulations of diacritics on a single letter).  This is clearly a 
hamfisted approach and of course denies you the convenience of seeing a good 
representation of your text in the input file, but it's very secure and 
completely in your control.  It might at least be useful if you have just a 
few troublesome items in the font you want to use.


Best


John



----- Original Message ----- 
From: "John Smith" <jds10 at cam.ac.uk>
To: "Unicode-based TeX for Mac OS X and other platforms" <xetex at tug.org>
Sent: Monday, June 11, 2007 2:34 PM
Subject: JunkEmail: [SPAM] Re: [XeTeX] On combining diacritics again


> On Mon, 11 Jun 2007, Florian Grammel wrote:
>
>> But might
>> be somebody with a better understanding of TeX than me could suggest
>> how one could solve this with a sort of macro? When meeting a glyph
>> from a certain list (e.g. a combining diacritic), this macro would
>> read the dimensions of the antecedent glyph-box and would "kern" the
>> diacritic, so that it a) is placed centred in relation to the box and
>> b) outside of it.
>
> In pre-XeTeX days this kind of requirement was best handled not by
> macros but by creating custom virtual fonts, but these were 8-bit.
> There's nothing logically (that I know of) to rule out the use of
> 16-bit virtual fonts, but as far as I know they aren't a possibility
> right now.
>
> My vpl2vpl program
> (http://bombay.indology.info/software/programs/index.html, follow link
> to accfonts) allows easy creation of accented 8-bit fonts and -- if I
> may say so -- does a pretty respectable job. It would be trivial, but
> as of now not terribly useful, to modify it to produce 16-bit
> output...
>
> John Smith
>
> --
> Dr J. D. Smith
> jds10 at cam.ac.uk
> http://bombay.indology.info
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex
> 


More information about the XeTeX mailing list