I'm attempting to apply webfont to improve my page. Found what I wanted and uploaded to my own server that's hosting my project. This is my css:
@font-face {
font-family: 'urban';
src: url('/urban-sketch.ttf');
#div {font-family: urban;}
The directory is hot-linked and not a shortcut like I posted here. Nothing shows, the font doesn't load at all. It made me think something could be wrong with the ttf itself. I tried another font next, and applied the same code and it didn't work either. I've searched all over for 24 hrs nearly and the most common issue is with the directory. Therefore I've checked an insane amount of times to make sure the directory is correct. The last thing I've done is now look into fontsquirrel, uploaded my font, copied their style sheet for it and corrected the directories yet still nothing showed up. I'm testing this in 3 browsers, IE, FF, and Chrome. I've given up now and hope someone can uncover what's being done wrong.
Here is the current fontsquirrel code, I'm using now:
@font-face {
font-family: 'urban_sketchregular';
src: url('/urban-webfont.eot');
src: url('/urban-webfont.eot?#iefix') format('embedded-opentype'),
url('/urban-webfont.woff2') format('woff2'),
url('/urban-webfont.woff') format('woff'),
url('/urban-webfont.ttf') format('truetype'),
url('/urban-webfont.svg#urban_sketchregular') format('svg');
font-weight: normal;
font-style: normal;
}
#div {
border-style: dotted;
margin-bottom:25px;
font-family: urban_sketchregular;
}