Michel Joly de Lotbiniere <dont (AT) spam (DOT) us> wrote:
Quote:
The other day I came across a site www.safesquid.com that specified
font-family:Terminal font-size:9pt in the inline css for command-line
displays in the page content. |
I don't know what you specifically mean - the site is confused,
usability-hostile and accessibility-hostile and has some broken
JavaScript too - but on page
http://www.safesquid.com/html/server_side.shtml
I find something that resembles closely enough to your description:
<span style="font-family:Terminal; font-size:8pt;
color:#000000"> iptables -t nat ...
It would logically call for <code> markup, perhaps inside <pre>, and
little else - there's no point in trying to make it appear in a
particular monospace font, still less at a specific size in points.
In a word, it's completely clueless use of CSS - and proves that people
can do much more damage using CSS than using <font> markup.
What browsers _should_ do, theoretically, is less interesting in
practice, but we _are_ a theoretical group too, at times...
Quote:
Mozilla seems to scale the bitmap font into
an illegible mess, while MS IE simply chooses the nearest available
size (10pt) and thus displays the text legibly. |
Those are two approaches in implementations. Anyone who thinks he knows
that the latter approach is (more) correct should think what a browser
should do with font-size: 1px - which is virtually always an attempt to
make text virtually invisible.
Quote:
But is there a
correct choice to be made between scaling the font and choosing the
nearest size substitute according to the standards? |
Yes, both are correct. The specifications do not mandate a particular
behavior in this respect. There's no prohibition against scaling a font,
even in cases where it results in poor appearance.
As a quality of implementation issue, we cannot really know in general
which of the settings (font-family and font-size) is more important for
the purposes of the author of the style sheet. Or authors of the style
sheets, since the same problem arises when e.g. author style sheet
specifies font-family and user style sheet specified font-size, for
example. It might even be argued that pragmatically a browser should
ignore _both_ if there is a gross mismatch (e.g., style sheets ask for
Terminal in 48pt size).
--
Yucca,
http://www.cs.tut.fi/~jkorpela/