Tagged: ,

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #698918

    Hi guys

    Can you advise me on something please?

    I would like to gain a small advantage by using my CDN (KeyCDN) to serve Google Fonts instead of calling the Google API (fonts.gstatic.com). This may have marginal speed advantages when I switch to HTTPS as I can enable HTTP/2 to make one less DNS call. As I already serve from my CDN it makes sense to serve the fonts from there too.

    Apparently once placed in a root directory (done and with the correct cdn zonealias URL) I need to make a CSS to point to the CDN to serve the fonts. Fine, I have that CSS in two notepad files ready to go.

    But, and here’s the question (eventually), can you advise me where to place the style-sheet within the theme? If I call it ‘fonts’ (or similar) then I must have to tell the theme where to call this from right? This is where I get a bit stuck so please bear with me.

    This is from your forums on turning off Google fonts within the theme https://kriesi.at/support/topic/remove-google-web-font/ – is that the right thing to do? I just don’t know where to put the new CSS file and then how to point the theme to tell it where to pull the fonts from.
    This has the information I have been following: https://www.keycdn.com/blog/google-fonts-cdn/

    Hope you can help?
    Kind Regards
    Ed

    • This topic was modified 3 years ago by  Swarez.
    #698959

    I am asking the same question
    If I want to use ‘Open Sans’ but want to serve the font from my server via a CDN.
    I add the CSS to the additional CSS section in the theme
    If I choose not to use the font in the theme setting that will not work.
    So how do I tell the theme to use ‘Open Sans’ but not to load the call to pull the API Font

    #700849
    #702836

    Thanks Andy
    Not the solution really?
    Are you saying that the only way to do this is to modify every reference to the font locations in every style sheet file with your relevant CDN location?
    Thanks
    Ed

    #703618

    Hi,

    From the article:

    3.) Update CSS

    Then copy the CSS from the tool and put it into a separate stylesheet on your website or you can use a free plugin like Simple Custom CSS and JS to add custom CSS to your header or footer. Then simply update the source URLs so that they are pointed at your CDN.

    Did you try the plugin? https://wordpress.org/plugins/custom-css-js/

    And yes, you can use the code from the previous thread to disable the default google font link.

    // https://kriesi.at/support/topic/remove-google-web-font/#post-495799

    Best regards,
    Ismael

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.