killay Posted January 30, 2008 Share Posted January 30, 2008 Hi,I'm trying to embed a custom font into my website.I made some researches and found out it's possible by converting your font into an ".eot" file and then using following css code: <style type="text/css">@font-face {font-family: nameoffont;font-style: normal;src: url(nameoffont.eot);}</style> But how do I call my <div> then? <div id="font"> ?Or is there any other way to do it? Link to comment Share on other sites More sharing options...
ScottR Posted January 30, 2008 Share Posted January 30, 2008 I've never done this. But it looks like you would just add "nameof font" (font names must contain quotes if they contain spaces) to your style declarations. #sample {font-family: "nameof font", Arial, "Times New Roman";} Link to comment Share on other sites More sharing options...
Synook Posted January 31, 2008 Share Posted January 31, 2008 Oh dear... Embedded OpenType is a proprietary standard supported exclusively by Internet Explorer.But anyway, did you just rename the font file with .eot, or did you use the Microsoft WEFT tool? Only the latter method ensures a correct .eot file. Then, after the @font-face declaration you would just name the font when defining font-family, as per ScottR's post.<style type="text/css">@font-face { font-family: nameoffont; font-style: normal; src: url(nameoffont.eot);}div#font /* or whichever element */ { font-family:nameoffont;}</style> Link to comment Share on other sites More sharing options...
killay Posted January 31, 2008 Author Share Posted January 31, 2008 Well I used microsoft WEFT tool.I just saved it on my computer and later uploaded on the webspace.This is the code I have: <html><head><meta http-equiv="Content-Type" content="text/html;iso-8859-1"><meta name="description" content="FW MX CSS Layer"><style type="text/css">@font-face {font-family: STEREOF0;font-style: normal;src: url(STEREOF0.eot);}div#welcome {font-family: "STEREOF0";}</style></head><body> <div id="welcome"> :: Welcome to ...:: </div></body></html> But apperently it doesn't work. Link to comment Share on other sites More sharing options...
Synook Posted February 1, 2008 Share Posted February 1, 2008 What browser are you using? Also, you can remove the quotes for single-word font names. Link to comment Share on other sites More sharing options...
applecoder Posted February 4, 2008 Share Posted February 4, 2008 You do know, not everyone uses IE?So your best bet is to take the text with the font and create an image .jpg, png, or .gif, so ANYONE can view your site the way YOU want them to, not just IE users.AC Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.