Bantymom
11-10-2009, 04:26 AM
I would like to use @font-face to be able to specify a fancy font in places on my forum. I am using Safari Version 3.2.1 and Firefox-Mozilla/5.0, and @font-face examples on other pages have worked in my browsers.
I saw it used in the following code:
@font-face
{
font-family : 'Perfect DOS VGA 437';
src : url('http://www.sigvatr.com/dosfont.ttf');
}
That font is not on my computer, so to test the code, I used it exactly as presented above. I put that in my CSS and then assigned that font to a class just to see if it would work, and it did, perfectly.
I didn't want to steal anything, so I took it right down and tried using the font I wanted, which is CygnetRound, a free font readily available all over the place. The forum I am working on only allows jpgs and gifs to be uploaded, so I uploaded it to sixpop, a free server that would allow ttf files. Since the DOS VGA font was not on the same server as my forum and it worked, I wasn't worried about it having to be on the same server as the forum.
@font-face {
font-family: 'CygnetRound';
src: url('http://sixpop.com/files/1514/CygnetRound.ttf');
}
.maintitle {
font-family : CygnetRound, Cursive, Serif;
vertical-align : middle;
text-align : center;
font-size : 26px;
color : #fafbea;
background-color : #d4d0a0;
}
I thought I was good because it looked like the DOS VGS example, but it didn't work.
Reading more, I thought that perhaps it was a font that wasn't allowed to be used with @font-face, so I found one where the license specifically grants permission to embed it in web pages using @font-face: pykes_peak_zero.otf
Obviously, I'm doing something wrong and would greatly appreciate help with this.
Here is a link to my forum: "Glass Slippers and Fairy Godmothers" (http://z6.invisionfree.com/GlassSlippers/index.php?http://z6.invisionfree.com/GlassSlippers)
It's provided by a service called Invisionfree, and while I can play with the CSS, I have no control over the HTML unless I add some. I did, and you can see it inside of two fucia-bordered boxes in the form of @font-face tests.
Unfortunately, I can no longer demonstrate that it did at least work once with original example using 'Perfect DOS VGA 437' because it no longer resides at its url ('http://www.sigvatr.com/dosfont.ttf'), and I can't find another live example to use anymore, so all I have are the two that I tried and that failed.
Below is HTML I added and the part of the CSS that I had hoped would cover this:
<center>
<div class="fonttest1">This should appear in the font "pykes peak zero," and not in Times or any Serif font. </div></center>
<center>
<div class="fonttest2">This should appear in the font "CygnetRound," and not in Ariel or any other Sans-Serif font. </div></center>
@font-face {
font-family: "pykes peak zero";
src: url("http://sixpop.com/files/1514/pykes_peak_zero.otf");
}
@font-face {
font-family: 'CygnetRound';
src: url('http://sixpop.com/files/1514/CygnetRound.ttf');
}
form {
display : inline;
}
img {
vertical-align : middle;
border : 0;
}
BODY {
font-family : Verdana, Tahoma, Arial, sans-serif;
font-size : 11px;
color : #9a9664;
margin : 30px 10px 30px 10px;
background-color : #e4e1be;
background-image : url(http://209.85.48.9/14646/162/upload/p315947.jpg);
background-position : center top;
background-attachment : fixed;
}
TABLE, TR, TD {
font-family : Verdana, Tahoma, Arial, sans-serif;
font-size : 11px;
color : #9a9664;
}
a:link, a:visited, a:active {
text-decoration : none;
color : #807C49;
}
a:hover {
color : #bcb886;
text-decoration : none;
}
.fonttest1 {
font-family : "pykes peak zero", Times, Serif;
font-size : 14px;
color : #000;
background : #FFF;
border : 3px solid #990033;
padding : 6px;
}
.fonttest2 {
font-family : CygnetRound, Ariel, Sans-Serif;
font-size : 18px;
color : #000;
background : #FFF;
border : 3px solid #990033;
padding : 6px;
}
I saw it used in the following code:
@font-face
{
font-family : 'Perfect DOS VGA 437';
src : url('http://www.sigvatr.com/dosfont.ttf');
}
That font is not on my computer, so to test the code, I used it exactly as presented above. I put that in my CSS and then assigned that font to a class just to see if it would work, and it did, perfectly.
I didn't want to steal anything, so I took it right down and tried using the font I wanted, which is CygnetRound, a free font readily available all over the place. The forum I am working on only allows jpgs and gifs to be uploaded, so I uploaded it to sixpop, a free server that would allow ttf files. Since the DOS VGA font was not on the same server as my forum and it worked, I wasn't worried about it having to be on the same server as the forum.
@font-face {
font-family: 'CygnetRound';
src: url('http://sixpop.com/files/1514/CygnetRound.ttf');
}
.maintitle {
font-family : CygnetRound, Cursive, Serif;
vertical-align : middle;
text-align : center;
font-size : 26px;
color : #fafbea;
background-color : #d4d0a0;
}
I thought I was good because it looked like the DOS VGS example, but it didn't work.
Reading more, I thought that perhaps it was a font that wasn't allowed to be used with @font-face, so I found one where the license specifically grants permission to embed it in web pages using @font-face: pykes_peak_zero.otf
Obviously, I'm doing something wrong and would greatly appreciate help with this.
Here is a link to my forum: "Glass Slippers and Fairy Godmothers" (http://z6.invisionfree.com/GlassSlippers/index.php?http://z6.invisionfree.com/GlassSlippers)
It's provided by a service called Invisionfree, and while I can play with the CSS, I have no control over the HTML unless I add some. I did, and you can see it inside of two fucia-bordered boxes in the form of @font-face tests.
Unfortunately, I can no longer demonstrate that it did at least work once with original example using 'Perfect DOS VGA 437' because it no longer resides at its url ('http://www.sigvatr.com/dosfont.ttf'), and I can't find another live example to use anymore, so all I have are the two that I tried and that failed.
Below is HTML I added and the part of the CSS that I had hoped would cover this:
<center>
<div class="fonttest1">This should appear in the font "pykes peak zero," and not in Times or any Serif font. </div></center>
<center>
<div class="fonttest2">This should appear in the font "CygnetRound," and not in Ariel or any other Sans-Serif font. </div></center>
@font-face {
font-family: "pykes peak zero";
src: url("http://sixpop.com/files/1514/pykes_peak_zero.otf");
}
@font-face {
font-family: 'CygnetRound';
src: url('http://sixpop.com/files/1514/CygnetRound.ttf');
}
form {
display : inline;
}
img {
vertical-align : middle;
border : 0;
}
BODY {
font-family : Verdana, Tahoma, Arial, sans-serif;
font-size : 11px;
color : #9a9664;
margin : 30px 10px 30px 10px;
background-color : #e4e1be;
background-image : url(http://209.85.48.9/14646/162/upload/p315947.jpg);
background-position : center top;
background-attachment : fixed;
}
TABLE, TR, TD {
font-family : Verdana, Tahoma, Arial, sans-serif;
font-size : 11px;
color : #9a9664;
}
a:link, a:visited, a:active {
text-decoration : none;
color : #807C49;
}
a:hover {
color : #bcb886;
text-decoration : none;
}
.fonttest1 {
font-family : "pykes peak zero", Times, Serif;
font-size : 14px;
color : #000;
background : #FFF;
border : 3px solid #990033;
padding : 6px;
}
.fonttest2 {
font-family : CygnetRound, Ariel, Sans-Serif;
font-size : 18px;
color : #000;
background : #FFF;
border : 3px solid #990033;
padding : 6px;
}