Turn Off Google Fonts?

Homepage Community Forums Epik Theme Support Turn Off Google Fonts?

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #15091
    JokeAndBiagio
    Customer

      Hi,
      What would be the easiest way to turn off Google Fonts:

      1. For the whole theme.
      2. For Mobile Only.

      I’m looking at doing this because my Google Page speed seems to be getting dinged quite a bit for “render blocking css” from the Google Font.

      Thanks,
      Biagio

      #15106
      scooby
      Customer

        Do you have a link to your site? I can look and give you some code that will work for the majority of the sections that use Google fonts. All we would need to do is add a replacement font so that it shows up whenever the responsive mode is activated rather than Googles font. I’m not sure if that will fix the response time though….A CSS hack will prevent the Google fonts from showing up, but Google will probably still load the fonts in the background. Thats the only way I know of, but it’s worth a try.

        Here is an Example –

        @media only screen and (max-width: 480px) {
        
            	body,
        	h1,
        	h2,
        	h3,
        	h4,
        	h5,
        	h6 { 
        		font-family: arial;
        	}
        
        }

        You can try something like that, and adjust the font to whichever font you want to use, and you can also adjust which parts of the site it gets applied to.

        #15109
        JokeAndBiagio
        Customer

          Thanks, Scooby. I’m going to try that.

          This is the site in question:

          http://producingunscripted.com

          And this is the page speed results:
          https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fproducingunscripted.com%2F&tab=mobile

          I see what you’re saying that “hiding” it might not be enough to stop it from loading.

          How would I just remove google fonts all together?

          Also, I seem to remember reading that so many sites are serving Open Sans that browsers cache it anyway. Would that mean that dropping the Google loaded CSS all together would stop the problem, and that people who have it cached would still see Open Sans, and those who don’t would just fall back to the next one on the list?

          Thanks,
          Biagio

          #15112
          scooby
          Customer

            To remove the Google fonts all together, you can look in your functions.php file and remove the code from there.

            For your last question I’m not sure if that will work or not. You can test it to see after you remove the Google font code from your functions file. If you’re saying that Browsers will show Open Sans as one of their fonts without needing to link to Googles Font servers, then I guess that would work. I’m not sure though, so more research would need to be done to see if that’s true/possible.

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