Fields with * are mandatory

Dios - Do It Open Source
 

Custom fonts on website

Custom fonts on website
Sometime you would like to use custom fonts on your website, but you don't want to use images to render that fonts.
Fortunately, there is a nice facility, included in CSS3, which help you to reach your scope.

If you don't care about IE users, all what you need is to import the font, then use it.

@font-face{
    font-family: myfont;
    src: url('http://www.fontwebsite.com/myfont.ttf');
}

p{
    font-family: myfont;
}

Now, as usually, Internet Exploder have its own mode to do this.
To use your font in IE, will be neccesary to have your font in .eot format too, which is a M$ proprietary format.
And we will use another CSS3 keyword, named "local". Because IE don't know this keyword, will ignore it, while other clever browsers will use it.

@font-face{
     font-family: myfont;
     src: url('myfont.eot');
    src: local(myfont), url('myfont.ttf') format('truetype');
}

p{
    font-family: myfont;
}

The simplest and complete solution is to use Font Squirell generator. It will create for you all do you need to integrate custom font into your website.



Add comment
Citation will be added automatically at the top of your message!