Archived topic
console error because of google fonts
3 replies · Started by Itay on December 7, 2017
Hi!
I had a problem with adding the Open Sans Hebrew font from google fonts because that it is still on the early access font list and it didnt show up in the control panel. so I have added that code that was suggested on your website:
add_filter( 'generate_typography_customize_list','tu_add_google_fonts' );
function tu_add_google_fonts( $fonts ) {
$fonts[ 'open_sans_hebrew' ] = array(
'name' => 'Open Sans Hebrew',
'variants' => array( '300', '300i', '400', '400i', '500', '500i', '600', '600i', '700', '700i' ),
'category' => 'serif'
);
return $fonts;
}
But now on each load of the website I get a console error:
GET https://fonts.googleapis.com/css?family=Open+Sans+Hebrew net::ERR_ABORTED
and the real url that needs to load up is:
http://fonts.googleapis.com/earlyaccess/opensanshebrew.css
please tell me what to do to make it works properly, thanks!
Is there a page that gives you instructions for adding that specific font?
Like this one: https://fonts.google.com/specimen/Open+Sans?selection.family=Open+Sans
you can see instructions only here:
https://fonts.google.com/earlyaccess#Open+Sans+Hebrew
as it is early access fonts and not officially distributed production version
Ah, so it's not available via their API.
I'm afraid you'll likely need to stick with using the CSS they provide there until it's officially released.