Miguel Sousa
unread,Nov 23, 2013, 6:29:58 PM11/23/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to uafd...@googlegroups.com
If you need to do a one-to-many substitution in context (e.g. inserting a kashida in Arabic, extending the headline in Devanagari, or doing something else in Latin), the code below will not work. The error will be 'Unsupported contextual GSUB replacement sequence'.
feature xxxx {
sub CONTEXTBEFORE inputGlyph' CONTEXTAFTER by outputGlyph1 outputGlyph2;
} xxxx;
The solution is to do the one-to-many substitution in a standalone lookup, and then reference that lookup in the context, like so:
lookup ONE2MANY {
sub a by asterisk a asterisk;
sub b by asterisk b asterisk;
} ONE2MANY;
feature xxxx {
sub CONTEXTBEFORE [a b]' lookup ONE2MANY CONTEXTAFTER;
} xxxx;
Note: CONTEXTBEFORE and CONTEXTAFTER can be single glyphs (or glyph classes) or sequences of glyphs (or glyph classes); also, one of them can be omitted if the context is only needed on one side of the input glyphs.
If you test with InDesign, make sure you're using the World-Ready composer. (Since CS6 the WRC option is exposed in the UI.)
M.