Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Adding local fonts – some issues

  • Yes, great that worked for the customizer but not in the block editor > typography. If there is also a solution that would be great but if not, don’t worry.

    And do you have an explanation about issue #1?

    And if I want to make changes to CSS should I rather use your plugin Simple CSS or should I use the customizer > additional css?

    Thanks so much

  • fernandoazarcon2

    Are you referring to the Block Settings Typography of GenerateBlocks?

    If so try adding this snippet:

    remove_action( 'wp_enqueue_scripts', 'generateblocks_do_google_fonts' );
    remove_action( 'enqueue_block_editor_assets', 'generateblocks_do_google_fonts' );

    Adding PHP: https://docs.generatepress.com/article/adding-php/#code-snippets

    —-

    About issue #1, You can try accessing your wp-config.php file through FTP then add define(‘ALLOW_UNFILTERED_UPLOADS’, true); inside the file.

    A simple solution is to NOT bother with the .ttf and just use .woff and .woff2 as they are supported by all modern browsers.

    —-

    Using Additional CSS should be fine.

  • Hi Fernando,
    thank you for your help but unfortunately the code snippet you gave me does not do its job. I inserted the two lines via the codes snippets plugin but when I go to the block editor > typography and choose a font from the drop down list under Font Family the toggle “use google font api” still appears to toggle on / off i.e. Roboto font or any other google font.

    Thanks

    Oliver

  • fernandoazarcon2

    Try this instead:

    add_action( 'wp', function() {
      remove_action( 'wp_enqueue_scripts', 'generateblocks_do_google_fonts' );
    remove_action( 'enqueue_block_editor_assets', 'generateblocks_do_google_fonts' );
    } );
  • Hi, still not working. The aim should be not to show any google font under Font Family and remove the use google font api toggle button. Instead I’d like to see only default fonts like Arial and my own downloaded local fonts. Until now I see still a lot google fonts and can use the google font api toggle button.

    If you have no idea anymore then I can wait until my site goes online and let you in.

    Thx

  • fernandoazarcon2

    To clarify, are you currently referring to the GB Block Setting Google fonts? Can you share a screenshot to be sure?

    Uploading Screenshots: https://docs.generatepress.com/article/using-the-premium-support-forum/#uploading-screenshots

  • Hi Fernando,
    Yes, I am refering to the GB-Block-Settings Google Fonts. Here is the screenshot: https://postimg.cc/kDyf3gss

  • Hi there,

    It’s not possible to disable Google Fonts in GenerateBlocks at this time.

    However, we will be introducing this feature shortly: https://github.com/tomusborne/generateblocks/pull/1010

  • Hi, thank you. This would be a relief due to restrictive european data privacy rules (GDPR).

Viewing 9 posts - 11 through 19 (of 19 total)
  • You must be logged in to reply to this topic.