HighDots Forums  

Font selection and scaling in browsers

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Font selection and scaling in browsers in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Michel Joly de Lotbiniere
 
Posts: n/a

Default Font selection and scaling in browsers - 08-30-2004 , 10:18 PM






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.

Reply With Quote
  #2  
Old   
jmm-list-gn
 
Posts: n/a

Default Re: Font selection and scaling in browsers - 08-31-2004 , 12:24 AM






Michel Joly de Lotbiniere 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. 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. :-(

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

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.

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


Reply With Quote
  #3  
Old   
M.
 
Posts: n/a

Default Re: Font selection and scaling in browsers - 08-31-2004 , 01:53 AM



jmm-list-gn wrote:

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


Reply With Quote
  #4  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: Font selection and scaling in browsers - 08-31-2004 , 02:01 AM



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

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/


Reply With Quote
  #5  
Old   
M.
 
Posts: n/a

Default Re: Font selection and scaling in browsers - 08-31-2004 , 06:01 PM



Jukka, thanks for the detailed discussion.

M.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.