Googlefont problem: Wrong stylesheet link in Header when using only Standard-Fonts
I have googlefonts enabled at my typography fields. But when I select only Standard fonts (let's say Arial, Helvetica...) at all Typography fields the googlefont stylesheet link is still set into the header:
<link rel="stylesheet" id="options-google-fonts" href="//fonts.googleapis.com/css?family=Arial,+Helvetica,+sans-serif:400&v=1389725499" type="text/css" media="all">
Confirmed. I see this as well. I'm on it.
Okay, updated field_typography. See if that does it.
Thanks for the quick change, but it doesn't seem to work. I have one typo field with Arial and one with Google-Font (f.e. 'Abel'). Now I do not see any <link rel="stylesheet" ... in header any more and the google font is not loaded.
Let me post my configuration for type fields. Maybe I miss something?
array(
"title" => _x("Typography H1 Headline", "backend", "xxx-theme"),
"desc" => _x("Pick the Typo for H1 Headlines", "backend", "xxx-theme"),
"id" => "opt_mainh1font",
"default" => array(
'color'=>"#ccc",
'font-style'=>'400',
'font-family'=>'Arial, Helvetica, sans-serif',
'font-size'=>'1.500em',
'line-height'=>'1',
),
"type" => "typography",
"google" => true,
"font-backup" => true,
"units" => 'em',
So I understand you correctly: You are selecting 'Abel' in the primary font selector, and Arial, etc in the backup font selector?
No Kevin, I have 2 Typo fields (Let's say: H1 Headline and H2 Headline). In the first I select Arial and in the second Abel.
Okay, @FrankyG. I just pushed another build. I think I have it this time. With so many different conditions to test under, it difficult to say with 100% accuracy. That said, if this doesn't nail it, let me know! Also, font-backup should now also work. FYI, it should not append to Google fonts CSS in your HTML. It will only append to font-family via output or compiler, which I think was the original intent.
@kprovance Thanks, Kevin. It works now. The only thing I was wondering about and I had to change was the 'default' 'font-family' content. I had to get rid of all blanks, because my default was 'Arial, Helvetica, sans-serif' and has to be 'Arial,Helvetica,sans-serif' (without blanks) now. I think, this could happen to a lot of users - It's not compatible... But thanks a lot for the quick fix.
3.1.5 now fixes the comma space issue.