Re: Proposal: font-size: auto

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
form

  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:

  http://windyroad.org/static/resolution-independence/

The demonstration uses the formula above.

Cheers,

-- 
Tom Howard
http://windyroad.org

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