W3C home > Mailing lists > Public > www-style@w3.org > April 2010

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

From: Brad Kemper <brad.kemper@gmail.com>
Date: Fri, 30 Apr 2010 09:51:51 -0700
Cc: Bert Bos <bert@w3.org>, "<www-style@w3.org>" <www-style@w3.org>
Message-Id: <139F0423-E157-4A49-976E-AC7F9424B1AE@gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>

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 16:52:30 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:45 UTC