Fw: Re: Suggestion: A new text attribute to scale the size of text to follow the size of a box

I agree it would be odd to have some text in one size, and some in another. Font-size: fit; should be allowed to be used on any text. We're straying into usability. In some cases, it may be bad usability, but in most, auto scaling text is a good thing to have. It could also be used to fill a 200px by 200px div with justfied text, for example.

To add on to Tab's suggestions, I think this would be useful for article display, h1 display (think blog), and possibly for text boxes. Where the text auto scales to fit the text box, without scrolling. Or until it hits the maximum number of haracters in lets say a text-overflow property, applicable to input boxes only.

Anyway, a bit off topic, but just throwing in some usability and real life examples, at least, where i'd use it.



--
Adam Del Vecchio (Mobile)
President - Techo TechnologyOn 30 Apr 2010 12:53 p.m., Brad Kemper <brad.kemper@gmail.com> wrote: 



On Apr 30, 2010, at 8:52 AM, Tab Atkins Jr. wrote:



> On Fri, Apr 30, 2010 at 7:17 AM, Bert Bos <bert@w3.org> wrote:

>> Another is to minimize the number of lines, i.e., rather make the text a

>> bit smaller (up to the minimum font size) than add extra line breaks.

> 

> Alternately, forget about scaling text down at all.  Just do linebreak

> calculations like normal, then always scale up to make it fit.

> 

> We'd actually still have to do some downscaling in the case that an

> unwrappable portion is too long, but we could always prefer scaling up

> to fit first.

> 

> I think this would address the use-case of newspaper headlines in

> narrow columns.  You just set a reasonable font-size, and then things

> automatically grow slightly when necessary.



I like this idea. It works more like how regular justification works. And if you want a particular line in larger type, you can add a line break (or span with a bigger font-size).



>> Based on that last option, we considered allowing automatic font sizes

>> *only* on the last line of a block of text, where last line is every

>> line before a forced line break. Hence the keyword 'size' on

>> the 'text-align-last' property. (In the most recent draft, that keyword

>> was again dropped, because of these open issues.)

> 

> This would be acceptable to me if we can't come up with anything else.



I think that would be very strange, typographically, to have several lines in one size and then a huge last line if its a two letter word or nearly the same size if it is nearly a full width line anyway. I don't think it is elegant to say that a line in the middle is a last line because of a BR. That seems rather hackish.





> I think, though, that the only real use-cases are:

> 

> 1) newspaper headlines

> 2) movie posters

> 3) last lines of paragraphs

> 4) single lines of text



For single lines of text, I would prefer something like 'font-size:fit'. The terms better represents the intent of the author. 



If you are going to be manually inserting line breaks (#1 & #2), then 'font-size:fit' and text-align:justify' and 'text-align-last:justify' would do it, without a new property. #3 is just plain weird, IMO.

Received on Friday, 30 April 2010 17:38:45 UTC