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 -
Erwin Denissen said:
Very helpful.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