james438
07-27-2011, 06:01 PM
Hi,
I am using @font-face, which I am not very familiar with. I am using a font stored on my website and loading it into visitor's browsers if it is not found on their computer. I can get it to work with Opera and IE8, but not Firefox or Chrome. Here is the code I am using:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<head>
<style type="text/css" media="screen, print">
@font-face {
font-family: cool_font;
font-style: normal;
font-weight: normal;
local("/include/fonts/ImperatorSmallCapsBold.ttf");
src: url("http://www.animeviews.com/include/fonts/ImperatorSmallCapsBold.ttf");
src: url("http://www.animeviews.com/include/fonts/ImperatorSmallCapsBold.eot");
src: local("cool_font"), url("http://www.animeviews.com/include/fonts/ImperatorSmallCapsBold.ttf") format("opentype");
}
p.custom_font{
font-family: "cool_font";
font-size:52px;
}
</style>
<TITLE>
Editor 1.24</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
</head><body>
<p class="custom_font">jgahskd</p>
</body></html>
What is frustrating is that I can't seem to get it to work in Firefox 5 at all. I have tried many different formats, but I can't get custom fonts to work in Firefox 5.
I am using @font-face, which I am not very familiar with. I am using a font stored on my website and loading it into visitor's browsers if it is not found on their computer. I can get it to work with Opera and IE8, but not Firefox or Chrome. Here is the code I am using:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<head>
<style type="text/css" media="screen, print">
@font-face {
font-family: cool_font;
font-style: normal;
font-weight: normal;
local("/include/fonts/ImperatorSmallCapsBold.ttf");
src: url("http://www.animeviews.com/include/fonts/ImperatorSmallCapsBold.ttf");
src: url("http://www.animeviews.com/include/fonts/ImperatorSmallCapsBold.eot");
src: local("cool_font"), url("http://www.animeviews.com/include/fonts/ImperatorSmallCapsBold.ttf") format("opentype");
}
p.custom_font{
font-family: "cool_font";
font-size:52px;
}
</style>
<TITLE>
Editor 1.24</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
</head><body>
<p class="custom_font">jgahskd</p>
</body></html>
What is frustrating is that I can't seem to get it to work in Firefox 5 at all. I have tried many different formats, but I can't get custom fonts to work in Firefox 5.