[Resolved] Adding local font to GenerateBlocks Advanced Typography?

Home Forums Support [Resolved] Adding local font to GenerateBlocks Advanced Typography?

Home Forums Support Adding local font to GenerateBlocks Advanced Typography?

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1221182
    Teresa

    I’ve (successfully) added a local font to my site (stupid typos and PBKAC notwithstanding) and it shows up in the Customizer (and site) fine. Wondering how I can do the same in the Advanced Typography section of GB.

    The font doesn’t appear in the menu and when I try to input the font name in the box it doesn’t seem to take.

    If this is a “we’re on it, coming soon” feature, cool I can be patient.

    All the above said, I’m finally getting the swing of creating nice landing pages with a lot less swearing than last week! http://www.trustglobalwireless.com/

    #1221483
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    This is because the @font-face CSS isn’t loading in the block editor.

    How are you adding that CSS right now? A child theme or another method?

    #1221499
    Teresa

    Hi Tom, Greetings from the other side of Georgia Straight! I added the local fonts via your handy tutorial (into a child theme).

    It’s more annoying than anything else. I’ve set all the fonts in the Customizer so it doesn’t really matter, but nice to see how things look.

    #1222427
    Tom
    Lead Developer
    Lead Developer

    Totally – give this a shot:

    add_action( 'enqueue_block_editor_assets', function() {
        wp_enqueue_style( 'your-handle-here', get_stylesheet_directory_uri() . "/block-editor.css", false, '1.0', 'all' );
    } );

    Then add block-editor.css in your child theme, and include the @font-face CSS (and any other CSS you want to load in the editor).

    Let me know if you need more info ๐Ÿ™‚

    #1222437
    Teresa

    Awesome! I’ll give it a shot! Thanks Tom.

    #1222454
    Teresa
    #1222458
    Tom
    Lead Developer
    Lead Developer

    Awesome! Glad I could help ๐Ÿ™‚

    #1759581
    Maouez

    Hello,

    I’m sorry to open this topic but I block that the addition of my font.
    Can you be more explicit than:
    Then add block-editor.css in your child theme, and include the @font-face CSS (and any other CSS you want to load in the editor).

    I have added the php code that you quote in the “Code snippets” help but I don’t know how to do the rest of the explanations.

    Thanks in advance for the help

    #1759693
    Leo
    Staff
    Customer Support

    Hi there,

    Can you please open a support topic in GB’s support system now we monitor them separately?

    Free: https://wordpress.org/support/plugin/generateblocks/
    Pro: https://generateblocks.com/support/

    Thanks!

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Adding local font to GenerateBlocks Advanced Typography?’ is closed to new replies.