• Hi, I’ve been learning a lot by using the new Generate Blocks 2. What a great tool, thank you!

    I made a blank block theme using ‘Create Block Theme’. I just use Gutenberg, including their plugin. Everything is updated.

    I uploaded ttf fonts I have via the Gutenberg global styles dialog, and I can type their names into Generate Blocks 2.0 font face custom input and have them show up, but when I tried uploading an otf font it doesn’t show up. I have tried using an online tool to convert it to ttf, woff, woff2 and none of these show up in Generate Blocks either. They all work fine in the Gutenberg blocks I’ve tried.

    How can I use this otf font (or a conversion of it) in Generate Blocks, please? I’ve searched, but so much out there is confusing and doesn’t apply to current GB or Gutenberg.

Viewing 5 replies - 1 through 5 (of 5 total)
  • 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

    Thread Starter Verity Cantare

    (@veritycantare)

    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 ??

    Thread Starter Verity Cantare

    (@veritycantare)

    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?

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.