[Resolved] GoogleFonts locally

Home Forums Support [Resolved] GoogleFonts locally

Home Forums Support GoogleFonts locally

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1649761
    Raul

    Good morning,

    I downloaded Montserrat Google font and created a “font”-folder directly on my mainsite: https://www.domain.de/fonts/

    I uploaded alle fonts to this directory, and used this both codes:

    add_filter( 'generate_typography_default_fonts', function( $fonts ) {
        $fonts[] = 'Montserrat';
    
        return $fonts;
    } );

    and the respective CSS from google with correct url. Than I called my site and selected as typography the new locale font. But it’s not working. I start cloeaning the cache and browser cache too but no result.

    #1649763
    Elvin
    Staff
    Customer Support

    Hi there,

    I believe you’ve followed our documentation regarding this?
    https://docs.generatepress.com/article/adding-local-fonts/

    You may have missed this part. You’ll need to add @font-face for your specific font.
    https://docs.generatepress.com/article/adding-local-fonts/#using-font-face

    A wise man once said:
    "Have you cleared your cache?"

    #1649768
    Raul

    Hi,

    I wrote the font-folder “https://www.domain.de/fonts/” on the google site before I selected and copied the CSS code to my site.

    #1649864
    Elvin
    Staff
    Customer Support

    I wrote the font-folder “https://www.domain.de/fonts/” on the google site before I selected and copied the CSS code to my site.

    Can you link us to the site/page in question so we could check?

    You can provide the site details on the private information text field. Thank you.

    A wise man once said:
    "Have you cleared your cache?"

    #1652086
    Raul

    Sure. Font Is Montserrat

    #1652717
    Raul

    I discovered why. I had https://mysite.de in my preferences of wordpress but I write https://www.mysite/fonts in the css. So I added “www” to my preferences of wordpress.

    But after I leave the customizer and call it again the Monreat from Google Fonts remotly is selected?

    #1653346
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Try naming it something different like “Montserrat Local”. That way it won’t get confused with the Google fonts version.

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