Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added support for friendly stylistic set names. #596

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ollimeier
Copy link
Contributor

Description

Added featureParams to get friendly stylistic set name via given nameID if given.
For reference, see OT spec: https://docs.microsoft.com/en-us/typography/opentype/spec/features_pt#tag-ss01---ss20

Motivation and Context

It's possible to give stylistc set features name name via ID. They are stored in the name table. This was not implemented into opentype.js, yet.

How Has This Been Tested?

I added unittests.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I did npm run test and all tests passed green (including code styling checks).
  • I have added tests to cover my changes.
  • My change requires a change to the documentation.
  • I have updated the README accordingly.
  • I have read the CONTRIBUTING document.

@Connum Connum force-pushed the friendly_stylistic_set_name_support branch from 4650c0f to e6c1ad2 Compare October 19, 2023 10:33
@Connum
Copy link
Contributor

Connum commented Oct 19, 2023

This will break the writing of the value in https://github.com/opentypejs/opentype.js/blob/master/src/table.js#L170 - could you implement that as well?

edit: also, the format used for feature parameters is different for each feature tag, see https://learn.microsoft.com/en-us/typography/opentype/spec/chapter2#feature-table
We should implement that accordingly, so it does not only work for 'ss01' – 'ss20', but also 'cv01' – 'cv99' and 'size'

@Connum
Copy link
Contributor

Connum commented Oct 21, 2023

I just noticed this seems to be a duplicate of #452

@Connum Connum closed this Oct 21, 2023
@Connum Connum reopened this Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants