My site is based on Wordpress and I googled for ways find out how to not load them in header. I found out about the methods in Google Fonts (Standard, Import, Javascript) and Enqueuing.
My question is why can’t I just copy paste the CSS code to my site main style.css?
For eg: for the font Roboto Condensed I could just copy paste the following to my style.css
I didn’t see anyone mention something like that. Is it bad for performance? Am I missing something? I just tested it with my site and I don’t see any problems.
Google gives you the link tags because it’s the easiest method to implement. Copy and paste it in your HTML. I’d imagine that almost noone (maybe 1 or two people…) could screw that up.
Why do you want to load that in your CSS? You’re still making a HTTP request.
Also I’ll ignore the glaring flaw that you only have .woff declared, which won’t give you a lot of cross browsersupport.
Thanks a lot for replying mate.
Im trying to “reduce” the HTTP requests.
Please correct me if I wrong. Im trying to learn/understand.
As I said I have 2 Google Fonts used. So that means I have totally 3 requests including main stylesheet.
If I put those google fonts CSS codes in my main stylesheet, doesn’t that mean I reduce HTTP requests to 1?
Isn’t that better?
What did you mean by woff declared, browser support? Do you mean if I put the Font CSS like that, there could be issues in Responsiveness?