View Single Post
Old 05-23-2012, 07:55 AM   #2
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,558
Karma: 19620479
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
You need to embed both files, and to add both @font-face rules:

Code:
@font-face {
 font-family: 'DejaVuSans';
 src: url(Fonts/DejaVuSans.ttf);
 font-weight: normal;
 font-style: normal;
}

@font-face {
 font-family: 'DejaVuSans';
 src: url(Fonts/DejaVuSans-Oblique.ttf);
 font-weight: normal;
 font-style: italic;
}
Note the green parts are the same, the red parts are different.

Now it should be possible to have:

Code:
<p style="font-family: 'DejaVuSans'">Some <i>italic</i> words.</p>
(or with an external CSS instead of the "style" attribute)
Jellby is offline   Reply With Quote