WordPress.org

Ready to get started?Download WordPress

Forums

WP Google Fonts
No Font List Synchronization (9 posts)

  1. akedv
    Member
    Posted 1 year ago #

    Hi,

    i just updated to the new version, but unfortunately the new font list sync feature is not working:

    Font List Synchronization

    Unable to connect to Google's Webfont server at this URL.
    Failed to connect to 2a00:1450:400c:c03::5f: Network is unreachable
    Unable to connect to Google's Webfont server at this URL.
    Failed to connect to 2a00:1450:400c:c03::5f: Network is unreachable
    Using the local font list file because we could not connect with Google.
    Font list sync successful, created January 1, 1970, 2:00:00.

    And this is probably why:
    https://www.googleapis.com/webfonts/v1/webfonts

    {
    "error": {
    "errors": [
    {
    "domain": "usageLimits",
    "reason": "dailyLimitExceededUnreg",
    "message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.",
    "extendedHelp": "https://code.google.com/apis/console"
    }
    ],
    "code": 403,
    "message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."
    }
    }

    greetings
    alexander

    http://wordpress.org/extend/plugins/wp-google-fonts/

  2. Aaron Brown
    Member
    Posted 1 year ago #

    Thanks for your post Alexander.

    The plugin has 3 methods to get the most recent list of Google Fonts.

    First, it tries to get them through the link you mention above (https://www.googleapis.com/webfonts/v1/webfonts). It is common that this has reached a daily limit, especially when the plugin is updated and many people are trying to update their fonts list at the same time.

    Next, it tries to get them through the same link, but with an API key for the plugin. This has a limit of 10,000 requests a day. So, this should be available at all times except for the first couple of days after any plugin update is released.

    Last, if it cannot connect with the two methods above, it uses a locally stored (in the plugin folder) recent copy of the Google Fonts list.

    The list will try to sync up with the most recent version each time you go to your Google Fonts settings and if it has been at least 12 hours since your last try.

    In your specific case, the error message is not stating a daily limit error, but a network error. That means there is likely a server issue with your site being able to connect to other sites on the web. You can take a look at this post on StackOverflow for possible solutions.

  3. akedv
    Member
    Posted 1 year ago #

    can you have a look at http://www.bmxware.com please? the old version of you plugin did work all right, but after the update no google fonts are displayed! i'm using the font "Righteous" and "Open Sans" as you can see in Firebug, the word Warenkorb (.widget-title) should be in Righteous but isn't.

  4. Aaron Brown
    Member
    Posted 1 year ago #

    @ak71, thanks for getting in touch.

    It looks like the CSS styles were kept and are outputting correctly. However, it appears that the stylesheet URL the plugin is generating is incorrect.

    Go to the Settings > Google Fonts admin page, verify that everything is correct by clicking on the "Show Options" next to each font that is set. Then, click on any of the "Save All Fonts" buttons. See if that fixes the issue and let me know.

  5. akedv
    Member
    Posted 1 year ago #

    nope, didn't fix the problem...

  6. Aaron Brown
    Member
    Posted 1 year ago #

    Hmm... I'll need to take a closer look at your site. If you'd like, please send me an email at wpgooglefonts@webmalama.com and we can go from there.

    In the mean time, if you can add the following code in your functions.php file, it may solve your specific issue until we solve the issue.

    add_action( 'wp_enqueue_scripts', 'wpgooglefonts_temp_fix' );
    function wpgooglefonts_temp_fix(){
       $protocol = is_ssl() ? 'https' : 'http';
    		$query_args = array(
    			'family' => 'Righteous:400|Open+Sans:400',
    			'subset' => 'latin',
    		);
       wp_enqueue_style( 'googlefonts-css-temp', add_query_arg( $query_args, "$protocol://fonts.googleapis.com/css" ), array(), null );
    }
  7. akedv
    Member
    Posted 1 year ago #

    hi,

    thanks for your effort, but adding this code to functions.php didn't change anything...

    greets
    alex

  8. Aaron Brown
    Member
    Posted 1 year ago #

    Hey Alex,

    That is really odd. The code above uses the exact same method as the WordPress Twenty Twelve theme to add the style to your theme header. However, on your site it is creating the same result as the WP Google Fonts plugin where it is outputting only the webfonts URL (http://fonts.googleapis.com/css) and not including its necessary query string (?family=Righteous:400|Open+Sans:400&subset=latin). It looks like something in your other plugins or theme set up is somehow stripping off the query string. If I had to guess, I would say that it is happening during the wp_enqueue_script action hook.

    Here are a couple of options to possibly get around this. Before either of these, remove the temporary fix code from your functions.php file.

    The most straightforward and sure way would be to add the following style information to your theme's main CSS stylesheet (usually style.css):

    @font-face {
      font-family: 'Righteous';
      font-style: normal;
      font-weight: 400;
      src: local('Righteous'), local('Righteous-Regular'), url(http://themes.googleusercontent.com/static/fonts/righteous/v2/w5P-SI7QJQSDqB3GziL8XT8E0i7KZn-EPnyo3HZu7kw.woff) format('woff');
    }
    @font-face {
      font-family: 'Open Sans';
      font-style: normal;
      font-weight: 400;
      src: local('Open Sans'), local('OpenSans'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff');
    }

    Another way would be to add the following line of HTML to your theme anywhere between the <head></head> tags (usually found in a header.php file):

    <link rel='stylesheet' id='googlefonts-css'  href='http://fonts.googleapis.com/css?family=Righteous:400|Open+Sans:400&subset=latin' type='text/css' media='all' />
  9. akedv
    Member
    Posted 1 year ago #

    Hi Aaron, it is probably the theme in combination with some strange plugin, but using the @font-face-method works just great, thank you so much!

    have a nice day! :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.