Jump to content

How To Embed A Font?


GPSJane

Recommended Posts

The only current W3C standards compliant way is to utilize CSS3, using the @font-face. It basically lets the browser download the font from a url and use it for the web page being displayed. Of course, you will need a browser that supports CSS3. As far as I can tell, the latest versions of FF, Opera, Chrome and Safari should all support this, IE is a no go though. 4/5 for the major browsers isn't too bad though. Check out the link for the W3C document and example code.W3C CSS3 @font-face

Link to comment
Share on other sites

The only current W3C standards compliant way is to utilize CSS3, using the @font-face. It basically lets the browser download the font from a url and use it for the web page being displayed. Of course, you will need a browser that supports CSS3. As far as I can tell, the latest versions of FF, Opera, Chrome and Safari should all support this, IE is a no go though. 4/5 for the major browsers isn't too bad though. Check out the link for the W3C document and example code.W3C CSS3 @font-face
Damn. Pity so many people use IE since it's so kak.What about old CSS1 methods? Do they still work?
Link to comment
Share on other sites

IE does support the @font-face protocols, it just doesn't support .ttf. fonts. You need to use two font files, one .ttf and one .eot (you can convert them back and forth as needed) and this will provide full cross-browser support for all current incarnations of the popular browsers. Just make sure that you list the .eot file first, otherwise IE will break.Take a look here for the low down: http://randsco.com/index.php/2009/07/04/p680

Link to comment
Share on other sites

  • 10 months later...

I found the (imo perfect) solution:go to http://www.fontsquirrel.com/fontface/generator and use the generator to create all needed font files for embedding fonts.the package that you will download contains an example (you'll find the embedding in the css file)I've tried it for my current project with succes.good luck,Kim

Link to comment
Share on other sites

IE does support the @font-face protocols, it just doesn't support .ttf. fonts. You need to use two font files, one .ttf and one .eot (you can convert them back and forth as needed) and this will provide full cross-browser support for all current incarnations of the popular browsers. Just make sure that you list the .eot file first, otherwise IE will break.Take a look here for the low down: http://randsco.com/index.php/2009/07/04/p680
Yeah, I was about to say this. Strangely enough, IE was the first browser to ever support @font-face. I believe they've supported it since IE4 or IE5.
Link to comment
Share on other sites

I wondered why fontsquirrel was coming up to answer this question again (as it did 2-3 days ago) when I saw that this thread is almost a year old.Please do not resurrect old threads. Other boards may make that a common practice, but this one does not. It's not a rule, I don't think, but it's the way we do things.(I haven't studied this, but my gut tells me that a thread is "old" after 2-3 days, unless the OP bumps it again.)

Link to comment
Share on other sites

I wondered why fontsquirrel was coming up to answer this question again (as it did 2-3 days ago) when I saw that this thread is almost a year old.Please do not resurrect old threads. Other boards may make that a common practice, but this one does not. It's not a rule, I don't think, but it's the way we do things.(I haven't studied this, but my gut tells me that a thread is "old" after 2-3 days, unless the OP bumps it again.)
Ah, I didn't even realize this was an older thread.
Link to comment
Share on other sites

I figured you didn't. I only got curious myself because of the fontsquirrel reference. I thought maybe this was the same thread I'd seen a couple days ago, and I wondered why the answer had been repeated. Then -- ah hah.My comment was entirely for the member who dug it up. For all I know, s/he was searching the archives and didn't notice either.

Link to comment
Share on other sites

I figured you didn't. I only got curious myself because of the fontsquirrel reference. I thought maybe this was the same thread I'd seen a couple days ago, and I wondered why the answer had been repeated. Then -- ah hah.My comment was entirely for the member who dug it up. For all I know, s/he was searching the archives and didn't notice either.
You're right. Sorry :)
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...