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

Global Styles: Font appearance options do not match provided weights in custom fonts #45136

Closed
Tracked by #60528
aaronrobertshaw opened this issue Oct 20, 2022 · 1 comment
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Enhancement A suggestion for improvement.

Comments

@aaronrobertshaw
Copy link
Contributor

Description

This issue stems from the discussion in #45086 (comment).

Currently, the Font Appearance control offers options for all potential font weights, regardless of whether a theme's bundled fonts provide those weights.

While browsers will make a best guess at approximating a selected font weight if the font doesn't provide the selected option, it would be nice if we could refine our control to reflect better what is available for any given font.

This might help reduce confusion and friction for end users of Global Styles.

Original Comment

This might be one for folks working more closely on the theme development side of things, but I notice that in the TwentyTwentyThree theme.json file, only particular font weights appear to be included in the bundled fonts (I assume to limit the size of fonts that are loaded for the theme?). E.g. DM Sans loads 400 and 700 weights, IBM Plex Mono loads 300, 400, and 700, Source Serif Prop, only 200 and 900, etc. (edit: that last one appears to be a variable weight font, though, so it probably doesn't have the same problem?)

Whereas in the font appearance control, all potential weights are presented in the UI controls. Ideally, I wonder if it would make sense for the appearance controls to (somehow) only show the options of fonts that are loaded? The problem with trying to do that, though, is that it mightn't be possible for the block editor to know absolutely which are or are not available, particularly for themes that load fonts outside of theme.json 🤔

@aaronrobertshaw aaronrobertshaw added [Type] Enhancement A suggestion for improvement. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi labels Oct 20, 2022
@mikachan mikachan added this to Polish Dec 14, 2023
@mikachan mikachan moved this to Needs development in Polish Dec 14, 2023
@annezazu annezazu removed this from Polish Jul 24, 2024
@mikachan
Copy link
Member

I think this issue was fixed with #61915, so I'm going to close it, but please re-open if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants