viernes, 30 de marzo de 2012

CSS - Mobile - Custom Fonts

Recently, I was working with custom fonts for mobile web and I wanted to share the best way for doing this (in my opinion)

I tested this on iPod / iPhone, Android and BlackBerry and it's working fine.


How to use it:
In browsers that support the font-face property, custom fonts can be embedded with a small chunk of CSS:
@font-face {
    font-family: "Robson Celtic";
    src: url("http://site/fonts/rob-celt")
}
Afterwards the font can be used as normal within the CSS:
p {
    font-family: "Robson Celtic";
    font-size: 1em;
}