Embedding Fonts for CSS

by
Posted August 2nd, 2011 at 5:02 am

Want to get away from ‘Web Safe’ fonts for some attractive headers AND do it without using an image? Use CSS 3 and embed a font-face! @font-face is not strictly speaking ‘CSS3′; it was originally born in CSS 2 and although not appearing in CSS 2.1, CSS 3 is attempting to bring it into the standards.

In order to use a font, we first must call it using the ‘@font-face’ attribute and this must be done for each individual font we wish to use. Although I’m sure you have a few, you can download some fonts to experiment with here, at dafont.com.

In order to embed a font for use in CSS, you need to use the @font-face CSS.

Each @font-face font kit come with:

  • TrueType Fonts for Firefox 3.5+ , Opera 10+, Safari 3.1+, Chrome 4.0.249.4+
  • EOT fonts for Internet Explorer 4+
  • WOFF fonts for Firefox 3.6+, Internet Explorer 9+, Chrome 5+
  • SVG fonts for iPad and iPhone
  • Cufón fonts in case you want them
  • Demo.html and stylesheet.css so you can get going fast

NOTE: If you download a @font-face kit from this page, you will get the MacRoman subset. If you would like a different subset, click the “View Font” link and choose the @font-face kit there. You will have a lot more options.

A good website to get prepackaged fonts for @font-face use is www.fontsquirrel.com/fontface.  You can also download fonts from dafont.com and use converter in order to turn true type fonts into open type fonts.

 

Share This Post!

Enjoy the post? Share it to your friends.


Share on Digg  Sharet on Stumbleupon  Share on Twitter  Share on Facebook  Save on Delicious

Stay updated!

Get the latest articles and updates.


Subscribe to our Rss Receive updates by mail



About the Author |

Hey, I am a designer who would love to animate your ideas. With a little bit of luck and skill anything is possible. "An artist is not someone that is born with a talent, an artist is someone that works for that talent."

Visit Michael’s Website

Tags: ,
One ResponseLeave a comment
  • Kavya Hari
    August 13, 2011 at 4:26 pm

    Use Css font for internet explorer :)

    [Reply]

Add a commentGet a Gravatar

* Name

* Email Address

Website Address

You can usethese tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Sponsors
Subscribe
Subscribe to our RSS feed and get site updates delivered to your inbox daily.
Sponsors
Friends & Partners
Around The Site