PDA

View Full Version : @fontface problem



raccoon2
12 Feb 2010, 12:09 AM
Hello all,

I'm trying to use @fontface on one of my sites.
I'm using Dreamweaver CS4 on a Mac, but also have a PC to test on.
I downloaded the @fontface from font Squirrel, which had the CSS stylesheet along with the chosen font in the zip file.
Within my site I created a folder called "font" and unzipped the fonts and stylesheet into the folder. I also installed the fonts onto OS X with font book.

The fonts were CartoGothicStd-Book.eot, CartoGothicStd-Book.otf, CartoGothicStd-Bold.eot, CartoGothicStd-Bold.otf and my css looked like this:

@font-face {
font-family: 'CartoGothicStdBold';
src: url('font/CartoGothicStd-Bold.eot');
src: local('CartoGothic Std Bold'), local('CartoGothicStd-Bold'), url('CartoGothicStd-Bold.otf') format('opentype');
}

@font-face {
font-family: 'CartoGothicStdBook';
src: url('font/CartoGothicStd-Book.eot');
src: local('CartoGothic Std Book'), local('CartoGothicStd-Book'), url('CartoGothicStd-Book.otf') format('opentype');
}

I then called it using font-family: CartoGothicStdBook, or h1 { font-family: CartoGothicStdBold; }

The weird thing is in Dreamweaver all the fonts showed fine, and if I viewed the website on a Mac that didn't have the font installed the website showed fine. On a PC I couldn't get the font to show.
The fonts all got uploaded when I uploaded the site in Dreamweaver, they were in the font folder. I'm sure I have my path to the font folder correct.
If someone could let me know what I am doing wrong that would be appreciated.