-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Typography > Appearance controls should show available weights only #49090
Comments
We should definitely limit the dropdown to only available weights and styles. The fact that it isn't seems like a bug, unless I'm missing something. |
This problem was touched on ages ago in #38998, but I never got around to filing it separately. This related issue is also relevant here: I think this is another good candidate for a set of presets since variable fonts introduce a lot of, uh, potential variation since they go beyond the simple 100-900 scale. However, unlike spacing/font size presets, they would probably need to be constrained by the current font family since that is what would determine if a weight is a valid choice. In the meantime, I've been simply disabling the Typography > Appearance panel because I don't want to present nonsensical invalid options to editors, especially ones that result in inline CSS. |
Why is this not a bug? For the regular (not variable) fonts, don't we see which weights are enqueued and just only display them?
I think we should look at variable fonts separately. They are introducing a lot of other features, not only font-weight.
I don't think this is a good option. I'm using semi-bold weights for example very frequently. I'm not using Extra Bold or Black however (and don't have them enqueued), so only they shouldn't be displayed. |
I may have used an odd turn of phrase. I'm suggesting that it is a bug that we show weights that aren't available in the font. I think we are in agreement, but let me know if I misunderstood! Agreed variable width fonts is something we should support, and is separate. They could even have a separate entry in the dropdown which opened a modal, or even a separate dropdown. |
Ah, I misunderstood! Yes, we are in agreement :) |
This came up with a theme builder I was working with this week. They selected different font weights and there was no visual change because there weren't font faces defined for those weights. |
I'm adding the newly created [Feature] Font Library label, because I believe there are likely considerations that the underlying architecture will need to account for to surface font weights and even distinguishing variable fonts. |
Based on a recent Editor Triage async I'm moving this item to the Punted to 6.6 column on the WordPress 6.5 Editor Tasks board. |
Hi folks, |
What problem does this address?
Currently adding Typography > Appearance controls to a block will render the entire range of font weight (100 - 900), plus their italic options:
Some fonts do not have all of these weights, so unexpected results occur when an Appearance selection is made and the font does not have that weight supplied.
What is your proposed solution?
Would it be possible or a good idea to limit these options to only the weights that are available?
I guess an alternative is to disable entirely the Typography > Appearance controls.
cc @jasmussen @beafialho if you have any thoughts on this, thanks in advance!
The text was updated successfully, but these errors were encountered: