OpenType feature tags

Alex Kaczun's picture

Does anyone know of a way to script a feature in OpenType which would allow someone to typeset a carriage return and substitute the first lower case character typed with a substituted upstroke character for a script face?

I can get the following to work:

feature liga {
sub space a' by a.upstroke;
} liga;

But, interesting enough, I can put a unit value in FontLab glyph decimal slot 13 (CR), and script the following:

feature liga {
sub CR a' by a.upstroke;
} liga;

This will complie without errors, but will do nothing in InDesign when I typeset a carriage retun and typeset lower case a.
It will not substitute the upstroke lower case a.

Does anyone have any ideas.

Many thanks in advance.

Alex

Comments

Thomas Phinney's picture

Pretty much every layout engine I know treats the carriage return as the end of the text run. So, trying to get an OpenType contextual substitution that uses a CR followed by another glyph is not likely to work.

Layout engines may also treat the CR and other control codes as special cases and not try to look them up in the font at all, which would defeat other uses of the CR participating in OpenType layout features.

Adobe actually thought about trying to add special "beginning of line" and "end of line" functionality to OpenType. However, these would require pretty active support by the layout engine, so we didn't pursue the idea at the time.

Regards,

T

Syndicate content Syndicate content