- From: Brady Duga <duga@google.com>
- Date: Mon, 6 Jan 2014 14:25:31 -0800
- To: Alan Stearns <stearns@adobe.com>
- Cc: "Cramer, Dave" <Dave.Cramer@hbgusa.com>, "public-digipub-ig@w3.org" <public-digipub-ig@w3.org>
- Message-ID: <CAH_p_eVpO4ybe7jxWOhbrQ98LBXzyAZhLzF7GVHJRNdmGsU9BA@mail.gmail.com>
Yes, that is an interesting edge case that does exist today (hadn't considered it). Apparently, it is very difficult to handle even with lousy line breaking algorithms. See attached images from Chrome, Safari and Firefox :) On Mon, Jan 6, 2014 at 2:12 PM, Alan Stearns <stearns@adobe.com> wrote: > Sorry, I had my example turned around in my head. The situation that > already exists is actually narrowing lines. > > Take some content with two left floats where the first is 50px wide and > the second is 100px wide. Either the second float clears the first > explicitly or the container isn’t wide enough to stack them. Then a line > box at the end of the 50px float could have a taller span added where the > line-height then extended past the edge of the 50px float and intrudes > into the 100px float. In that case the line length narrows when > considering whether to add the tall span to the end of a line. > > On 1/6/14, 2:00 PM, "Brady Duga" <duga@google.com> wrote: > > >Generally yes. I don't think the line itself can clear the float, since > >the height of the line will be the tallest height it contains (barring > >line-height settings). So, even though the small text might clear the > >float the line will still wrap. > > At least, that has been my experience. Since that is based on the start > >edge of the line which shouldn't change with line height, the line won't > >change width based on height. > > > > > >On Mon, Jan 6, 2014 at 1:43 PM, Alan Stearns > ><stearns@adobe.com> wrote: > > > >On 1/6/14, 1:16 PM, "Brady Duga" <duga@google.com> wrote: > > > >>One vaguely interesting top-level comment that ties in with digipub is > >>the difficulty in applying reasonable line break algorithms (eg something > >>better than first-fit or best-fit) to text whose line length (physical > >>width of the line) can change > >> based on line height. So, cases where a span that makes the line taller > >>could cause the line to become narrower based on a complex floated shape > >>from a previous line. I am not sure what there is to do about this, and > >>may just become a footnote (assuming we > >> decide there is a place for such things in digital publishing!) of any > >>spec that addresses line breaking/justification/hyphenation. > > > > > >We already have the situation with floats where adding a taller span can > >cause a line to clear a float and become wider. Is narrowing the line any > >more difficult to manage? > > > >Thanks, > > > >Alan > > > > > > > > > > > > > >
Attachments
- image/png attachment: chrome.png
- image/png attachment: firefox.png
- image/png attachment: safari.png
Received on Monday, 6 January 2014 22:25:59 UTC