Questions on Chained Substitution at FF
Hope someone have lot of experience in this area would answer my questions here.
This is working Ccalt. But I still have a lot of questions. ( image1)
The questions are: ( Posted in FF and did not get any comment yet )
- What is New Section mean to current situation? Adding | in the Matching Rules and what else can you add there? Since I used all match, back and ahead classes in there already
- What is adding "New" under Matching Rules, is this the same as New Section button?
- Can I add any lookup to any section? Like --> back @lookup1 | match @looup2 | ahead @looup3?
- Why I got error message saying that "back" is not valid class name, when I put @lookup right after back
- Does "New " mean, a new Chained Substitution and will work on the result of previous Chained Substitution?
- Is there any writeup about this dialog and explain in detail, please point me to that document?
- When back or ahead is not included, the dialog is a bit different. It is called "Coverage Tables" or something and the format is quite different. So, adding "New" will be new Chained Substitute, which will work on the result of previous one? See the dialog below:
- I can't adjust the column in this dialog box, why? ( Image2 )
Comments
-
Hi WAY, let me try explaining what I think is correct:1. What is New Section mean to current situation? Adding | in the Matching Rules and what else can you add there? Since I used all match, back and ahead classes in there alreadyEach Chained Rule can have 3 sections: matching input, backtrack and lookahead. So at most 2 bars can appear in one rule.2. What is adding "New" under Matching Rules, is this the same as New Section button?The first "New" means adding another rule. In your screenshot there's already one rule. The New Section button adds a bar to the existing selected rule, for example when you already have the backtrack and match, you can add a lookahead section using it.
No, you can only add lookups to the Match section. The lookups are applied to their corresponding matched input (class here) to change it, when the whole pattern (back match lookahead) is matched to a string of glyphs.4.Why I got error message saying that "back" is not valid class name, when I put @lookup right after backValid class names are names you defined below. Here in your screenshot there are two valid names: Letters and All_Others. You can add more or define classes specially for backtracks in the Back Class panel.5. Does "New " mean, a new Chained Substitution and will work on the result of previous Chained Substitution?The New above adds a new rule, which won't work on the result of previous substitution. If you want to have a rule to work on previous result, add another lookup, not subtable under the same lookup.6. Is there any writeup about this dialog and explain in detail, please point me to that document?I believe so, you can search for their documentation. Or you can check out the OpenType specs https://docs.microsoft.com/en-us/typography/opentype/spec/chapter2#common-structures-for-contextual-lookup-subtables, it may not be the easiest read though. The linked content starts with sequence contextual subtables (without backtrack and lookahead) then Chained Sequence contextual subtables (with back and ahead).7. When back or ahead is not included, the dialog is a bit different. It is called "Coverage Tables" or something and the format is quite different. So, adding "New" will be new Chained Substitute, which will work on the result of previous one? See the dialog below:Classes are mutually exclusive, meaning one glyph can only be in one class. Coverage table doesn't have such limitation. Otherwise they work similarly, with optional backtracks, matching inputs and optional lookaheads.
I figure each Start in the third column marks the start of a section (of the possible three) but I'm not sure.
0 -
This is very good explanation and I learned a lot from you. Thank you very much. You are right that MS Opentype features read is very hard to understand and there is no real examples either. Now I think what you said here is what I did it wrong.
"Classes are mutually exclusive, meaning one glyph can only be in one class. Coverage table doesn't have such limitation. Otherwise they work similarly, with optional backtracks, matching inputs and optional lookaheads".
I put almost the same glyphs in two classes and got "invalid" class name error. Thank you. Bear with me, I still have some questions:
If you have two @lookups in one rule and both have to be used on Match class but on different glyph, right? And how that supposed to work? First lookup substitutes one glyph and then second lookup works on the result of first lookup? Does second lookup go back to the start of the context, right? or it acts on the place, where the first lookup went off? Thanks again.0 -
"The linked content starts with sequence contextual subtables (without backtrack and lookahead) then Chained Sequence contextual subtables (with back and ahead)"
Do you mean The linked content starts with Match Class here? Isn't Content starts with Back | Match | ahead format?0 -
If you have two @lookups in one rule and both have to be used on Match class but on different glyph, right?
Yes you can have multiple referenced lookups in one rule and they have to be on Match class. However, several lookups can be on the same class.
First lookup substitutes one glyph and then second lookup works on the result of first lookup?Yes exactly.
Does second lookup go back to the start of the context, right? or it acts on the place, where the first lookup went off?The second lookup sees the result of the first substitution and applies without knowing what’s before the first substitution.
There is a complex setting panel in fontforge that lets you specify each @lookup’s matching position. Where position 0 is the first class in Match and position 1 the second. Keep in mind that the positions should also apply to the result not the original text.
In the simple format setting, if the first substitution doesn’t change the Match part length, then the second lookup applies to the same position it was originally set to. However if previous substitutions changed the length of Match section, I don’t really know how it should work. Maybe the position shrinks/expands with previous changes (that’s how I have implemented it in my iOS app), but I haven’t found any specification regarding this issue in the AFDKO feature specs site. Maybe a way to specify directly the matching position number in a .fea file could be useful.
Do you mean The linked content starts with Match Class here?No, here by “linked” I meant the MS specs webpage that I had put a link to.
0 -
There is a complex setting panel in fontforge that lets you specify each @lookup’s matching position. Where position 0 is the first class in Match and position 1 the second.
I think I saw some of the samples in the web, but how do you bring that dialogbox in FF to set the position. Or does FF auto-assign them? I think it is auto-assigned but can you change it? Thanks
0 -
In the version that I checked on my laptop, which is not by my side now so I can’t say exactly which, you add a lookup of type chained substitution, then you add a subtable, then the dialog pops up asking which method to use (by glyph, by class or by coverage) and which level of complexity you want (simple or complex).
Hope it helps.0 -
Got it all. Thank you very much and have a nice day!!!0
Categories
- All Categories
- 43 Introductions
- 3.7K Typeface Design
- 803 Font Technology
- 1K Technique and Theory
- 622 Type Business
- 444 Type Design Critiques
- 542 Type Design Software
- 30 Punchcutting
- 136 Lettering and Calligraphy
- 83 Technique and Theory
- 53 Lettering Critiques
- 485 Typography
- 303 History of Typography
- 114 Education
- 68 Resources
- 499 Announcements
- 80 Events
- 105 Job Postings
- 148 Type Releases
- 165 Miscellaneous News
- 270 About TypeDrawers
- 53 TypeDrawers Announcements
- 116 Suggestions and Bug Reports