Reverse chained contextual substitution?
Simon Cozens
Posts: 741
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
- 43 Introductions
- 3.7K Typeface Design
- 799 Font Technology
- 1K Technique and Theory
- 617 Type Business
- 444 Type Design Critiques
- 541 Type Design Software
- 30 Punchcutting
- 136 Lettering and Calligraphy
- 83 Technique and Theory
- 53 Lettering Critiques
- 483 Typography
- 301 History of Typography
- 114 Education
- 68 Resources
- 498 Announcements
- 79 Events
- 105 Job Postings
- 148 Type Releases
- 165 Miscellaneous News
- 269 About TypeDrawers
- 53 TypeDrawers Announcements
- 116 Suggestions and Bug Reports