Webmaster Forum


Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 08-04-2012, 10:18 AM
stormshadow's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 06-03-11
Posts: 57
iTrader: 0 / 0%
CSS @font-face property

After searching the web for methods to use fonts that I have downloaded from the internet and converted to the appropriate web formats (ie:.eot,ttf, svg) I wanted to learn how to make sure that the fonts that I have converted and saved to my web folder show up when other people view my website. So I followed some website tutorials on this and looked at some other website code and this is what I did
Code:
@font-face { font-family: 'QuicksandBook'; src: url('../css/fonts/quicksand_book/quicksand_book-webfont.eot'); src: url('../css/fonts/quicksand_book/quicksand_book-webfont.eot?iefix') format('eot'), url('../css/fonts/quicksand_book/quicksand_book-webfont.woff') format('woff'), url('../css/fonts/quicksand_book/quicksand_book-webfont.ttf' format('truetype'), url('../css/fonts/quicksand_book/quicksand_book-webfont.svg#webfontZam02nTh') format('svg'); font-weight: normal; font-style: normal; } @font-face { font-family: 'Museo300'; src: url('../css/fonts/museo_300/Museo300-Regular-webfont.eot'); src: url('../css/fonts/museo_300/Museo300-Regular-webfont.eot?iefix') format('eot'), url('../css/fonts/museo_300/Museo300-Regular-webfont.woff') format('woff'), url('../css/fonts/museo_300/Museo300-Regular-webfont.ttf') format('truetype'), url('../css/fonts/museo_300/Museo300-Regular-webfont.svg#webfontZam02nTh') format('svg'); font-weight: normal; font-style: normal; } @font-face { font-family: 'Titilliumtext22l003'; src: url('../css/fonts/titilliumtext22l003/titilliumtext22l003-webfont.eot'); src: url('../css/fonts/titilliumtext22l003/titilliumtext22l003-webfont.eot?iefix') format('eot'), url('../css/fonts/titilliumtext22l003/titilliumtext22l003-webfont.woff') format('woff'), url('../css/fonts/titilliumtext22l003/titilliumtext22l003-webfont.ttf') format('truetype'), url('../css/fonts/titilliumtext22l003/titilliumtext22l003-webfont.svg#webfontZam02nTh') format('svg'); font-weight: normal; font-style: normal; }
After all of this, it still did not work and I do not know If there is a way I am calling the font wrong in the CSS but I have all the right formats and followed instructions from sites like this http://blog.themeforest.net/tutorial...-face-support/ and still did not get the right result.

When I used the fonts, I would do something like this for the Titilliumtext22l003 font
Code:
h1.logo {"Tililliumtext22l003", "titilliumtext22l003", Helvetica, Arial, sans-serif; color:#000000;
 
Reply With Quote
  #2 (permalink)  
Old 08-05-2012, 05:41 AM
Super Moderator
Latest Blog:
None

 
Join Date: 11-11-11
Location: Copenhagen, Denmark
Posts: 1,730
iTrader: 0 / 0%
You forgot "font-family:" in the css code:
Quote:
h1.logo {font-family: "Tililliumtext221003", "titilliumtext221003", Helvetica, Arial, sans-serif; color:#000000;
I'm not sure that it's a good idea to use a pipe character in the font-family name or filename.
__________________
Need a break? EnterCave more than 40000 online games in 15 categories.
Search or browse through EnterCave Online Games Directory
 
Reply With Quote
  #3 (permalink)  
Old 08-05-2012, 06:22 AM
stormshadow's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 06-03-11
Posts: 57
iTrader: 0 / 0%
Those are not piping characters but 1's and l's, are you sure that is all that I need to do? I keep getting this feeling that my sources are written wrong especially if I wanted it to work flawlessly with other browsers, I saw something developed by Paul Irish called the bulletproof method...but I do not know how to implement it here which is part of the issue. Any help there?
 
Reply With Quote
  #4 (permalink)  
Old 08-05-2012, 07:03 AM
Super Moderator
Latest Blog:
None

 
Join Date: 11-11-11
Location: Copenhagen, Denmark
Posts: 1,730
iTrader: 0 / 0%
Only two things come to mind:
- I have never heard of an ie fix requiring "?iefix", on the other hand i don't really see it as a problem, since it shouldn't prevent downloading the font.
- Looking at http://www.w3.org/TR/css3-fonts/#src-desc i couldn't find format("eot"), maybe you where thinking about format("embedded-opentype").
__________________
Need a break? EnterCave more than 40000 online games in 15 categories.
Search or browse through EnterCave Online Games Directory
 
Reply With Quote
  #5 (permalink)  
Old 08-05-2012, 07:57 AM
stormshadow's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 06-03-11
Posts: 57
iTrader: 0 / 0%
Thank you, that W3c reference will help a lot for me to make the proper edits.
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply

Tags
css font, css3, font, font-face, html


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Free: 25 Fancy Free Fonts "CSS3" @Font-Face Snerdey The Webmaster Marketplace 0 11-18-2010 03:33 AM
@font-face not working Ipad/Iphone safari, good safari mobile emulator? PChuprina Coding Forum 1 10-25-2010 03:16 PM
V7N Font dinzo Graphic Design Forum 4 06-29-2010 05:33 PM
Font help euniceface Graphic Design Forum 2 01-11-2008 08:17 PM
Logo font/image font Pimpen 2010 Web Design Lobby 6 06-29-2004 01:00 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 01:22 PM.
Powered by vBulletin
Copyright © 2000-2013 Jelsoft Enterprises Limited.
Copyright © 2003 - 2013 Escalate Media LP




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.