![]() |
Embedded Web Fonts?
Hey guys. I'm trying to figure out how to get this font to appear in the footer on my website. I'm not really familiar with the @font-face thing - but I've been following the directions I've read as best as I can and can't seem to get it to work.
Code:
@font-face { font-family: bebas-neue; src: url('fonts/bebas-neue.eot'); /* For IE */ src: local('bebas-neue'), url('fonts/bebas-neue.ttf') format('truetype'); /* For non-IE */ } Advice would be appreciated. Thanks! ~TT |
@font-face defines a new font family:
Code:
@font-face { Once defined, it can be called through CSS like any other font: Code:
p { |
Gah, I'm an idiot. That's what I get for working on my site when I'm dead tired. I think the font paths were incorrect.
Thanks! |
Any idea why it's not working in IE? I know IE is terrible but I'd like it to still work in there too since it does in all the other browsers.
|
What version of IE?
|
Versions 8 and 9.
|
Ok, just to recap, if you already have an EOT file along with your TTF, your CSS should look like this:
Code:
@font-face { Code:
<!--[if IE]>@font-face { http://www.microsoft.com/typography/WEFT.mspx So make sure that you have the EOT and that it is in the right place and see if IE works properly then. |
When I try the format you just posted, it still doesn't display in IE, and it breaks it in firefox.
When it works in FF, this is how I have it - Code:
@font-face I've seen so many different ways to format it on so many different sites and none of them have worked except that exact way. And even then, it only works in FF and Chrome. I'm not sure what I could be screwing up. |
If you don't exactly "get" @font-face property you can use little helpers
Google: "font squirrel" - Useful in cases where you have a random font that you have a version of on the desktop and are able to upload it. Font Squirrel converts your font into all 4 versions you need for different browsers. If you do not have a font in mind just goto "Google Fonts" its a webfont site where you can choose form thousands of fonts and it outputs the proper code for you to use the fonts on your site, you can choose to let google host it as well. Also they show Page Speed (Load Time) Impacts based on each font :) |
Cool. Took a little messing around but I managed to get it. Thanks a million!
|
All times are GMT -7. The time now is 12:51 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc