Disable Google Fonts / other external fonts

Posted in: Newsmag
Post count: 110

Hi, I’m working on optimizing my site’s speed and would like to disable externally loaded fonts, including Google Fonts since they aren’t being used. I’m running an old version of Newsmag (v3.2) and in the Theme Panel’s font’s section I don’t see a way to simply disable Google Fonts.

I have tried changing all of the theme’s fonts to ‘default’ to avoid loading Google Fonts, but I’m still seeing them being called and loaded: https://i.imgur.com/lrUNg29.png

How can I disable externally loaded fonts and use only those that are ‘web safe’?

Post count: 9544

What we do here with both v3 and v5, is open up the style.css file and do search and replace both of these:

font-family: sans-serif;
font-family: 'Open Sans', arial, sans-serif;

with safe font stack:

font-family: "Segoe UI",Frutiger,"Frutiger Linotype","Helvetica Neue",-apple-system,BlinkMacSystemFont,"Dejavu Sans",Oxygen-Sans,Ubuntu,Cantarell,Arial,arial,sans-serif;

then run the style.css file through a CSS minifier to remove all comments, which will lop 1/3 of the file size

Post count: 110

Thanks! Once you make this change do you still specify the fonts you’re using via the Theme Panel?

Which minifier are you using and which version of WordPress/PHP, if I may ask?

Post count: 9544

Hi
we just upload the files via FTP. In theme panel we just set to default or something like sans-serif (I forget). But don’t select any Google font.

Lots of CSS minifiers online, like this:
https://www.toptal.com/developers/cssminifier

basically paste in all the css and then save out to a new style.css then compare file sizes! Good for at least 50kb right there.

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newsmag’ is closed to new topics and replies.