This topic has 15 replies, 4 voices, and was last updated 10 years by Abe.

  • Author

    Tagged: 

  • #18126
     Patagonia
    Participant

    Hi, I like the standard font choices (roboto & open sans), but lately I am having a lot of delays in page loads because they hang at getting the files from Google.

    1) Would there be a way to embed them in the site?
    2) Why are they loaded repeatedly? I noticed on my site that it loaded 3-5 times and just checked the Kle demo and it seems to load 5 Open Sans and 3 Roboto Woffs?

    (check the detailed timeline at http://gtmetrix.com/reports/seventhqueen.com/YUj5sY9y, it is the check of your contact page.).

    Cheers

    #18271
     Patagonia
    Participant

    Please do check how (and how many times) the fonts are called/included. As far as I could see, even if I use only one Google font (just the body for example), then still multiple instances of both default custom fonts are called.

    For now I turned off all custom fonts and use Helvetica instead, but:
    1- On a regular page, still 2 Google CSS’s are called (open sans & Roboto). PLease remove these if not needed!
    2- On a BuddyPress page (I tested Groups, turned off all custom fonts and purged all caches) still the fonts are included and called (and the CSS as well). Is the Roboto font hard coded in BP pages? I cannot seem to be able to change and not include it?

    3 by the way, is it standard to call the Google fonts with a huge random string? The advantage of the popular Google fonts like Open Sans is normally that the browser of the visitor might have cached it already as they have visited other pages. But with these random strings attached, that won’t happen, will it?

    Many thanks

    #18418
     Abe
    Keymaster

    Hi, WordPress add the extra Open Sans request when you use the Admin bar if I am right. We did some tests and we removed the Open Sans request if it is already included by the theme.
    Roboto isn’t hard-coded somewhere, fonts should be included only the ones you select from Theme options – Fonts
    Those strings are google fonts related and the way it loads the .woff files. We are only generating a link to request the font like: //fonts.googleapis.com/css?family=Roboto

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #18433
     Patagonia
    Participant

    Hi Abe,

    thanks for your reply. On my home page (which is nearly empty at the moment) the 2 css (Roboto & Opensans) are requested from Googlefonts, even though I have disabled the custom fonts.
    On the blog pages, the font themselves (open sans + roboto) + the 2 CSS files are requested/

    These are useless and time consuming requests which are not needed. Even though the files are small, they often keep the pages from loading. When I disable the Google fonts, I do not want any calls to google, can you fix this?

    Thanks!

    #18675
     Abe
    Keymaster

    Hi, Yes I see now what you say and we fixed it. Until the update you can comment this line in wp-content\themes\kleo\kleo-framework\kleo.php
    add_action( ‘wp_enqueue_scripts’, create_function( ”, “wp_register_style(‘kleo-google-fonts’, ‘//fonts.googleapis.com/css?family=Roboto Condensed:300,400,700|Open Sans:400’ , array(), ”, ‘all’ ); wp_enqueue_style(‘kleo-google-fonts’);” ) );

    Thanks

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #18695
     Patagonia
    Participant

    Thanks. Please also note that in my stylesheets there are about 8 hardcoded mentions of Roboto and another 6 or so of Open Sans. (H2 headers in RTmedia, Date in posts etc).

    Even though they are no longer called and thus not displayed, they fall back on ‘sans serif’, which is ugly and different than my chosen body & headings font.

    Can you remove these hardcoded/fixed fonts and replace them with the choices for the Theme Options?

    Thanks!

    #31863
     Patagonia
    Participant

    Hi there,

    I am updated to the latest KLEO version, use no Google fonts, but still there is a reference somewhere:
    ‘@import “//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,300,700”;’

    It is not needed, lowers page rank/score and gives a 404.

    Can you take this out in teh next update and let me know where to find it, so I can remove it for now?

    Thanks!

    #31877
     sharmstr
    Moderator

    Plugins load it as well, not Kleo.

    Here’s ones that do on my site

    rtMedia (in several locations)
    revslider (in several locations)
    WordPress (in several locations)

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #31879
     Catalin
    Moderator

    Try to disable Admin bar that probably loads it

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #31892
     Patagonia
    Participant

    Thanks for your reply. I have admin bar (and RT Media) on all pages, but it only loads on KLEO pages that have BBpress enabled (I use the plugin manager plugin, that lets me disable plugins selectively).

    The CSS that comes with BBpress does not include the Google fonts reference, so it must be in the KLEO CSS.

    Thanks.

    #31927
     sharmstr
    Moderator

    Can you give us a link or can you view the page source and give me the line that loading the font? Should look something similar to this

    COPY CODE
    
    <link rel='stylesheet' id='redux-google-fonts-css'  href='https://fonts.googleapis.com/css?family=Open+Sans%3A700%2C400&ver=1412001450' type='text/css' media='all' />
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #31941
     Patagonia
    Participant

    It is not public yet, but here is the section of the source that is loading it, with the previous and next stylesheet:


    rel=”alternate” type=”application/rss+xml” title=”Website » Forums Feed” href=”http://7summits.ws/forums/feed/&#8221; /><link
    rel=’stylesheet’ id=’open-sans-css’ href=’//fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&subset=latin%2Clatin-ext&ver=4.0′ type=’text/css’ media=’all’ /><link
    rel=’stylesheet’ id=’dashicons-css’ href=’http://website.com/wp-includes/css/dashicons.min.css?ver=4.0&#8242; type=’text/css’ media=’all’ /><link>’

    (I changed the website URL/title above).

    #31942
     sharmstr
    Moderator

    This bit right here

    COPY CODE
    
    id=’open-sans-css’
    

    tells you its not coming from kleo and its coming from wordpress. Google it. People have reported the same problem as you.

    https://wordpress.org/support/topic/open-sans-font-causes-problems-with-wordpress-38

    http://wordpress.stackexchange.com/questions/139930/finding-and-disabling-rogue-stylesheet-from-header-source-sans-pro

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #31943
     sharmstr
    Moderator

    A bit more info. If it was coming from kleo is would have id=’kleo-xxxx’. Examples

    COPY CODE
    
    id='kleo-bbpress-css'
    id='kleo-shortcodes-css'
    id='kleo-app-css'
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #31944
     Patagonia
    Participant

    Thank you sharmstr. Though your first link mentions it was a theme issue, the 2nd link pointed me to this plugin:
    https://wordpress.org/plugins/disable-google-fonts/

    Which seems to take care of it.

    You might want to apply for the 7thqueen job openings 🙂
    Cheers.

    #32110
     Abe
    Keymaster

    Thanks @sharmstr
    she was the first to ask to join the team 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

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

The topic ‘Open Sans font loaded repeatedly?’ is closed to new replies.

Log in with your credentials

Forgot your details?