create-block-theme icon indicating copy to clipboard operation
create-block-theme copied to clipboard

6.3 latest beta - Removed font is still visible in the editor drop-down picker and has settings associated with it (video).

Open Ren2049 opened this issue 1 year ago • 6 comments

This is still happening after clearing all data from Firefox on Mac, stopping/restarting the localwp server and logging back into the site. The video shows the state right after logging in, and as you can see there is no font installed other than the system font.

I'm using a blank theme and the 6.3 beta 4 version with some global styles modifications through the editor and a query loop layout modification, I didn't change anything in theme.json or other files.

Not directly related to the issue but previously I've tested different versions of the variable Figtree font from Google because the font-weights weren't applied correctly when setting up the font in global styles, it always appeared to use the regular weight adding faux boldness on top. It never picked up the lighter variants or actual bold variants of the font – should I open another issue for this?

I've tested the original variable TTF downloaded from Google, one by adding a Google font through the button in the plugin, and a subsetted woff2 version here: https://gwfh.mranftl.com/fonts

I had this glitch in another previously generated version of this theme (I've regenerated a blank theme after the last WP beta update) but the first times I've removed the Figtree font it was also removed from the editor. This time not though..

You can see that on selecting the Figtree font it has still the previous sizings associated with it.

https://github.com/WordPress/create-block-theme/assets/133038357/2633dfcd-1f58-4000-b4d2-e6a90bf38704

Ren2049 avatar Jul 16 '23 09:07 Ren2049

Thanks for the report. I haven't been able to reproduce this using 6.3-RC1; I'm wondering if this is something that was fixed along the way. If not, I would appreciate any additional details you may be able to provide.

vcanales avatar Jul 20 '23 21:07 vcanales

Gonna test it again in the coming days. Did you try adding and removing fonts a couple of times and in different font formats (ttf, woff2, variable non variable) and switching themes? Maybe that's where it got tripped up somehow.

Ren2049 avatar Jul 21 '23 07:07 Ren2049

@Ren2049 I have seen some cases where an entire copy of the theme.json data is stored in the database overriding the fonts from the theme.json file. I'm not sure why this happens, but by your description, it can be related to that.

This thread looks related to what you are describing. Try resetting you global styles as I suggest in the forums: https://wordpress.org/support/topic/local-font-not-added/

matiasbenedetto avatar Jul 21 '23 12:07 matiasbenedetto

@matiasbenedetto the option to reset global styles shown in the wp.org screenshot doesn't show up in my blank theme running 6.3 RC1:

no-reset-options

I have Adminer locally, is there a way to find these entries in the database to verify that it's the same problem? Which table should I search?

Ren2049 avatar Jul 22 '23 11:07 Ren2049

@matiasbenedetto the option to reset global styles shown in the wp.org screenshot doesn't show up in my blank theme running 6.3 RC1

If you cannot see that option, you don't have global styles saved in the database. Is the "Figtree" font family still in the theme.json file? If you are still experiencing this problem share your theme.json file contents, please.

matiasbenedetto avatar Jul 27 '23 13:07 matiasbenedetto

Yes the Figtree font is still in theme.json

here's my theme.json:

{ "$schema": "https://schemas.wp.org/wp/6.3/theme.json", "settings": { "appearanceTools": true, "layout": { "contentSize": "620px", "wideSize": "1000px" }, "spacing": { "units": [ "%", "px", "em", "rem", "vh", "vw" ] }, "typography": { "fontFamilies": [ { "fontFamily": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif", "name": "System Font", "slug": "system-font", "fontFace": [] }, { "fontFamily": "Figtree", "slug": "figtree", "fontFace": [ { "fontFamily": "Figtree", "fontWeight": "400", "fontStyle": "normal", "src": [ "file:./assets/fonts/figtree_normal_400.woff2" ] } ] } ] }, "useRootPaddingAwareAlignments": true }, "templateParts": [ { "area": "header", "name": "header" }, { "area": "footer", "name": "footer" } ], "version": 2 }

When I remove the font through the plugin it's removed from theme.json, but still visible in the global styles drop-down picker.

Now when adding a new figtree font (e.g. a downloaded variable ttf version from Google) it's correctly added to theme.json, but picking Figtree from the drop-down for the "text" global style has no effect, the default serif font is still showing.

Ren2049 avatar Jul 27 '23 13:07 Ren2049

Font-related bug for a feature that is now managed in core. Doesn't seem to be relevant for the remaining font-related bits that remain.

Closing.

pbking avatar Apr 29 '24 12:04 pbking