Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1472696

    Hello!

    I am crazy about the page speed optimisation.
    I use fast CDN.
    Is it possible in this theme to get the google fonts locally, cache it to my cdn and load all fonts as one http request (as we do with scripts and css)?

    Thank you!

    #1472757

    Hey ibuzaev,

    Thank you for the inquiry.

    You can upload Google Fonts using the Custom Font Manager and load them locally, but we’re not sure if they will be compatible with your CDN. If this is not possible, you may need to rely on third-party plugins to load the fonts. Please check the link below for more info.

    // https://kriesi.at/documentation/enfold/typography/#how-to-upload-custom-fonts

    Best regards,
    Ismael

    #1472758

    why not loading directly from your CDN Servers : you can try the option : Enfold – Performance – Show advanced Options ( switch on ) – Custom Font Loading Source : “Load from CDN Server”

    Starting with 5.4 you can decide to load your custom fonts from a CDN server. In this case you must include your own @font-face rules in head. Enfold will supress output of default @font-face rules in dynamic_avia css file to avoid double loading.

    #1472809

    Thank you, Guenni,
    Will it work with google fonts too (which are not hosted on my server now)?

    #1472866

    Hi,

    Will it work with google fonts too

    Yes, you can download the Google font and then add the @font-face rule to manually load it.

    Example:

    @font-face {
        font-family: 'Open Sans';
        src: url('https://cdn.example.com/fonts/OpenSans-Regular.woff2') format('woff2'),
             url('https://cdn.example.com/fonts/OpenSans-Regular.woff') format('woff');
        font-weight: 400; /* Regular */
        font-style: normal;
    }
    
    @font-face {
        font-family: 'Open Sans';
        src: url('https://cdn.example.com/fonts/OpenSans-Bold.woff2') format('woff2'),
             url('https://cdn.example.com/fonts/OpenSans-Bold.woff') format('woff');
        font-weight: 700; /* Bold */
        font-style: normal;
    }
    

    Best regards,
    Ismael

    #1473018

    Thank you, Ismael!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Google Fonts Locally’ is closed to new replies.