Open Chrico opened 2 years ago
I believe the plan was for this to be built into the webfonts api, it just hasn't been completed yet.
Is there any issue related to that @carolinan we can dig into?
Hi, This issue has gone 180 days without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest versions, you can help the project by responding to confirm the problem and by providing any updated reproduction steps. Thanks for helping out.
This issue hasn't had much activity in a while, if it stays stale for more than two weeks it will end up being closed. @carolinan is there still a plan to move this forward?
The fontweight property within theme.json typography should definitely be an enum where you can specify fontweights, or a boolean true or false.
Since i only have 3 weights for a custom font, the typography doesn't work as it should in the editor since this whole list:
Thin: 100
Extra Light: 200
Light: 300
Regular: 400
Medium: 500
Semi Bold: 600
Bold: 700
Extra Bold: 800
Black: 900
is present.
I hope an enum will be supported soon
@carolinan any updates on that issue? :)
a bit disappointing for a "plugin" called Gutenberg that does not flexibly handle the basic fonts.
Would love to know if there is an update on this, This has already taken me a day of research to figure out that this is all hardcoded.
Thanks for opening this topic
~Is this still an open issue? My recent testing suggests that this has been resolved :)~
Scrub that, I can see that this is still persistant in the "Site Editor"
What problem does this address?
Currently it is only possible to configure via
theme.json
following:But it is not possible to define the allowed fontWeights.
If this is not set, all (from 100 - 900) are available as defined here: https://github.com/WordPress/gutenberg/blob/trunk/packages/block-editor/src/components/font-appearance-control/index.js#L19 and combined here: https://github.com/WordPress/gutenberg/blob/trunk/packages/block-editor/src/components/font-appearance-control/index.js#L105 .
This makes it hard to use custom fonts, since not every font wants/needs to support every fontWeight.
What is your proposed solution?
Why is it not possible to configure something like:
via
theme.json
to have control (whitelist allowed once) over it?