I am using @font-face to define a font family in my CSS style sheet. When I then try to set the font family attribute, I am not able to get the new font to display on my HTML page.
@font-face {
font-family: 'Goudy Trajan Regular';
font-style: normal;
font-weight: 400;
src: local('Goudy Trajan Regular'), local('GoudyTrajan-Regular'),
url(http://allfont.net/cache/fonts/goudy-trajan-regular_9c60d369eeef3d3ea1e3ddaa07f3e15f.woff) format('woff'),
url(http://allfont.net/cache/fonts/goudy-trajan-regular_9c60d369eeef3d3ea1e3ddaa07f3e15f.ttf) format('truetype');
}
html, body
{
height: 95%;
width: 90%;
font-family: 'Goudy Trajan Regular', arial;
}
Update: I've stripped everything out and it still is not working. Here is my complete CSS -
@font-face {
font-family: 'Goudy Trajan Regular';
font-style: normal;
font-weight: 400;
src: local('☺'),
url(http://allfont.net/cache/fonts/goudy-trajan-regular_9c60d369eeef3d3ea1e3ddaa07f3e15f.woff) format('woff'),
url(http://allfont.net/cache/fonts/goudy-trajan-regular_9c60d369eeef3d3ea1e3ddaa07f3e15f.ttf) format('truetype');
}
body
{
font-family: 'Goudy Trajan Regular', arial;
}
Here is my complete HTML -
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="css/style2.css">
</head>
<body>
<h1>TESTING A NEW FONT</h1>
</body>
</html>