views:

169

answers:

4

I am building a page, and when it is viewed in IE (all versions) the entire text is stuck on times new roman. Here is my CSS:

body{
    color:#222222;
    margin:0 auto;
    background-color:#000;
    font-family: "Tw Cen MT","Gill Sans","Century Gothic";
}

In Safari and Firefox, the Tw Cen MT is displayed great, but in IE Times New roman is displayed. Any way I can fix that?

A: 

You could try removing the apostrophes. Also make sure the font name is written exactly as you see it in the fonts folder.

But anyway, it is not a good idea to deviate from the standard fonts. It will not display on other people's computers who do not have the font installed, and fall back to Times New Roman.

The best way is to put headings and small paragraphs into graphics, preferably as GIF or PNG.

The only halfway robust way to have at least parts of your content rendered in your own font is siFR.

Pekka
putting any form of content into graphics is a terrible terrible idea.
nickf
There is hardly a better way except for complicated solutions like siFR, is there? The compatibility of a plain image is unbeaten. It works on all platforms, while flash does not.
Pekka
Yep, it'll be compatible, except for when it's not, eg: web spiders won't read it, screen readers won't read it, text-based browsers won't read it.
nickf
+2  A: 

Check for the setting to have the fonts and colors you specify in Internet Explorer to be used for all websites, regardless of the fonts that have been set by the website designer.

In IE, click the Tools / Internet Options.

  • On the GENERAL tab, click the ACCESSIBILITY button
  • Are Ignore font styles specified on webpages, and Ignore font sizes specified on webpages check boxes checked?

This can be set on an individual computer or a domain level setting pushed out by administrators as a GPO. It will then behave the same way no matter what computer you test on.

Raj More
+1: this problem is undoubtely a faulty IE config setting.
BalusC
...though you'd hope the submitter had tested on more than one computer already...
da5id
@da5id: answer edited for comments.
Raj More
A: 

Is it possible that computer which has IE does not have all these fonts installed?

nimbupani
You could try testing this by adding adding Sans-Serif to the end of your font list.font-family: "Tw Cen MT","Gill Sans","Century Gothic", Sans-Serif;
Bertine
A: 

Unfortunately, you're stuck with a very limited number of fonts that will appear reliably across all platforms and browsers. You're just asking for trouble by using others like you have.

Check out this page for a nice overview of what's available to you.

Embedding fonts is still a ways (1-2 years?) from being reliable.

carillonator