Re: Problems w/Font Size

At 20:18 -0500 7.9.97, Jordan Reiter wrote:
> I have a real problem when using font sizes with stylesheets.  My
> problem is this: the incredible discrepancy in sizes between Macs and PCs,
> IE and Netscape.  IF I specify specific font-sizes, then I have a problem
> with legibility between the Mac/Windows platforms.

Mwah-ha-ha-ha-hah! <g>

The problem is not so much in specifying sizes, but in specifying them in
point (pt) units. As you have observed, "8-point" type is dangerously
variable across platforms for screen display. The pixel unit (px) is more
consistent, but those readers with sub-par eyesight, or whose displays have
a relatively high pixel density (resolution/display size) will curse you
for binding type size to pixels this way. It's a failing proposition
anyway, because Nav 4 and IE 4 don't always rasterize even pixel-spec'd
type identically! (Navigator gets it wrong on Windows, right on Mac.)

The CSS1 Recommendation introduces the concept of a "virtual pixel",
defined not as the smallest dot any display can produce, but as the degree
of visual angle formed at arm's length by such a dot on a display whose
physical resolution is 90 ppi. Browsers ("user agents") are supposed to
scale pixels as necessary if the actual pixel density is "significantly"
different, without saying more. Already Navigator has departed from this
recommendation by scaling pixels for print assuming a display of 120 ppi.

Your choices are, IMO:

a. The Standards-Will-Save-Us Stance: Wait for near-universal deployment of
CSS implementations so complete as to permit size specification/DOM queries
of ALL elements (text, images, objects, form elements, frames, windows) in
relative units like ems and percentages, where 1 em is the user's preferred
(point?) size which s/he specifies in hir personal stylesheet on body.

b. The OS's-Will-Save-Us Stance: Wait for near-universal deployment of
operating systems whose displays are true WYSIWYG (72 points = 2.54 cm)
regardless of pixel density, though perhaps adjusted for reading distance,
visual impairment, etc. Part of user settings, like network password.

c. The Pixel-Designer Stance: Write off those whose displays or eyesight
are very different from yours. Make GIFs of all size-critical text. Make
decisions about performance issues after you've got everything in your

d. The Web-Purist Stance: Don't specify sizes on anything. Don't attempt to
correlate image or object sizes to text sizes. Pretend that users, "user
agents" or the programmers of said agents, will make the necessary
adjustments to render your documents readable, if not attractive (as if the
two were unrelated).

e. The Pragmatist/Mercenary Stance. Use browser/platform detect scripts to
serve separate stylesheets to all the CSS implementations/platforms you
know something about. For the rest, serve unstyled markup and resign
yourself to stance d). Or if you're working for hire, mix in just enough of
stance c) as required to please the client. See .

> If I specify a
> font-size of 8pt on the PC, it looks fine on the PC but unreadable on the
> Mac.  However, if I use  words instead (ie, x-small, small, medium, etc.),
> then the size differences between Netscape and Internet Explorer come to
> the surface.

Have you "zeroed out" the browsers, setting the default size/face the same
before concluding that they produce different results? Note that across
platforms, the "12-point" factory setting is a cause of much trouble here.

> Can anyone figure out a way, short of Javascript (UGH!) to define font
> sizes so that they are readable on both Mac and PC platforms and on
> Netscape and IE?

If you don't like Javascript, there's Jscript, ECMAscript, or VBScript -
the syntax for a simple detect and write-line is the same, I believe, so
you needn't declare your religion. Or you can go server-side and use PERL
or what have you.

If there's another way, I'd truly love to hear it!

Todd Fahrner

Received on Sunday, 7 September 1997 23:20:31 UTC