944,181 Members | Top Members by Rank

Ad:
Nov 8th, 2009
0

CSS Text ttf/eot

Expand Post »
I am trying to incorporate an eot/ttf file named "steve.ttf"/"steve.eot" into a CSS, but I am seeing no changes being made. The font items are located in the same folder as the html document.

Here is the code I am using:
HTML and CSS Syntax (Toggle Plain Text)
  1. @font-face {
  2. font-family: MyCustomFont;
  3. src: url("steve.eot");
  4. src: local("steve.ttf") format("truetype");
  5. }
  6.  
  7. p.style1{
  8. font: MyCustomFont;
  9. }

and I'm trying to insert it into this:
HTML and CSS Syntax (Toggle Plain Text)
  1.  
  2. <p class="style1">This shoud be My New Font</p>

Do you see any errors (I'm trying to use firefox and IE)?
Similar Threads
Reputation Points: 10
Solved Threads: 1
Posting Whiz in Training
PDB1982 is offline Offline
204 posts
since Oct 2009
Nov 8th, 2009
0
Re: CSS Text ttf/eot
fonts dont work(custom ones)
Reputation Points: 15
Solved Threads: 7
Posting Pro in Training
SKANK!!!!! is offline Offline
428 posts
since Apr 2009
Nov 13th, 2009
0
Re: CSS Text ttf/eot
This method works does not work on 'Chrome 1, Fire­fox 3, Safari 2, Opera 9'.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
aDevS is offline Offline
9 posts
since Nov 2009
Nov 13th, 2009
1
Re: CSS Text ttf/eot
What is font: MyCustomFont? Wrong css.
Must be:
HTML and CSS Syntax (Toggle Plain Text)
  1. font-family: MyCustomFont;
'font' is short hand property. You must use this for shorthand.
HTML and CSS Syntax (Toggle Plain Text)
  1. font: [font-weight] [font-style] [font-variant] [font-size/line-height] [font-family];
  2. /* font: MyCustomFont is wrong */
Reputation Points: 120
Solved Threads: 134
Practically a Master Poster
Zero13 is offline Offline
620 posts
since Jan 2009
Nov 13th, 2009
0
Re: CSS Text ttf/eot
if it doesnt work on firefox its not worth doing. i mean firefox is ahead of the game they support the animated .pngs and ie dont
Reputation Points: 15
Solved Threads: 7
Posting Pro in Training
SKANK!!!!! is offline Offline
428 posts
since Apr 2009
Nov 13th, 2009
1
Re: CSS Text ttf/eot
local is the local pc font store, I think, from the web server, even a web server installed locally it requires a url
something like
css Syntax (Toggle Plain Text)
  1. @font-face {
  2. font-family: GraublauWeb;
  3. src: local("Lucida Grande"), url("fonts/GraublauWeb.otf")
  4. format ("opentype"); }
http://webfonts.info/ font-face browser support details on browser differences
Last edited by almostbob; Nov 13th, 2009 at 10:20 am.
Reputation Points: 562
Solved Threads: 369
Posting Maven
almostbob is offline Offline
2,970 posts
since Jan 2009
Nov 13th, 2009
0
Re: CSS Text ttf/eot
what are u supposed to do for ie that doesn support true type fonts then?
Reputation Points: 15
Solved Threads: 7
Posting Pro in Training
SKANK!!!!! is offline Offline
428 posts
since Apr 2009
Nov 13th, 2009
1
Re: CSS Text ttf/eot
sames as IE6/png, conditional css with eot fonts for IE
or wait till IE supports css3 properly (looks out window, watching for Hell to freeze over)
css Syntax (Toggle Plain Text)
  1. <!--[if IE]>
  2. @font-face { font-family: GraublauWeb;
  3. src: url("GraublauWeb.eot"); }
  4. <![endif]-->
http://webfonts.info/wiki/index.php?...ernet_Explorer
Last edited by almostbob; Nov 13th, 2009 at 12:14 pm.
Reputation Points: 562
Solved Threads: 369
Posting Maven
almostbob is offline Offline
2,970 posts
since Jan 2009
Nov 13th, 2009
0
Re: CSS Text ttf/eot
Click to Expand / Collapse  Quote originally posted by SKANK!!!!! ...
what are u supposed to do for ie that doesn support true type fonts then?

you can also translate them into .eot files that IE recognizes, and include the
HTML and CSS Syntax (Toggle Plain Text)
  1. src: local(XXXX.eot);
line within the originial @font-face.
Reputation Points: 10
Solved Threads: 1
Posting Whiz in Training
PDB1982 is offline Offline
204 posts
since Oct 2009
Nov 13th, 2009
0
Re: CSS Text ttf/eot
yeah son i dont rilly understand this its nothting i will be doing being that ive tried it before and it didnt work!
Reputation Points: 15
Solved Threads: 7
Posting Pro in Training
SKANK!!!!! is offline Offline
428 posts
since Apr 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: Rollover
Next Thread in HTML and CSS Forum Timeline: Moving Vertical Navigation





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC