ollie icon indicating copy to clipboard operation
ollie copied to clipboard

additional fonts wont load when developing in certain environments

Open jamcrae opened this issue 1 year ago • 2 comments

when using plug-in "Create Block Theme" to add additional fonts, the fonts would appear to be loaded correctly but they could not be accessed - not via the Style editor (the added font would NOT appear in the drop down menu) nor manually by manipulating styles via the browser developer interface. Am working in WordPress 6.4.1, Ollie 1.1.0 and primarily working in Local (version 8.0.2) on a Mac

It didn't seem to be the plug in's fault as the correct code was appearing in the .jsn file and the font file was appearing in the assets folder as expected It did not seem to be the WordPress version, as i tested in 6.3 AND 6.4.1 - no added fonts in the style editor I tried changing browsers, - no added fonts in the style editor It did seem to be the theme's fault as I switched to twenty-twentyfour, added a font using the plug-in and the font did appear, as expected, in the Style Editor ->Typography -> Fonts drop down

I also tried by going to an online development site that I mess around with. Installed Ollie there and the Plugin. Successfully was able to install additional fonts and they did appear in the Style Editor.

I went back to the Local environment and changing the PHP version from 8.2 to 7.4.3. It was after I switched to PHP version 7.4.3 that things worked as expected. HOWEVER, I can't now reproduce that result, and (curses!) I didn't take a screenshot, so now i don't know if i was looking at one of my other test windows. (Edit: definitely can not reproduce again by changing the PHP version. )

Summary: additional fonts wont appear in Style Editor ->Typography menu if using Ollie on Mac in local environment they do appear in local environment if i change themes they do appear if i use Ollie in a different dev install online elsewhere.

I will attach the Site Health screens for both the Local environment (called Does NOT work) and the online dev site (called DOES work). hoping there is something there that you can spot that I can not?

Does NOT work.txt DOES work.txt

jamcrae avatar Nov 10 '23 20:11 jamcrae

I have disabled "Create Block Theme" and I have instead added the fonts directly into the json file. To be sure i was doing it correctly i tried both by copying the code from a different theme and by copying Ollie's code for the existing font "Inter" and changing the values. Neither makes a difference. Style Editor -> Typography -> Fonts dropdown still only shows "Inter" and "Monospace" If I switch themes, I can install additional fonts that will show up and work properly, so i'm confident my code and font files are correct. What is stopping the theme from including the additional fonts? What do you want me to try next

jamcrae avatar Nov 15 '23 19:11 jamcrae

This is still an issue. I did see an update for "Create Block Theme" and have installed it. The fonts DO appear to be installing, and in ..say.. the Global Styles window, I can assign a font like Roboto to the headings, but they are definitely not Roboto. Not even a sans serif. If I switch themes, the fonts work as expected. So it can't be the plug in, right? What is stopping the theme from displaying the additional fonts? Does anyone have a suggestion for me to test.

jamcrae avatar Feb 23 '24 16:02 jamcrae

Sorry for the late response. Curious if this is still an issue? A lot of work was done to the font library over the past several months.

mikemcalister avatar Jul 10 '24 19:07 mikemcalister