How to code alternate mark attachment in a stylistic set?

I would like to create stylistic sets that allow diacritics to be at a different distances from the letter they're attached to.

I'm new to the mark feature and haven't found a lot of resources around it. How would I use a different mark feature definition in a stylist set? E.g. ss01 causes all anchors defined by the mark feature to be at 500 units from the baseline, ss02 moves them to 750. What would be the syntax, if this is even the right way to go about it. If not, how else could I accomplish this that doesn't involve creating alternate glyphs? 
Tagged:

Comments

  • John HudsonJohn Hudson Posts: 1,954
    There's a couple of different ways to do this.

    One way is to perform substitutions in the Stylistic Set features so that you actually switch to a different mark glyph that looks the same but has its own anchor positioning e.g.

    acutecomb -> acutecomb.ss01

    The other way is to put the actual GPOS mark positioning into the Stylistic Set features. I would do this by defining separate mark anchor attachment lookups, and then associating them with appropriate ssXX features.

    The big caveat with either approach is that a lot of text engines automatically favour precomposed diacritics, so even if the input text is a + acutecomb, this will be rendered using the precomposed /aacute/ glyph. You can use the ccmp feature to decompose /aacute/ to /a/acutecomb/, and this will work in a lot of places, but there is a longstanding bug in InDesign what prevents ccmp decomposition from working properly.
  • edited October 23
    Thanks, John. Sounds like I may be better off making alternatives if I want maximum compatibility. 
  • Thomas PhinneyThomas Phinney Posts: 1,902
    Sadly, yes.
Sign In or Register to comment.