- This topic has 7 replies, 3 voices, and was last updated 4 years, 5 months ago by
Tom.
-
AuthorPosts
-
December 23, 2016 at 12:23 am #257243
Gary
Hi Tom, I found bits and pieces of answers here could not formulate a complete understanding. I’m going to try hosting Google fonts on a CDN. Can you tell me how I can prevent loading them twice? Thanks very much.
Gary
December 23, 2016 at 10:24 am #257386Tom
Lead DeveloperLead DeveloperYou can remove them from GP like this:
add_action( 'wp_enqueue_scripts','tu_remove_google_fonts', 10 ); function tu_remove_google_fonts() { wp_dequeue_style( 'generate-fonts' ); }
Then you’ll need to enqueue your self hosted version 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentDecember 9, 2017 at 6:39 pm #445952ferrutia
Hi Tom, I’m using Catamaran font and not all variants.
I think to remove the fonts because I’m not using more. How can I do it and later use only the font that I need?
In PageSpeed show me this:
http://fonts.googleapis.com/…lar,500,600,700,800,900|Playball:regular
https://fonts.googleapis.com/…00,700italic,800,800italic,900,900italic
both are CSS resources that cause a block. This causes a delay in the processing of the page.
Thanks for your help!
FernandoDecember 9, 2017 at 10:58 pm #446022Tom
Lead DeveloperLead DeveloperYou can remove the Google fonts you’re using in “Customize > Typography”. Once those values are set to something non-Google, you won’t have the calls to those resources.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentDecember 10, 2017 at 4:00 am #446092ferrutia
Hi Tom again. Thanks for your fast answer.
I did all you recommend me. But I don’t understand why now I see block the CSS Catamaran font (I changed for Playball because before was my mistake and I’m using Catamaran now) and still Italic cause a block:
http://fonts.googleapis.com/css?family=Catamaran:200,regular,600
https://fonts.googleapis.com/…00,700italic,800,800italic,900,900italic (this is Catamaran but don’t see all the line and are all the variants and also the italic variant but I don’t see in the customize typography to remove)
Can I send you some screenshots and you can see what I mean?
Because in PageSpeed in computer is 90/100 but in mobile is 74/100.
In Pingdom is 95 in 771ms
In GTMetrix is 90 PS and 78 Yslow Score
I need to fix something more, but the fonts are part of the problem with the CSS.
Thanks again for your help.
FernandoDecember 10, 2017 at 8:09 pm #446538Tom
Lead DeveloperLead DeveloperIf you use a Google font, it will cause a render blocking resource. You would avoid that by adding it to the footer, but that will cause a flash of unstyled font when the user visits your site.
This is usually a warning to ignore, especially if your site is fast anyways.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentDecember 11, 2017 at 5:37 am #446802ferrutia
Yes i think I need to move on, but my worries is about the mobile devices speed that is not fast yet, and maybe if I improve this issue it will be better.
Thanks again Tom for your answer and help.
Cheers
FernandoDecember 11, 2017 at 10:12 am #447077Tom
Lead DeveloperLead DeveloperNo problem 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.