-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Add font features/axes to the schema #11066
Conversation
@@ -215,6 +215,14 @@ | |||
"type": "integer" | |||
} | |||
] | |||
}, | |||
"features": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect that you can add additional validation inside of the features and axes schema elements that make sure you can only specify 4-character names mapped to numbers. That would be strictly better than this, which allows you to say "features": {"foo": {"pi": 3}}"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh TIL! Thanks, added
doc/cascadia/profiles.schema.json
Outdated
"description": "Sets the DWrite font axes for the given font. For example, { 'wght': 200 } will set the font weight to 200.", | ||
"type": "object", | ||
"patternProperties": { | ||
"^([a-z]{4})$": { "type": "number" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find any example of a font axis with a digit/number in it so I left it out of the regex (whereas features can have stuff like ss01
etc)
doc/cascadia/profiles.schema.json
Outdated
"description": "Sets the DWrite font features for the given font. For example, { 'ss01': 1, 'liga':0 } will enable ss01 and disable ligatures.", | ||
"type": "object", | ||
"patternProperties": { | ||
"^(([a-z0-9]){4})$": { "type": "integer" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value type is not strictly "enum": [0, 1]
because some features allow values greater than 1
doc/cascadia/profiles.schema.json
Outdated
"description": "Sets the DWrite font features for the given font. For example, { 'ss01': 1, 'liga':0 } will enable ss01 and disable ligatures.", | ||
"type": "object", | ||
"patternProperties": { | ||
"^(([a-z0-9]){4})$": { "type": "integer" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this case-sensitive? I believe private features (which are not part of the opentype standard) can contain capital letters. I believe. I am not 100% sure. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one last set of changes! sorry to nitpick haha
Hello @PankajBhojwani! Because this pull request has the Do note that I've been instructed to only help merge pull requests of this repository that have been opened for at least 8 hours, a condition that will be fulfilled in about 4 hours 37 minutes. No worries though, I will be back when the time is right! 😉 p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Add entries to the schema for font features and axes