nextgenthemes / open-webfonts

Easy way to get Google WEBfonts for self hosting.
13 stars 1 forks source link

Critical Wordpress Error when hitting "Submit" #4

Closed Ralfff closed 7 months ago

Ralfff commented 7 months ago

I tried to download a Webfont and when hitting "Submit" i get the Wordpress Error Notice. The Font I tried was "Bitter" and it is a variable Font.

nextgenthemes commented 7 months ago

I am thinking of abandoning this project. WordPress has now a way to download and use fonts directly in the block editor. You can use https://fontsource.org/ as that is a well maintained project if you just after the files.

You can find the files for bitter in this repo https://github.com/nextgenthemes/open-webfonts/tree/master/webfonts/fonts/bitter/v33 you would need the css from the css folder as well.

Not sure what's wrong, maybe it's about that it's a variable font. Downloading fonts from the command line also seems to work.

If you use WP yourself, you can drop the https://github.com/nextgenthemes/open-webfonts/blob/master/open-webfonts.php into your plugins folder and use the [webfonts] shortcode to a page to find out what is wrong.

Ralfff commented 7 months ago

Thanks for taking the time to answer. I wouldn’t blame you for moving on. Your tool made my life easier for a while, but google changed a bit of the embed process recently as it looks and yeah, this error happens only with variable fonts. What i did in the end was selecting the "one value" option in the "get fonts" section and did copy each font-link on its own. This worked fine, even though if it took al little longer was still a great help. I love how your tool gives me the css and font files all in one fellow swoop, and it is still useful to me. So thanks and good luck, whatever you decide to do with this project! I will check out fontsource, thanks for the tips.

nextgenthemes commented 7 months ago

Fixed it, was indeed about variable fonts.

Ralfff commented 7 months ago

Awesome! have a nice Weekend.