Hi,
For a while now I’ve been frustrated with the fact that IE seems to blatantly ignore my custom Google font. I use the Open Sans font and for my h1 title I want font-weight:800; while the h2 is font-weight:300;. Enfold (standard) adds the option to use Open Sans, but it does not seem to add the font-weights I need (300 & 800).
I’ve even added this to my custom.css:
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,400,300,800,700);
* {font-family:"Open Sans";}
I have tried several other ways too, but so far nothing gets it to work. In fact, IE began to ignore my custom font ever since the update came along in which the “compatibility mode” fix for IE was added.
Check out my site in several browsers to see the difference of font-weights compared to IE:
http://goo.gl/Kb08LL
Any ideas how to make it work again?
Hey DavyE!
Please refer to Ismael’s post here – https://kriesi.at/support/topic/add-new-font/#post-234710
Regards,
Yigit
So based on your suggestion, Yigit, this is what I’ve added to functions.php:
add_filter( 'avf_google_heading_font', 'avia_add_heading_font');
function avia_add_heading_font($fonts)
{
$fonts['Open Sans'] = 'Open Sans:300,400,700,800';
return $fonts;
}
add_filter( 'avf_google_content_font', 'avia_add_content_font');
function avia_add_content_font($fonts)
{
$fonts['Open Sans'] = 'Open Sans:300,400,700,800';
return $fonts;
}
Unfortunately it’s still not working. Still just standard font-weights. I tried clearing my caches and gave it some time, but maybe you could double-check the page in my previous post to see if it’s working or not?
Here’s how it looks on Chrome / IE:
Cheers!
Josue
Ok, thank you very much. For some reason my IE browser refuses to recognise the font weights then. As long as others see it right.
This confirms why IE is not my best friend. :)