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

Re: [css3-text] wrapping text while keeping line lengths balanced

From: Glenn Maynard <glenn@zewt.org>
Date: Fri, 20 Apr 2012 18:50:05 -0500
Message-ID: <CABirCh_YdixSa=zWd24VX5MM=xVYAv=VrT=o-kbysecxz_vZbA@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: www-style@w3.org
On Fri, Apr 20, 2012 at 6:09 PM, fantasai <fantasai.lists@inkedblade.net>wrote:

> IIRC there was previously a proposal for a 'last-line-length' or some
> such property, which would set a minimum length to fill for the last
> line. (Other lines are considered to be 100%.) This would handle your
> use case: you'd set it to 100%.
> The problem is this would require a line-breaking algorithm that does
> full-paragraph line balancing, and no one has stepped forward to say
> they want to implement that. And so I have not bothered to spec that.

FYI: the simpler approach I suggested on the WebVTT list is to find the
narrowest width that doesn't result in more lines than the ordinary
wrapping algorithm.  That can be done in linear time, and seems to give
decent results.  https://zewt.org/~glenn/balanced-wrapping.html shows the

Glenn Maynard
Received on Friday, 20 April 2012 23:50:38 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:13 UTC