The following theme.json settings work as expected on the front end: var(--wp--preset--font-family--greyclif)
is defined for the "font-family" in the main styles in the body{}
tag, and any block without a specifically defined font family renders as Greyclif.
However, in the block editor, any instance where font family is not explicitly defined renders in the web client's default "sans-serif". There is no universal font-family default defined in the styles. The font is available, and can be manually selected, and it renders correctly if selected. But it does not render by default.
Is there something I'm missing here, or is this just another bug?
"styles": {
"typography": {
"fontFamily": "var(--wp--preset--font-family--greyclif)",
"fontSize": "var(--wp--preset--font-size--sm)",
"lineHeight": "1.375"
}
}
theme.json
? Note that I don't mean using the variables, but rather declaring that there is a font, that it can be found in a specific file etc and letting WordPress generate the CSS variables and fontface declarations itself, e.g. github.com/WordPress/twentytwentythree/blob/trunk/… is that how you're registering it? Have you confirmed this isn't atheme.json
caching problem?name
,slug
, andfontFamily
stack). But there's no issue in how the font face is loading or rendering. It renders as it should on both the front and the back end when it's selected, it's just that the back end ignores the styles.typography.FontFamily default when it isn't explicitly selected.theme.json
in its entirety as well as any other font families you've defined? It's very likely that you've ommitted something related but considered unimportant that will highlight a problem or eliminate a large number of questions