CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 4th, 2003, 08:57 PM
jsKid's Avatar
jsKid jsKid is offline
Application is what Divides Us
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Dec 2002
Location: Titusville, FL
Posts: 2,144 jsKid User rank is Sergeant Major (2000 - 5000 Reputation Level)jsKid User rank is Sergeant Major (2000 - 5000 Reputation Level)jsKid User rank is Sergeant Major (2000 - 5000 Reputation Level)jsKid User rank is Sergeant Major (2000 - 5000 Reputation Level)jsKid User rank is Sergeant Major (2000 - 5000 Reputation Level)jsKid User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 2 Weeks 2 Days 3 h 33 m 42 sec
Reputation Power: 51
Send a message via AIM to jsKid Send a message via MSN to jsKid
MySpace
css font-face...

if i set up a style like the following...
PHP Code:
<style...>
.
subhead font-facethefontname; }
</
style>

<
font face="thefontname" size="+1">example text</font

and thefontname was in a directory on my website, would would I access that font to place in the style tags to apply to my site if the visitor does not have the font?
__________________
Download [ Fx | Op ] Validate [ Markup | Css ]

Reply With Quote
  #2  
Old December 4th, 2003, 09:05 PM
MJEggertson MJEggertson is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2002
Location: Seattle WA
Posts: 863 MJEggertson User rank is Corporal (100 - 500 Reputation Level)MJEggertson User rank is Corporal (100 - 500 Reputation Level)MJEggertson User rank is Corporal (100 - 500 Reputation Level)MJEggertson User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 22 sec
Reputation Power: 8
You got a few things wrong there...

When working with styles, you can set the font-family property. This is a comma seperated list of fonts or families you want. The first valid one is kept. Generally, you go from most specific, to most generic. So, you could have something like this:
Code:
<style type="text/css">
.subhead {
  font-family: SomeObscureFont, Helvetica, Arial, sans-serif;
}
</style>

What I've done is created a class (defined by the period) called 'subhead'. Any element with that class will use the specified font. If the font, 'SomeObscureFont' can not be found, it will look for 'Helvetica'. If not, it looks for 'Arial'. Finally is the 'sans-serif' which is not a font name, but a font family (of which Helvetica and Arial are members of). If none of the specific fonts can be found, the element will be rendered in whatever sans-serif type font the system has set as default.

To use the style, you need to assign the class to an object. We can even drop the <font> tags entirely, since they're depreciated. You can assign a class to any element, from a <p>, to a <div>, to a <td>, or anything else.

Applying the font to a paragraph is as simple as:
Code:
<p class="subhead">example text</p>

Last edited by MJEggertson : December 4th, 2003 at 09:18 PM.

Reply With Quote
  #3  
Old December 5th, 2003, 01:42 PM
jsKid's Avatar
jsKid jsKid is offline
Application is what Divides Us
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Dec 2002
Location: Titusville, FL
Posts: 2,144 jsKid User rank is Sergeant Major (2000 - 5000 Reputation Level)jsKid User rank is Sergeant Major (2000 - 5000 Reputation Level)jsKid User rank is Sergeant Major (2000 - 5000 Reputation Level)jsKid User rank is Sergeant Major (2000 - 5000 Reputation Level)jsKid User rank is Sergeant Major (2000 - 5000 Reputation Level)jsKid User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 2 Weeks 2 Days 3 h 33 m 42 sec
Reputation Power: 51
Send a message via AIM to jsKid Send a message via MSN to jsKid
MySpace
so...

even with CSS I would be unable to use a font on my site effectively unless the visitor has that font as well?

even so.. thanks

Reply With Quote
  #4  
Old December 5th, 2003, 04:43 PM
khwang's Avatar
khwang khwang is offline
Über nübe
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Babylon 4
Posts: 240 khwang User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 27 sec
Reputation Power: 5
Is this what you're looking for?

Code:
<style>
@font-face { font-family: "Nueva Roman"; src: url(NUEVAR1.eot)}
</style>
__________________
Hello, old friend...

Reply With Quote
  #5  
Old December 5th, 2003, 11:59 PM
Visarts Visarts is offline
El Pollo Loco
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Middle Earth
Posts: 29 Visarts User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
The font import function is almost entirely unsupported right now.

Reply With Quote
  #6  
Old December 6th, 2003, 05:07 AM
Akh's Avatar
Akh Akh is offline
|<.+#f@#+.&.|
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2002
Location: norway
Posts: 2,620 Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 6 Days 1 h 17 m 41 sec
Reputation Power: 532
yup,
and it has been removed in css2.1
http://www.w3.org/TR/CSS21/changes.html#q23

Reply With Quote
  #7  
Old December 6th, 2003, 05:47 PM
jsKid's Avatar
jsKid jsKid is offline
Application is what Divides Us
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Dec 2002
Location: Titusville, FL
Posts: 2,144 jsKid User rank is Sergeant Major (2000 - 5000 Reputation Level)jsKid User rank is Sergeant Major (2000 - 5000 Reputation Level)jsKid User rank is Sergeant Major (2000 - 5000 Reputation Level)jsKid User rank is Sergeant Major (2000 - 5000 Reputation Level)jsKid User rank is Sergeant Major (2000 - 5000 Reputation Level)jsKid User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 2 Weeks 2 Days 3 h 33 m 42 sec
Reputation Power: 51
Send a message via AIM to jsKid Send a message via MSN to jsKid
MySpace
okay...

so pretty much using the default settings would work the best... okay.. thanks again everyone

Reply With Quote
  #8  
Old December 6th, 2003, 08:02 PM
mhammadd mhammadd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 35 mhammadd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 46 m 9 sec
Reputation Power: 5
font

hi jskid,
i can see that know one got what you mean't, well here is the piece of advice you're looking for.

No you can't use a font that the visitor doesn't have installed on his pc.
So even if you have the font on your web directory, it won't help, the only difference it makes is on your pc. You would see the fonts as it is because you have the font installed.

there are two ways round this problem.

1. If the font you want to use is just for headers on your page, then try to make a gif image containing the text and use it on your site.
2. If you need to use this font for the entire content, then the only thing you have to do, is make a script that tells the visitor that you are using a special type of font and for them to view the page as it is supposed to be they should have the font installed. If they want to download it, then they'll have to click ok and the font would be downloaded on to there pc, but they should in turn install the font.

http://www.templatearchives.com

Reply With Quote
  #9  
Old December 6th, 2003, 08:42 PM
jsKid's Avatar
jsKid jsKid is offline
Application is what Divides Us
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Dec 2002
Location: Titusville, FL
Posts: 2,144 jsKid User rank is Sergeant Major (2000 - 5000 Reputation Level)jsKid User rank is Sergeant Major (2000 - 5000 Reputation Level)jsKid User rank is Sergeant Major (2000 - 5000 Reputation Level)jsKid User rank is Sergeant Major (2000 - 5000 Reputation Level)jsKid User rank is Sergeant Major (2000 - 5000 Reputation Level)jsKid User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 2 Weeks 2 Days 3 h 33 m 42 sec
Reputation Power: 51
Send a message via AIM to jsKid Send a message via MSN to jsKid
MySpace
thanks...

i too was unsure if anyone really understood my question at first, but eventually as the forum always does, it did..

thank you for your input though... i already have imaegs as header/footer for my page, although that leads to too many images on a page make slow loading for visitors, and less page views for the impatient ones (which I'm sure is everyone)..

i think that I will only use images for logos etc... special paragraph heads.. and the such, for my sites will have pics on them, so the extra pics will only slow the process more, unless somebody here can point me towards "preloaded images" if possible...

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > css font-face...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway