So I'm having trouble getting fonts to source properly.
I have in my public_html
, index.php
which uses the stylesheet stored in a folder one directory higher than the html, accessing it through subdomain.
Everything is working except the fonts. The fonts are stored in the same webroot as the stylesheet, except one folder down, in fonts
Should I be sourcing them with an absolute URL or is there something wrong with my css?
EDIT: I have a background image that is using url()
in css working the same way, and it functions just fine.
body {
background: url('img/bg.png') no-repeat center center fixed;
font-family: typewriter;
}
/* -- FONT DEFINITIONS -- */
@font-face {
font-family: code;
src: url('font/code.ttf') format('truetype');
}
l33tContainer .font1 {
font-family: code;
}
@font-face {
font-family: typewriter;
src: url('font/typewriter.ttf') format('truetype');
}
l33tContainer .font2 {
font-family: typewriter;
}
/* END FONT DEFINITIONS */