Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS CSS Basics (2014) Enhancing the Design With CSS Web Fonts with @font-face

Ben Brenton
Ben Brenton
266 Points

@font-face or Google Fonts?

I am currently using Google Fonts in my project via a link to my HTML pages from Google, and then specifying in my CSS which fonts are to be used where. I am struggling to understand what @font-face does which is not currently being done? Surely adding another font rule into my files will slow load time even more?

1 Answer

Ryan Field
PLUS
Ryan Field
Courses Plus Student 21,242 Points

Including @font-face in your CSS is the same, as far as I know, as including a <link> tag in your HTML head pointing to Google Fonts.

The link is actually linking to a stylesheet (i.e. a CSS file on Google's servers), so functionally it's the same thing. Either way, you are loading an external font for your site, so it's going to increase load times (albeit usually not by any noticeable amount, unless you are loading A LOT of fonts).