Re: [XeTeX] o/ or O/ goes to ø or Ø (oslash or Oslash)

Jonathan Kew jonathan_kew at sil.org
Sun Feb 27 14:20:56 CET 2005


On 27 Feb 2005, at 11:45 am, Will Robertson wrote:

> On 25 Feb 2005, at 11:58 PM, Jonathan Kew wrote:
>
>> I've seen this before, and IIRC it seems to be a ligature in the 
>> Hoefler AAT tables that for some reason can't be turned off. I'd 
>> consider it an Apple font bug. (If you have the Developer Tools 
>> installed, you can run WorldText and see the same thing happen 
>> there.)
>
> How irritating!
>
> In the meantime, looking in FontForge it seems that this feature is 
> part of the "Show Diacritics" options which, as mentioned, don't seem 
> to be able to be turned off. Palatino has the same feature (which 
> again doesn't work in TextEdit but does in WorldText), but this one 
> *can* be turned off.
>
> Could a font mapping fix the problem by inserting a zero width 
> character in between the problem characters? Or would this only work 
> in fonts that actually have this "glyph"?
>

That's an clever idea; yes, a font mapping would be a way to 
"magically" introduce a character that would break the ligature. 
However, if you use it to insert a character code that the font doesn't 
actually support, this will probably render as blank space but disrupt 
the spacing (either at the position where it occurs, or later in the 
line).

Unfortunately, in a quick look at Hoefler Text, I don't immediately see 
any good candidate characters for this trick. You'd want something like 
Zero-Width No-break Space, Zero Width Non-Joiner, Word Joiner, etc. But 
none of them seem to be supported in Hoefler. :-(

Another approach I was going to suggest is to make the slash an active 
character, with a definition such as:

	\catcode`\/=\active
	\def/{\kern0pt\char`\/}

This will prevent the ligature by inserting a (zero-width) explicit 
kern before the slash. However, there is of course the possibility that 
it will disrupt other macros that use the slash for different purposes, 
so it may not be practical in all situations.

JK



More information about the XeTeX mailing list