OpenType labels in software

I understand that Adobe products, in particular Photoshop, now have the ability to display custom name for style sets. 

So for example, instead of Style Set One, you could have "Art Deco Alternates" or the like. How is this accomplished? Code examples are preferred. Thank you,

JDooley
«1

Comments

  • Kent LewKent Lew Posts: 633
    Also, if you look at the source files for Adobe Source Sans Pro, in the family.fea file you can see this in practice. Which is where I basically cribbed together this example for you from:
    feature ss01 { # Stylistic Set 1
    featureNames {
    name "Art Deco Alternates"; # Windows English
    name 1 0 0 "Art Deco Alternates"; # Mac English
    };
    # The feature rules then follow
    } ss01;
  • Ray LarabieRay Larabie Posts: 647
    edited January 14
    Related question: I usually only have a single stylistic set and I've always used salt. But some apps only support ss01 ss02 etc. Should I update all my old salts to ss01? If so, how can I do this without breaking older apps that only support salt?
  • John HudsonJohn Hudson Posts: 1,191
    Mark's right: just put the same lookup in both <salt> and <ss01>.
  • Ray LarabieRay Larabie Posts: 647
    edited January 15
    Do you duplicate the instructions for both? I mean: do you make a lookup in salt and then call it in ss01 or just duplicate the whole feature?
  • The former. (For a more compact compiled font.)
  • It's in FeatureParams, assigned to a `name` ID.
  • In FontCreator select a Stylistic Set in the OpenType Designer dialog and add the name:


    Alternatively use the OTLF code editor::
    feature StylisticSet1 ss01 {
      params FeatureParams_ss01;
    lookup Alternate1;
    }

    params FeatureParams_ss01 ssetparams {
      name 1033 "Art Deco Alternates"; # English - United States
    }




  • One can add the featureNames to existing fonts by exporting the OT Layout features file using OTM, adding the additional info using a text editor and subsequently importing (compiling) the features file using OTM.
  • One can add the featureNames to existing fonts by exporting the OT Layout features file using OTM, adding the additional info using a text editor and subsequently importing (compiling) the features file using OTM.
    But when You use microsoft VOLT You don't get to do this because of the many AFDKO rules.
    As an owner of a DTL OTMaster 6.3 I would like to edit the Stylist Sets inside OTM and not to use TTX for that.
  • I've tried this out, but the features do not compile in Fontlab 5. Perhaps I am doing it incorrectly, or FL5 is horrifically obsolete. Both are probable.
  • @Jeremy Dooley Very likely since few if any of the older user apps would support it even if available in the font.
  • As far as I can recall, the problem is that FontLab Studio 5 uses an older version of the AFDKO, a version that predates support for named stylistic sets.
  • Kent LewKent Lew Posts: 633
    Yes, I would not expect FontLab 5 to be able to compile this feature code. You will need to use a different application to compile your fonts, or post-process with FontTools or OTM or something like that.
  • Thanks, all.
  • You're welcome!
  • Thomas PhinneyThomas Phinney Posts: 797
    edited January 18
    Mark, Kent: Using the feature code (as described by Kent and in AFDKO docs) does not stop FLS 5 from compiling.

    (Some of the advice here seems to be app-specific, perhaps?)

    I'm still trying to figure out whether the code actually works in FLS 5, though! Photoshop seems to think I have five features named "small caps" instead of one small caps and four stylistic sets.  :(  Not sure if it's my error, the font (and hence FLS), or Photoshop that is at fault. What else shows names for stylistic sets?
  • Mark SimonsonMark Simonson Posts: 834
    edited January 18
    Recent versions of macOS Cocoa apps (Pages, TextEdit, etc.) in the typography palette.
  • We have done some experiments with the most recent FLS 5 version, and not only it didn’t work, but like Thomas said, it messed up the rest of the features. And it didn’t add the necessary name table entries.

    But even if you guess the name ids which will be assigned to the feature parameters, and add them to the name table by hand, the features still didn’t work correctly in InDesign, mixed up substitutions from different features, like when you would switch on a stylistic set for an alternate a, the small caps would be activated.
  • @Thomas Phinney
    I should clarify. The fonts did compile, but Photoshop CS would occasionally refuse to load the font with an error when selected from the type menu, and PS eventually crashed.
  • Hi folks, I just wanted to confirm that I have run tests with Kent's sample code (thanks Kent!) from Glyphs App. Named style sets are compiling and working as expected. The name table fields are exported into the font files and are listed correctly within apps, or at least within the apps that I have tested — Indesign and Pages.
  • Jens KutilekJens Kutilek Posts: 119
    edited January 22
    In GlyphsApp, it is even simpler: just write "Name: Your feature name" in the lower right section of the font info window.


    (But it also works the other way)
  • In Glyphs you can put the simple and the full syntax in the lower field. That way you can keep the feature automatic. 
  • In Glyphs you can put the simple and the full syntax in the lower field. That way you can keep the feature automatic. 
    Hi George, I would like to know if Glyphs can recompile a font compiled with Microsoft VOLT. This font does not follow the AFDKO rules.
    I can't try Glyphs because I am a windows user.
    Is there no chance to a windows version?
  • FontCreator is a Windows font editor which allows you to import VOLT scripts. You can even open a VOLT font file and FontCreator will ask you if you want to use compiled OpenType features, or if you prefer to use the VOLT script.

    If you feel something is missing, let me know as I'm the main developer.
  • Glyphs will try to translate the GSUB table into fea code. That is always difficult no matter if the source was compiled from VOLT or AFDKO code. 
  • Has anyone had any success with using DTL OTM to add custom names for stylistic sets? I've tried importing a feature file and the operation appears to be successful (i.e. the new entries show up in the name table), but the changes never keep (once I reopen the file the new names are gone). Manual edits I make to a name table keep, but ones imported from a feature file don't. (Using DTL OTM 6.3 on Mac OS 10.12.3)
  • (replying to myself) -- OK, I've figured out what's going on. After importing a .fea file into OTM and saving it, the actual features are saved with a new parameter value; it's just the name entry itself that doesn't stick. I think there must be a bug where, upon importing features, OTM flags the GSUB table as modified, but not the name table, so it only saves the former. If you just make a minor manual edit to the name table, then it *does* stick as well, so problem solved.
Sign In or Register to comment.