This is undoubtedly me doing something really dumb, but I can't see it. I'm trying to use FontAwesome as a font-family in my css, but it doesn't seem to be working.
With minimal code, I have:
<head>
<link href="assets/css/font-awesome.css" rel="stylesheet">
<style>
body {
font-family: FontAwesome;
}
</style>
</head>
<body>
Test FontAwesome!
</body>
This is showing up as clearly Times New Roman.
The FontAwesome font itself is stored in assets/font/, and font-awesome.css has the following @font-face
defined:
@font-face {
font-family: 'FontAwesome';
src: url('../font/fontawesome-webfont.eot?v=3.0.1');
src: url('../font/fontawesome-webfont.eot?#iefix&v=3.0.1') format('embedded-opentype'),
url('../font/fontawesome-webfont.woff?v=3.0.1') format('woff'),
url('../font/fontawesome-webfont.ttf?v=3.0.1') format('truetype');
font-weight: normal;
font-style: normal;
}
Changing the ..
to assets
gives an obvious error that it can't find the font, so I'm pretty sure the relative pathing is just fine and dandy. If I change it to font-family: FontAwesome,Arial;
, it uses Arial. Clearly, it can't find FontAwesome and I don't know why.
Any particular reason why I'm not able to change my body font to FontAwesome?