tags:

views:

154

answers:

2

Right now I'm trying desperately to get @font-face to work in my website. This is the code I am using right now.

@font-face {  
font-family: romeral;  
src: url(fonts/romeral.otf ) format("opentype");  
}

And then....

h1 {
font-size:2.5em;
font-family:romeral;
}

I am using the font Romeral. Here's a link to it: http://www.smashingmagazine.com/2007/02/06/freefont-of-the-week-romeral/

For some reason it just won't work. It won't render the font on the page. I've tried using other fonts like Ripe, and they work. I've made sure I don't have any spelling errors. What I'm wondering is if there is a restriction that some fonts use to stop people from using their fonts with @font-face. Or maybe I've made an obvious mistake in my code.

Thanks in advance.

+1  A: 

This should work (Enter the names in "")

@font-face {  
font-family: "romeral";  
src: url("fonts/romeral.otf") format("opentype");  
}
N 1.1
And if that doesn't work make sure your url path is correct.
kylex
ack!...I had the wrong path. For some reason I thought I was linking it from the main folder but I should have linked it from the css folder. I just added "../" to the beginning of the url and it worked... Crazy me
codedude
In this case the `"…"` don't matter (they only make a difference when using spaces in names).
Marcel Korpel
A: 

Does your browser support opentype, you're not using IE are you? In that case you need WEPT fonts.

SpliFF
I using firefox.
codedude