Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-13-2009, 02:05 PM   PM User | #1
Ibanez
New Coder

 
Ibanez's Avatar
 
Join Date: Nov 2008
Location: South Africa
Posts: 73
Thanks: 11
Thanked 0 Times in 0 Posts
Ibanez is an unknown quantity at this point
Using non-default fonts?

Hello all!

I know that one is supposed to use default font families, and I do, but in this case I really need to use american typewriter... I've searched forums everywhere for a possible answer but couldn't find anything that works...

There has to be a way for the css file to point to a font on the server (thus making it available for the user agent)?

Does anybody have any ideas or suggestions?
__________________
If your willing to teach, Im willing to learn...
Ibanez is offline   Reply With Quote
Old 05-13-2009, 02:10 PM   PM User | #2
dome90uk
New Coder

 
Join Date: Feb 2008
Posts: 64
Thanks: 3
Thanked 6 Times in 6 Posts
dome90uk is an unknown quantity at this point
Hi,

have a look at Cufon - a sIFR alternative
http://cameronmoll.com/archives/2009...ont_embedding/
dome90uk is offline   Reply With Quote
Old 05-13-2009, 03:10 PM   PM User | #3
knuckleball
New Coder

 
Join Date: Jul 2008
Posts: 17
Thanks: 3
Thanked 0 Times in 0 Posts
knuckleball is an unknown quantity at this point
The most popular way to do this is through sIFR, which uses Javascript and Flash to create a movie of the text you want in the font you need.

Here's a nice list of various ways you can achieve this, while waiting for CSS3 (which will include native support for non-standard fonts).

http://bigtweet.com/c/b/twitter/nourayehia/hpmR

EDIT: If you use sIFR, be sure to test it on your remote host. Testing it on my computer has yielded poor results.
knuckleball is offline   Reply With Quote
Old 05-13-2009, 03:31 PM   PM User | #4
brazenskies
Regular Coder

 
Join Date: May 2008
Location: Oxford, UK
Posts: 422
Thanks: 14
Thanked 27 Times in 27 Posts
brazenskies is on a distinguished road
make sure to consider SEO before using sIFR
brazenskies is offline   Reply With Quote
Old 05-14-2009, 08:09 AM   PM User | #5
Ibanez
New Coder

 
Ibanez's Avatar
 
Join Date: Nov 2008
Location: South Africa
Posts: 73
Thanks: 11
Thanked 0 Times in 0 Posts
Ibanez is an unknown quantity at this point
Thanks for the replies!

I want to try avoid using JS where possible...
And as brazenskies said it will affect the optimization of the site...

Maybe PHP...? Does anyone know how to achieve this? Maybe with an include or something..?
__________________
If your willing to teach, Im willing to learn...
Ibanez is offline   Reply With Quote
Old 05-14-2009, 11:16 AM   PM User | #6
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,705
Thanks: 5
Thanked 875 Times in 850 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Quote:
Originally Posted by Ibanez View Post
I want to try avoid using JS where possible...
And as brazenskies said it will affect the optimization of the site...
That should be pretty much nonsense. sIFR is completely unobtrusive and makes proper use of progressive enhancement (i. e. degrades gracefully). If somebody doesn’t have JS available plain text headlines will be shown. And this is also what search engine spiders will see. So, where does it affect SEO?

You know, JavaScript isn’t as bad as many people think it is. It just has a bad reputation because it has been misused in the past. But as I said if you write unobtrusive JS and follow the principle of progressive enhancement then there’s nothing that you have to fear.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 05-14-2009, 11:19 AM   PM User | #7
brazenskies
Regular Coder

 
Join Date: May 2008
Location: Oxford, UK
Posts: 422
Thanks: 14
Thanked 27 Times in 27 Posts
brazenskies is on a distinguished road
Quote:
Originally Posted by VIPStephan View Post
So, where does it affect SEO?
Quote:
sIFR, which uses Javascript and Flash to create a movie of the text you want in the font you need.
Is the text untouched in the source then?

Last edited by brazenskies; 05-14-2009 at 11:28 AM..
brazenskies is offline   Reply With Quote
Old 05-14-2009, 12:02 PM   PM User | #8
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,705
Thanks: 5
Thanked 875 Times in 850 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
sIFR is adding a class to each element whose text is supposed to be replaced (.sifr-active or .sifr-replaced or something like that). Through this class CSS is applied to hide the text and display the replaced text then. However, there is still plain HTML text in the headline that can be read by search engines.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 05-15-2009, 12:47 PM   PM User | #9
Ibanez
New Coder

 
Ibanez's Avatar
 
Join Date: Nov 2008
Location: South Africa
Posts: 73
Thanks: 11
Thanked 0 Times in 0 Posts
Ibanez is an unknown quantity at this point
Thanx Stephan!
Im not a genius with Js yet so I guess I tend to rely on what other tell me and that was to avoid JS because spiders dislike it...

I haven't gotten round to trying it yet, Im sure once I do Ill need some help tho...
__________________
If your willing to teach, Im willing to learn...
Ibanez is offline   Reply With Quote
Old 05-15-2009, 02:12 PM   PM User | #10
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,705
Thanks: 5
Thanked 875 Times in 850 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Quote:
Originally Posted by Ibanez View Post
Im not a genius with Js yet
Neither am I.

Quote:
Originally Posted by Ibanez View Post
I guess I tend to rely on what other tell me and that was to avoid JS because spiders dislike it...
It all depends on how you use it. You can generate HTML with JavaScript that would be there but not actually visible in the output source code. If you create a document completely with this method then of course search engine spiders won’t like it because they see nothing they can interpret (they read HTML and are for the most part not able to parse JavaScript – and HTML generated through JS for that matter).

The trick is to make use of progressive enhancement. That is, have plain, semantic HTML as base (which spiders will read) and then you can remove/alter the HTML with JS to enhance the document for human visitors – as long as you don’t generate crucial parts with JS (as described above).

And sIFR does make use of progressive enhancement. It takes plain text that was marked up the usual way earlier and changes it to apply the Flash object through JavaScript. Your original source code is still the same and that’s what search engine spiders read.

Disclaimer: In the meantime as technology is advancing there might actually be spiders that are more intelligent so always consult other sources to be 100% sure. I’m not the omniscient godfather of SEO.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:02 AM.


Advertisement
Log in to turn off these ads.