Can 'calts' and positional forms have stylistic sets?
Leon Coward
Posts: 4
I'm working on a Latin font (in FontLab 7) with contextual alternates and positional forms (programmed in the calt feature). They're all functioning and I'm thrilled (shout out to Simon Cozens, thanks for great advice https://typedrawers.com/discussion/3818/cycling-through-positional-alternates) but I don't know how to proceed with programming the stylistic sets for these alternates.
The basic intention: ss01 would be super long ascenders, ss02 long ascenders with a particular type of flourish (eg swirly), ss03 a different type of flourish etc (eg fragmented).
The tricky part: getting the stylistic set substitutions to apply to the contextual alternates and positional forms.
An example of how the type currently automatically functions: betrayed by blobs is automatically substituted by: b.init e t r a y e d.fina space b.init y.fina space b.init l.calt o b s.falt
The problem: Although the mid-word b glyph is substituted when the ss01 feature is turned on ( b.ss01 ), unfortunately the b.init won't substitute to the corresponding ss01 glyph. Neither will the d.fina or l.calt.
The corresponding alternates are currently named b.init.ss01 (or b.ss01.init ). It's not great, but it's kept me organised while I've drawn them.
I hope this makes for an interesting question (I hope I've described it well enough). It'd be fantastic to hear any ideas on how to solve this coding challenge. Thank you for looking!
0
Comments
-
OpenType Layout mostly proceeds by lookup order. So you need to be aware of the glyph string content at each stage, taking the output from the previously applied lookups as input for subsequent lookups.
So there are two ways to achieve what you want to do, depending on the order of the lookups.
a) Process the calt substitutions first, so
b -> b.init
and then process the ss01 substitutions
b -> b.ss01
b.init -> b.init.ss01
b) Process the sso1 substitutions first, so
b -> b.ss01
and then process the calt substitutions
b -> b.init
b -> b.ss01.init
[It is helpful, but not necessary, to arrange the suffixes in the glyph names to remind you of the order in which you intend to process them.]
If you substitutions are not working as intended, it is probably because the output from your first lookups is not coded as input for the second lookups.2 -
Just adding to what John said: These features will be applied to sub-ranges of a string. Supposed both calt and sso1 are applied for a given sub-range of the string: then the processor will take whatever lookups are associated with either of those features and process the lookups one at a time in the order that lookups are arranged in the GSUB (or GPOS) lookup list.0
-
Thanks. I tried John's suggestion in the ss01 feature
a) Process the calt substitutions first, so
but FontLab doesn't like it... When I click 'update', it just deletes the new line of coding. Have I misunderstood something?
b -> b.init
and then process the ss01 substitutions
b -> b.ss01
b.init -> b.init.ss01
0 -
Are you using FontLab’s autogenerated features? These are marked with a star and can be toggled with the star button. A feature’s auto code goes between #> feature and #< feature, so you can also add manual code outside these tags.feature liga {
# write custom code here
#> feature
sub f i by f_i;
sub f j by f_j;
sub f l by f_l;
#< feature
# or here
} liga;2 -
Thank you Adam! That solved it. Yes, I was incorrectly trying to insert the code in the middle with the other substitutions. Placing it were you indicated (in the Spoiler) solved it.
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