Friday 18 March 2011

@font-face

In order to use a font of my choice that is not a web safe font, I have to use the (fairly new) @font-face tag. The idea is, i have a copy of the font file within the website folder,, and then reference it in the CSS and the browser does the rest.
Here is the CSS i have used:


@font-face{
font-family: BebasNeue;
src: url(../fonts/BebasNeue.otf);
}

...then include the font face in the desired chunks of CSS, example:


.text-3{
font-family: BebasNeue;
font-size:25px;
}

...I like it quite a lot.

No comments:

Post a Comment