transparent
transparent

Reputation: 182

Loading custom fonts failure

So I was trying to load a new font with CSS3's @font-face, but it wasn't working. Here is my code:

@font-face{
    font-family: myFirstFont;
    src: url('styles/LucidaGrande.ttf');
}

/* [...] */

@media screen and (max-width: 5500px) {
    #title{
        font-size:50px;
        font-family: myFirstFont;
    }
}

Any help?

Upvotes: 0

Views: 241

Answers (1)

Wouter J
Wouter J

Reputation: 41934

You need to use multiple formats, not every browser supports the truetype font format. Put your file into the font-face generator and you get all the information that is needed to get this work in every browser: Firefox 3.5+; Opera 10+; Safari 3.1+; Chrome 4.0.249.4+; Internet Explorer 4+; iPad; iPhone.

If it doesn't solve the problem, please provide more information about the browser, ect. and give us a live example.

Upvotes: 1

Related Questions