Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / August 2004



Tip: Looking for answers? Try searching our database.

Font selection and scaling in browsers

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michel Joly de Lotbiniere - 31 Aug 2004 04:18 GMT
I hope this is the correct newsgroup for this subject.

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. On my Windows 2000 PC, Terminal is a
bit-mapped font that comes in various fixed sizes.

The rendering differences between Mozilla 1.7.2 (which is my default
browser) and MS IE 6 (latest patches) are fully illustrated at
http://free.hostdepartment.com/m/mjdl/ (I didn't want to burden people
with attachments.) 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. But is there a correct choice
to be made between scaling the font and choosing the nearest size
substitute according to the standards? Is Mozilla choosing wrongly? My
vote goes to choosing the nearest real font in the case of bit-mapped
fonts, which should not be scaled, but this requires the browser's font
renderer to adopt different size choices for scalable and fixed-size
fonts. It's not clear to me what the standard requires.

Any ideas?

M.
jmm-list-gn - 31 Aug 2004 06:24 GMT
> 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. On my Windows 2000 PC, Terminal is a
> bit-mapped font that comes in various fixed sizes.

  It was a poor choice by the designer to use a os-specific font and to
not specify a default. "Monospace" works everywhere.
  The SafeSquid folk also don't want anyone to read the content; it's way
too small. :-(

> [..] 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. [...]

  Mozilla assumes all fonts are scalable. (Bitmapped fonts were a good
idea back in the day of 33 MHz CPUs.) Being a multi-os browser it must
make choices that seem less-than-perfect in some cases. IE uses its
Windows-only awareness to include the quirks of Windows bitmapped fonts.

Signature

jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)

M. - 31 Aug 2004 07:53 GMT
>   It was a poor choice by the designer to use a os-specific font and to
> not specify a default. "Monospace" works everywhere.
Yes, I should have made that clear in my post; I did at the URL with the
screenshots.

M.
Jukka K. Korpela - 31 Aug 2004 08:01 GMT
> 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">&nbsp;&nbsp;&nbsp;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...

> 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.

> 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).

Signature

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

M. - 01 Sep 2004 00:01 GMT
Jukka, thanks for the detailed discussion.

M.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.