Noob question about Chaining Contexts
 
            
                
                    Paul Miller                
                
                    Posts: 273                
            
                        
            
                    What I want to achieve is to substitute a glyph for a pair of letters, but only if it occurs after a numeral.
Can I make a Ligature substitution lookup dependent upon a chaining context ?
what I have at the moment is --
lookup ChainingContext2 {
context (@th_num) @lc_alpha;
sub 0 Ligature6;
}
Where @th_num is a list of numerals (0,4,5,6,7,8,9)
@lc_alpha is a list of all lower case letters (a -> z)
and Ligature6 is the ligature substitution table I want to activate after the numerals 0,4,5,6,7,8,9.
But it doesn't work, any ideas ?
                
                        
Can I make a Ligature substitution lookup dependent upon a chaining context ?
what I have at the moment is --
lookup ChainingContext2 {
context (@th_num) @lc_alpha;
sub 0 Ligature6;
}
Where @th_num is a list of numerals (0,4,5,6,7,8,9)
@lc_alpha is a list of all lower case letters (a -> z)
and Ligature6 is the ligature substitution table I want to activate after the numerals 0,4,5,6,7,8,9.
But it doesn't work, any ideas ?
0          
            Comments
- 
            You need a multiple substitution in order to replace a single glyph for a pair of glyphs.<code>exclamdown@lc_alpha;
 }script latn {<br>  feature StandardLigatures1;<br>}<br><br>class @th_num [zero four five six seven eight nine];<br>class @lc_alpha [a-z];<br><br>feature StandardLigatures1 liga {<br>  lookup ChainingContext2;<br>}<br><br>lookup ChainingContext2 {<br>  context (@th_num) @lc_alpha;<br>  sub 0 MultipleSubstitution6;<br>}<br><br>lookup MultipleSubstitution6 {<br>  sub @lc_alpha ->
 1
- 
            I actually wanted to replace two characters with a single character, thats why I thought that a Ligature substitution was appropriate.
 Sorry I didn't express myself clearly.
 0
- 
            
- 
            In Adobe FDK syntax, it is as simple as this:feature ordn {<br> @th_nums = [zero four five six seven eight nine];<br> sub @th_nums t' h' by t_h.ordn;<br>} ordn;
 1
- 
            
 Thank you that was the problem, my Ordinals now work for st, nd, rd, th and the Spanish ordinals of o and a.Erwin Denissen said:
 Very helpful. 0 0
Categories
- All Categories
- 46 Introductions
- 3.9K Typeface Design
- 485 Type Design Critiques
- 560 Type Design Software
- 1.1K Type Design Technique & Theory
- 654 Type Business
- 853 Font Technology
- 29 Punchcutting
- 519 Typography
- 119 Type Education
- 323 Type History
- 77 Type Resources
- 112 Lettering and Calligraphy
- 33 Lettering Critiques
- 79 Lettering Technique & Theory
- 550 Announcements
- 91 Events
- 114 Job Postings
- 170 Type Releases
- 174 Miscellaneous News
- 276 About TypeDrawers
- 54 TypeDrawers Announcements
- 120 Suggestions and Bug Reports

