[XeTeX] [off-topic] proper OpenType tag for hanging diacritics

John Was john.was at ntlworld.com
Tue Oct 6 10:24:09 CEST 2009


Hello Pablo

Until this can be fixed properly from within the font itself, you might try 
the following approach (this takes as its example Unicode character 1F1D, 
viz. asper acute in front of capital epsilon):


\catcode"1F1D=\active

\def Ἕ{\leavevmode \hbox to 0.2em{\hfill \char"1FDE\hfill}\char"0395}



Then every time you have Ἕ in your file XeTeX will typeset the free-standing 
asper+lenis character (Unicode 1FDE) followed by a capital epsilon (Unicode 
0395).  I have given a 0.2em box but you could try narrowing this down to 
the minimum that will work without generating an overfull \hbox (this is 
likely to be different for each font, but 0.2em is a reasonable 
starting-point).  There should then be (almost) no visible overhang at the 
left-hand side if it occurs at the start of a line in your prose text, _and_ 
you should get the normal interword space when the character occurs in the 
middle of a line.



If this works, then you'll have to spend an hour or so doing it for all the 
relevant characters - it's always surprising just how many combinations 
there are to work through in polytonic Greek, as I discovered recently when 
I used Fontographer to do an amateurish (but functional!) conversion of my 
Porson Greek font to Unicode (I didn't want to use the GFS's version in 
spite of its Open Type features as it has the old upright capitals for 
Porson, whereas nowadays people expect the sloping capitals that were 
substitued in the twentieth century).    You would need to list all these 
\catcode redefenitions somewhere near the top of your file, before you start 
using the Greek.



If you do want visible overhang at line-starts in poetry, say, you could do 
something clever with e.g. \newif\ifpoetry near the start of your file: 
then after \leavevmode in the above you would have \ifpoetry...... \else 
..... \fi:  the code after \else would be as above, and the code after 
\ifpoetry would be something like \llap{\hbox to 0.2em{\hfill 
\char"1FDE\hfill}}\char"0395  (Hope this works - I just thought of it!)



One advantage of this is that when the font is improved (or you move over to 
another font which doesn't have this fault) you can just delete or comment 
out the \catcode definition section, or those parts of it which are no 
longer needed.  You could keep the list of \catcode definitions in a 
separate file which you might need for future use.  Whenever you do need it 
just give \input mycatcodes.tex (or whatever you've called it) in your file.



Anyway, good luck!  (I use edmac all the time in plain XeTeX, but haven't 
investigated the LaTeX variety ledmac - I'm sure it's got more functionality 
and the results certainly look very nice).







John




----- Original Message ----- 
From: "Pablo Rodríguez" <oinos at web.de>
To: "Unicode-based TeX for Mac OS X and other platforms" <xetex at tug.org>
Sent: Tuesday, October 06, 2009 8:07 AM
Subject: Re: [XeTeX] [off-topic] proper OpenType tag for hanging diacritics


> Karl Berry wrote:
>>     I'm afraid that this was the worst way of solving the issue, because 
>> the
>>     effects when composing non-verse texts are obvious,
>>
>> How about reporting the problem to the authors of GFS Baskerville?
>
> Thanks, Karl, for you reply.
>
> Reporting the bug to the Greek Font Society is what I have in mind. But
> I only wanted to know for sure whether optical bounds are the right
> OpenType feature for that. From previous bug reports about their fonts,
> I'm afraid that they don't know OpenType features very well.
>
> This is why I'm asking here about the proper OpenType feature.
>
>
> Pablo
> 



More information about the XeTeX mailing list