Reverse chained contextual substitution?
Options

Simon Cozens
Posts: 793
Has anyone ever implemented GSUB type 8 lookups? Yannis Haralambous' book tells me that it was specifically designed for Urdu but I'm not sure I believe him, and I don't know of any Urdu fonts that use it. Does any font editing software even support it? (FontForge apparently crashes when it sees one.) The only examples of it I've found on github are AFDKO test files.
More to the point, can't reverse contextual substitutions always be rewritten in terms of forward contextual substitutions? What is the difference between
and
More to the point, can't reverse contextual substitutions always be rewritten in terms of forward contextual substitutions? What is the difference between
rsub foo wibble' by wibble.alt;
and
sub wibble' foo by wibble.alt;
1
Comments
-
FontCreator supports it.
More to the point, can't reverse contextual substitutions always be rewritten in terms of forward contextual substitutions?
No.
1 -
Simon Cozens said:
More to the point, can't reverse contextual substitutions always be rewritten in terms of forward contextual substitutions? What is the difference between
No. One area where rsub would be particularly beneficial for latin fonts would be the handling of fractions. The method developed by Tai Leming which seems to have become common necessarily imposes an upper limit on the lengths of numerators.
http://opentypecookbook.com/common-techniques.html
If the contextual substitutions involved could be performed from right to left using rsub, this limit would go away (not to mention the fact that the code would be much shorter and simpler).
Unfortunately, rsub isn't widely supported so this solution wouldn't work in most applications which is why it isn't normally done.1 -
André G. Isaak said:If the contextual substitutions involved could be performed from right to left using rsub, this limit would go away (not to mention the fact that the code would be much shorter and simpler).
rsub @figures' fraction by @figuresNumerator;
rsub @figures' @figuresNumerator by @figuresNumerator;
(and indeed that seems to work nicely in my tests.)Unfortunately, rsub isn't widely supported so this solution wouldn't work in most applications which is why it isn't normally done.Looks like it works on CoreText and Harfbuzz based applications, but not Adobe Illustrator (CS6 at least). I have not tested with Uniscribe.
3 -
Unfortunately, designing fonts that won't work in Adobe apps probably doesn't go over well. It's unfortunate that they, given their central role in the development of the opentype specs, have often been slow to actually implement some things.5
-
Yannis Haralambous' book tells me that it was specifically designed for Urdu but I'm not sure I believe him, and I don't know of any Urdu fonts that use it.
Not Urdu per se, but nastaliq style Arabic as favoured for Urdu. Nastaliq is distinctive in that the form a letter takes is determined by the final letter in a connected group, i.e. you need to know what the final letter is in order to work backwards through the joining forms. This is because nastaliq employs variations in letter weight as well as shape in the pattern of letter groups. GSUB lookup type 8 was invented to provide a means to do contextual substitutions that would be processed backwards from the end of a glyph run.4
Categories
- All Categories
- 46 Introductions
- 3.8K Typeface Design
- 476 Type Design Critiques
- 555 Type Design Software
- 1.1K Type Design Technique & Theory
- 640 Type Business
- 831 Font Technology
- 29 Punchcutting
- 508 Typography
- 120 Type Education
- 313 Type History
- 75 Type Resources
- 109 Lettering and Calligraphy
- 30 Lettering Critiques
- 79 Lettering Technique & Theory
- 533 Announcements
- 86 Events
- 110 Job Postings
- 167 Type Releases
- 169 Miscellaneous News
- 274 About TypeDrawers
- 53 TypeDrawers Announcements
- 119 Suggestions and Bug Reports