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

Add font features/axes to the schema #11066

Merged
merged 4 commits into from
Aug 27, 2021
Merged

Add font features/axes to the schema #11066

merged 4 commits into from
Aug 27, 2021

Conversation

PankajBhojwani
Copy link
Contributor

@PankajBhojwani PankajBhojwani commented Aug 27, 2021

Add entries to the schema for font features and axes

@ghost ghost added Area-Settings Issues related to settings and customizability, for console or terminal Issue-Docs It's a documentation issue that really should be on MicrosoftDocs/Console-Docs Product-Terminal The new Windows Terminal. labels Aug 27, 2021
@@ -215,6 +215,14 @@
"type": "integer"
}
]
},
"features": {
Copy link
Member

@DHowett DHowett Aug 27, 2021

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}}"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh TIL! Thanks, added

"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" }
Copy link
Contributor Author

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)

"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" }
Copy link
Contributor Author

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

@DHowett DHowett added the zPreview-Service-Queued-1.13 A floating label that tracks the current Preview version for servicing purposes. label Aug 27, 2021
"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" }
Copy link
Member

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. 😄

Copy link
Member

@DHowett DHowett left a 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

doc/cascadia/profiles.schema.json Outdated Show resolved Hide resolved
doc/cascadia/profiles.schema.json Outdated Show resolved Hide resolved
@PankajBhojwani PankajBhojwani added the AutoMerge Marked for automatic merge by the bot when requirements are met label Aug 27, 2021
@ghost
Copy link

ghost commented Aug 27, 2021

Hello @PankajBhojwani!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

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 (@msftbot) and give me an instruction to get started! Learn more here.

@DHowett DHowett merged commit e4c5e8b into main Aug 27, 2021
DHowett pushed a commit that referenced this pull request Aug 27, 2021
Add entries to the schema for font features and axes

* [x] Closes #11058

(cherry picked from commit e4c5e8b)
@carlos-zamora carlos-zamora removed the zPreview-Service-Queued-1.13 A floating label that tracks the current Preview version for servicing purposes. label Sep 27, 2021
@DHowett DHowett deleted the dev/pabhoj/font_schema branch October 26, 2021 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Docs It's a documentation issue that really should be on MicrosoftDocs/Console-Docs Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Font features and axes missing from JSON schema
4 participants