W3C home > Mailing lists > Public > www-style@w3.org > June 2007

Re: Proposal: font-size: auto

From: Windy Road <tom@windyroad.org>
Date: Tue, 12 Jun 2007 05:59:14 +1000
Message-ID: <746049190706111259o58d41c4fpb938be99941ce8ff@mail.gmail.com>
To: www-style@w3.org
On 11/06/07, Paul Nelson (ATC) <paulnel@winse.microsoft.com> wrote:
> Scaling the font to fit this way would be based on a lot of assumptions.
> Do you want to do this by the average character width, the widest character
> width, require a monospace font be used? In Arabic text you have contextual
> character shapes which means the same character, like the beh, would have an
> initial that is very narrow and a final form that is very wide. What about
> scripts like Devanagari or Tibetan that have clusters or stacks and don't
> necessarily lay out linearly.
> This type of computation would be *very* expensive and be more problematic
> for authors to know what to expect. For example, would one line have one
> size font and another line with other sets of characters be scaled to a
> different size to fit?

The proposal would be for the formula to be very simple.  Generally in the

  font-size = (width - padding-left - padding-right) / line-length

No more and no less complicated than that.

Paul, I'm not sure if you have been reading this thread so far, but the idea
is to have in CSS a way of achieving the effect demonstrated at:


The demonstration uses the formula above.


Tom Howard
Received on Monday, 11 June 2007 19:59:24 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:29 UTC