Pages

Sunday, March 15, 2015

HTML5: Font loading

Load the font you want to use in your page:

@font-face 
{
 font-family: "newFont";
 src: url( newFont.ttf );
}

h1
{
 font-family: "newFont";
}

NOTE: Make sure that there's no spacing between "url" and the open bracket, such as this:

 src: url ( newFont.ttf );

It'll cause the font not being able to get loaded.

No comments: