...

View Full Version : Using non-default fonts?



Ibanez
05-13-2009, 02:05 PM
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?

dome90uk
05-13-2009, 02:10 PM
Hi,

have a look at Cufon - a sIFR alternative
http://cameronmoll.com/archives/2009/03/cufon_font_embedding/

knuckleball
05-13-2009, 03:10 PM
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.

brazenskies
05-13-2009, 03:31 PM
make sure to consider SEO before using sIFR

Ibanez
05-14-2009, 08:09 AM
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..?

VIPStephan
05-14-2009, 11:16 AM
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 (http://en.wikipedia.org/wiki/Unobtrusive_JavaScript) and makes proper use of progressive enhancement (http://en.wikipedia.org/wiki/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.

brazenskies
05-14-2009, 11:19 AM
So, where does it affect SEO?


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?

VIPStephan
05-14-2009, 12:02 PM
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.

Ibanez
05-15-2009, 12:47 PM
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...

VIPStephan
05-15-2009, 02:12 PM
Im not a genius with Js yet

Neither am I. :)


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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum