Felix Miata wrote:

> On 2009/01/04 00:54 (GMT) Thom Brown composed:
>
>> I've applied the following to a paragraph and notice that while it
>> correctly applies in Firefox, it won't apply any size changes in
>> IE7/8.

My observations are different. This may depend on the platform. (I'm using 
Vista.)

>> font-family: Courier;
>> font-size: 0.8em;
>
>> I've tried using a font-size of 0.4em and 0.2em, which shows changes
>> in Firefox but not IE.  If I use Courier New as the font it works
>> fine. It does seem to apply changes if it's above 1em though.

Well, then "won't apply any size changes" was not correct, was it? But on my 
IE 7, font size changes take place for 0.8em, too. There's surely something 
odd (in addition to Courier being an odd font, that is). If I don't set body 
font size, the change is visible. If I set it to 10pt, there is no change in 
font size even in a drastic case like
T<a style="font-size:0.4em">T</a>
but if I use the IE 7 zoom function, zooming e.g. to 400%, the change 
becomes visible and roughly as expected.

Actually, on Firefox 3, the behavior seems to be the same. My conjecture is 
that there is a lower limit for physical (actual) font size for Courier, 
independently of browser settings. Something like 10pt, it seems. To me, 
this makes sense, since Courier is difficult to read in that size, and going 
below that would be rather absurd.

> I'm not sure how Firefox is able to do it unless at the smaller sizes
> it's substituting Courier New or whatever its prefs are set to for
> monospace. What are SeaMonkey, Opera & Safari doing?

A browser could algorithmically scale the characters down. That would give 
poor results, but it's _possible_. Opera seems to behave the same way as IE 
and Firefox, whereas Google Chrome really scales down... but the results 
look the same as using Courier New, and it apparently just reads Courier as 
Courier New.

> Courier on Windows is a bitmap font available in a very limited
> selection of sizes.

It's apparently better to use other monospace fonts. The choice between them 
is largely a matter of taste, but it is important to consider how well the 
monospace font lives along with the copy text font, especially when used 
inline. For example, mixing a sans-serif font like Arial with a serifed 
monospace like Courier New does not look good.

Moreover, especially if you use the so-called C fonts as the primary font 
suggestion, beware that browsers typically use something like font-size: 90% 
for elements they render in monospace font by default. This is probably 
supposed to help with bulks of text in monospace font, like program 
listings, but it tends to become a problem for inline monospace text: it 
looks too small as compared with surrounding text.

Consider e.g. text like
The <code>print</code> command.
It looks bad in many combinations but rather harmonic if you set
body { font-family: Cambria; }
code { font-family: Consolas; }
code { font-size: 100%; }

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/ 

______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to