Plugin Support
Alvind
(@alvindcaesar)
Hi there,
There should be a filter available to add the font to the GenerateBlocks Typography list, but there is an issue preventing it from working in 2.0. An issue has been raised to address this, and hopefully, it will be patched soon.
You can check the issue here: https://github.com/tomusborne/generateblocks/issues/1790
Thanks for your response! I didn’t know that it was possible to add custom fonts to the GB Font Family drop down, lol. Where would I put this code when the bug is fixed so it works? The place for Custom CSS?
It would be wonderful if GB could automatically plug in to the Gutenberg Styles font library!
But my issue is different.
It’s possible to call the fonts loaded into the Gutenberg styles font library in GB without this code. I make a Text block, type my text into it, then in block settings I go to Typography / Font Family. Then click the 3 dot menu next to ‘Font Family’ and choose ‘Enter Custom Value’. Then I can type the name of the font into Font Family and have the font display. No, its name doesn’t show up in the drop down, which would be wonderful, but this works.
I have several .ttf fonts loaded into the Gutenberg styles library that work perfectly like this. The one I’m having issues with is a native .otf file. It displays perfectly in Gutenberg blocks. It won’t display at all in GB. I’ve tried using online conversion tools to convert it to .ttf, .woff, .woff2, re-uploaded them to the styles library, and none of them will display in GB. They all work perfectly in Gutenberg.
Here is the font https://www.1001fonts.com/library-3-am-font.html
Plugin Support
ying
(@yingscarlett)
Hi there,
The code is PHP, not CSS. It will need to be added via a plugins like code snippets, or if you are using a child theme, it can be added to the child theme’s functions.php as well.
As for the font not displaying issue, do you mean in the editor or in the front end? What is the font name?
Let me know 🙂
Thanks for info on the code, that’s very helpful!
I gave a link to the font above. The name is Library 3 AM
It doesn’t display in the editor. The other fonts do. When I type its name into Font Family, the default font displays, unlike the other fonts that display immediately.
Plugin Support
Alvind
(@alvindcaesar)
I’m not sure this issue is specific to a Block Theme because when I uploaded the font to my test site using GeneratePress (a classic theme), the font loaded correctly within GenerateBlocks.
Can you try an alternative method of adding the font, such as using a plugin instead of uploading it through the Site Editor’s typography settings?