View Full Version : css - file for font
How do you use a custom font for for your style for a page?
So the font is:
FontFile.ttf
Didn't think you could, unless the viewer has that font.
PHP GD?
iTech
03-08-2008, 03:41 PM
GD is for images I do believe.
Jack you can't, I don't think?
Didn't think you could, unless the viewer has that font.
PHP GD?
GD is for images I do believe.
Jack you can't, I don't think?
The reason im doing this is because GD was playing up xD
Oh well, ill just use Verdana. Its as good as any.
Jahova
03-08-2008, 04:29 PM
Their were many way, most of the known ones are not unsupported.
Your best bet nowadays is GD, which needs to be installed onto your server.
RichardKnox
03-08-2008, 04:43 PM
use sIFR. It's the best solution as it is also SE friendly as opposed to it being images it appears to the search engines as plain text.
GD is for images I do believe.
Jack you can't, I don't think?
Yes, it is.
So you'd create a block of text as an image...
iTech
03-08-2008, 08:53 PM
Yes, it is.
So you'd create a block of text as an image...
That's a mistake on my behalf. :)
craigg.
03-08-2008, 10:32 PM
In the space of two seconds to type "css custom font" in google I have found your answer.
Embed a Custom Font in Internet Explorer
To embed a custom font, let me show you the code first, and then explain what you have to do to get the code to work correctly.
I advise you to place this code between the <style type="text/css"> </style> tag set in the head of the document.
@font-face {
font-family: newfontname;
font-style: normal;
src: url(newfontname.eot);
}
You have now defined a new font-face that you can use throughout your CSS document like any other font, but before this takes effect, you must encode and upload the .eot file which stands for Embedded Open Type format. To do this, download Microsoft's Web Embedding Font Tool at http://www.microsoft.com/typography/WEFT.mspx
In your code, you will also need to change "newfontname" to the name of your font, and you can include a path to find the font.
But then your only limited to it working in IE
In the space of two seconds to type "css custom font" in google I have found your answer.
And whats a .eot?
craigg.
04-08-2008, 12:38 PM
Embedded Open Type format
It says at the bottom of my post :)
http://www.albinoblacksheep.com/text/font
It may work in firefox, I haven't tried. On that link it also says how to work it for netscape.
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.