[Resolved] Local Google Fonts: what about GenerateBlocks?

Home Forums Support [Resolved] Local Google Fonts: what about GenerateBlocks?

Home Forums Support Local Google Fonts: what about GenerateBlocks?

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1996999
    wo

    Hi back again,

    I thought, I’ve got it.

    Switched GPP to the dynamic typography system and local Google fonts, according to your tutorial.

    Great success. PageSpeed Insights jumped right into the green.

    Now, I just repeated this procedure, exactly the same, working on another site, this one:

    baerbelhirsch.de

    But: NO success, so far. PageSpeed Insights still insists, there is a slooow call to fonts.googleapis.com.

    And they are right, see page’s source:

    ... 
    <link rel='dns-prefetch' href='//fonts.googleapis.com' />
    ...
    <link rel='stylesheet' id='generateblocks-google-fonts-css'  href='https://fonts.googleapis.com/css?family=Roboto:100,100italic,300,300italic,regular,italic,500,500italic,700,700italic,900,900italic&display=swap' media='all' />
    ...

    Both sites are GPP and GB, current versions. Both are AutOptimize. Flushing its cache, even deactivating it, makes no difference. On this site, GB insists on googleapis.com.

    What went wrong, this time? How could I figure it out?

    Unfortunately, there are some more sites, waiting for local fonts πŸ™‚

    Thanks in advance
    Wolfram

    #1997023
    David
    Staff
    Customer Support

    Hi there,

    the request is being made by the GenerateBlocks plugin, which means there is a GB Block that has the Font set in the blocks Typography settings. If you can disable Autoptimize i can take a look where its coming from.

    #1997068
    wo

    Hi David,

    thanks a lot. AutOpt is de-activated now!

    Please let me know, *what* you see πŸ™‚

    #1997098
    David
    Staff
    Customer Support

    Do you have any server side caches ? As i am still seeing autoptimize cached files.

    #1997112
    wo

    Oppala … yes. Indeed. This site’s hosting _is_ cached. Disabled. Now you should definitely see everything. Pardon!

    #1997121
    David
    Staff
    Customer Support

    No problem – that did the trick πŸ™‚

    On the Home Page the Phone Number Button (tel:+4951116290640) – the GB Button Block has the Roboto Font selected in the blocks typography settings. Edit the typography and uncheck the Google Font option.

    #1997135
    wo

    David, your trick is great again πŸ™‚

    Thanks a lot.

    #1997146
    David
    Staff
    Customer Support

    Glad to be of help!

    #2070478
    Margaret

    Hello, I tried to follow these instructions as well.

    I downloaded the font files, added the temporary script to Code Snippets:

    add_filter( 'upload_mimes', function( $mimes ) {
        $mimes['woff']  = 'application/x-font-woff';
        $mimes['woff2'] = 'application/x-font-woff2';
        $mimes['ttf']   = 'application/x-font-ttf';
        $mimes['svg']   = 'image/svg+xml';
        $mimes['eot']   = 'application/vnd.ms-fontobject';
    
        return $mimes;
    } );

    I tried to upload the fonts to the Media library. Most of the files uploaded, but the .ttf files would not upload. The error message said, “Sorry, this file type is not permitted for security reasons.”

    #2070706
    Elvin
    Staff
    Customer Support

    Hi Margaret,

    You can use this article as reference for other alternatives in uploading your font files.
    https://www.elegantthemes.com/blog/wordpress/how-to-fix-the-sorry-this-file-type-is-not-permitted-for-security-reasons-error-in-wordpress

    Another alternative which I’d personally recommend would be to manually upload the file on your site through FTP and have the fonts placed inside a child theme’s folder. πŸ™‚

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