OpenType labels in software

Options
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 Lew
    Kent Lew Posts: 905
    Options
    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 Larabie
    Ray Larabie Posts: 1,390
    edited January 2017
    Options
    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 Hudson
    John Hudson Posts: 3,043
    Options
    Mark's right: just put the same lookup in both <salt> and <ss01>.
  • Ray Larabie
    Ray Larabie Posts: 1,390
    edited January 2017
    Options
    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?
  • Thomas Phinney
    Options
    The former. (For a more compact compiled font.)
  • Belleve Invis
    Options
    It's in FeatureParams, assigned to a `name` ID.
  • Erwin Denissen
    Options
    In FontCreator select a Stylistic Set in the OpenType Designer dialog and add the name:


    Alternatively use the OTLF code editor::
    feature StylisticSet1 ss01 {<br>&nbsp; params FeatureParams_ss01;<br>  lookup Alternate1;<br>}<br><br>params FeatureParams_ss01 ssetparams {<br>&nbsp; name 1033 "Art Deco Alternates"; # English - United States<br>}




  • LeMo aka PatternMan aka Frank E Blokland
    Options
    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.
  • Jeremy Dooley
    Options
  • Jeremy Dooley
    Options
    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.
  • George Thomas
    Options
    @Jeremy Dooley Very likely since few if any of the older user apps would support it even if available in the font.
  • Mark Simonson
    Options
    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 Lew
    Kent Lew Posts: 905
    Options
    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.
  • Jeremy Dooley
    Options
    Thanks, all.
  • Erwin Denissen
    Options
    You're welcome!
  • Thomas Phinney
    Thomas Phinney Posts: 2,790
    edited January 2017
    Options
    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 Simonson
    Mark Simonson Posts: 1,678
    edited January 2017
    Options
    Recent versions of macOS Cocoa apps (Pages, TextEdit, etc.) in the typography palette.
  • Jens Kutilek
    Options
    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.
  • Jeremy Dooley
    Options
    @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.
  • Phil Garnham
    Options
    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 Kutilek
    Jens Kutilek Posts: 345
    edited January 2017
    Options
    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)
  • Georg Seifert
    Options
    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?
  • Erwin Denissen
    Options
    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.
  • Georg Seifert
    Options
    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. 
  • André G. Isaak
    Options
    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)
  • André G. Isaak
    Options
    (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.