I'm using Open Sans for titles (h3, h4...) and I'd like to have a different weight for each (800 for h3, 300 for h4).
Doing this works fine on recent browsers but fails on older version of IE (6,7,8) and the h3 gets only the 300 weight.
If I inspect the CSS file received for IE8 I have only one font:
@font-face {
font-family: Open Sans;
src: url(http://themes.googleusercontent.com/static/fonts/opensans/v6/cJZKeOuBrn4kERxqtaUH3fY6323mHUZFJMgTvxaG2iE.eot);
}
While in IE9 I receive multiple weights:
@font-face {
font-family: Open Sans;
src: local("Open Sans Light"), local("OpenSans-Light"), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/DXI1ORHCpsQm3Vp6mXoaTXZ2MAKAc2x4R1uOSeegc5U.eot) format("embedded-opentype"), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/DXI1ORHCpsQm3Vp6mXoaTXhCUOGz7vYGh680lGh-uXM.woff) format("woff");
font-weight: 300;
font-style: normal;
}
@font-face {
font-family: Open Sans;
src: local("Open Sans Extrabold"), local("OpenSans-Extrabold"), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/EInbV5DfGHOiMmvb1Xr-hnZ2MAKAc2x4R1uOSeegc5U.eot) format("embedded-opentype"), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/EInbV5DfGHOiMmvb1Xr-hnhCUOGz7vYGh680lGh-uXM.woff) format("woff");
font-weight: 800;
font-style: normal;
}
This seems to be a limit of Google Fonts but it seems there's a way to deal with this.
Is there a workaround in font-your-face ?
Comments
Comment #1
sreynen commentedThe linked solution is essentially "use a different provider." We can already do this with the module as-is, so I think we should just add some documentation suggesting this approach for Open Sans and any other fonts Google splits like that. Anyone want to add a child page to http://drupal.org/node/1286960 for this?
Comment #2
grimal commentedInstead of using a different provider i've found another solution for the problem on stack overflow: http://stackoverflow.com/questions/3694060/how-to-make-google-fonts-work... (second solution)
This is the fix for the google_fonts_api_preprocess_html function:
Comment #3
neslee canil pinto