Am 2011-02-15 04:38, schrieb David J. Perry:
I had the exact same problem last weekend. I constructed an OT feature
to replace a long s with a regular s if followed by a comma, period,
space, etc. The longs-space combination did not work. I am not a
low-level TeX programming kind of guy, but I had learned a bit somewhere
about TeX's "glue" and I wondered if the OT parser did not see the space
character. Thanks to Khaled for confirming this.

David


----- Original Message ----- From: "Khaled Hosny" <khaledho...@eglug.org>
To: "Unicode-based TeX for Mac OS X and other platforms" <xetex@tug.org>
Sent: Monday, February 14, 2011 6:35 PM
Subject: Re: [XeTeX] OT features


On Mon, Feb 14, 2011 at 10:24:14PM +0100, Georg A. Duffner wrote:
For my font project (see www.georgduffner.at/ebgaramond) i have been
playing around with some opentype features. It seems, that
contextual features involving the character "space" don’t work as
expected.

AFAIK, XeTeX processes each word in isolation, so space never part of
context (also in TeX space is not a character/glyph but a kind of a
property named glue, so it does not get handled by OT layout).

Generally speaking, using space in context is fragile and not guaranteed
to work everywhere.

I wanted to implement a feature for latin texts that
replaces "u" at the beginning of a word by a letter that looks like
"v". The rule looks like this:

'init' feature should be more suitable here, but almost all OT engine
supports it for few selected scripts (Arabic mainly). With 'init' it is
the responsibility of the engine to detect word beginning.


Thanks Khaled,

I already feared such implication being the culprit. In this case, the solution was simple since it’s easy to reverse the lookup: replace every "u" by a "v"-like glyph and then make a contextual rule that changes them to a "u"-like one after a letter. But I don’t think I’m gonna keep this as default for latin but rather put it in a stylistic set.

best regards
Georg


--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex

Reply via email to