RE: Proposal: font-size: auto

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?
 
I would not be favorable for this type of definition.
 
Paul

________________________________

From: www-style-request@w3.org on behalf of Windy Road
Sent: Mon 6/11/2007 8:17 PM
To: www-style@w3.org
Subject: Re: Proposal: font-size: auto


Hi,

I mentioned the proposal on the webkit-dev mailing list and there was similar confusion about meaning/purpose of "font-size: auto".  Instead, what do you think about  adding a new property  "line-length". 

"line-length" could be used to specify the number of characters to display for each line of the element, scaling the font to fit the line length within the padded width of the element.

For example. 

some-element {
  line-length: 25em;
  width: 500px;
  padding: 0px;
}

This would result in a font-size of 20px.

some-element {
  line-length: 50em;
  width: 500px;
  padding: 0px;
}

would result in a font-size of 10px;

some-element {
  line-length: 25em;
  width: 100%;
  padding: 0px;
}

would result in a font-size that adjusts automatically according to the width of the element.

In cases where both the font-size and line-length is specified, the font-size would be ignored.

Thoughts?

Cheers,

-- 
Tom Howard
http://windyroad.org <http://windyroad.org/>  

Received on Monday, 11 June 2007 12:38:38 UTC