Thank you Alan for the feedback.

On Fri, Jun 23, 2023 at 6:05 AM Alan Stearns <famuli...@gmail.com> wrote:

> As one of the spec authors, I support the intent to ship the
> text-wrap:pretty value.
>

Thank you, glad to hear your support ;-)


> But I think we should be careful to avoid associating this value with
> *only* avoiding single-word last lines in a paragraph. Avoiding short
> last lines is *one* thing an engine can do with a more elaborate
> line-breaking algorithm. The intent of the value is to allow more
> experimentation in this space to eventually get more consistent line breaks
> and spacing overall. So while I am perfectly happy with this first step to
> avoid single-word last lines with a four-line window evaluation, we should
> be clear that future improvements are also welcome (like fixing a short
> last line with more than one word, or evaluating more than four lines in
> the paragraph to find a better solution).
>

You're right, thank you for clarifying this. I should have clarified better
that this is just an initial implementation, and I expect it to do more as
you pointed out. The design doc
<https://docs.google.com/document/d/1jJFD8nAUuiUX6ArFZQqQo8yTsvg8IuAq7oFrNQxPeqI/edit?usp=sharing>
mentions it but sorry, I didn't include it in this Intent.


> We will also need to be clear that this value will not always *guarantee*
> that paragraphs will never end with a single-word line. There will always
> be degenerate cases where there is no improved score that can fix the last
> line. A toy example is:
> [snip]
> which is not a improvement (and should show up as worse in any score-based
> evaluation of the paragraph)
>

Again, thank you for pointing this out too. The current implementation is
done by adjusting penalties, not by forbidding the breaks, so there are
cases where it ends up with typopgraphic orphans depending on penalties and
scores in other parts of the paragraph. The current penalties are
determined from our testing, but we may adjust them further by future
feedback. If it turns out that automatic heuristic penalties can't suffice
all cases, I look forward to discussing at the WG how authors can control
them.

>

-- 
You received this message because you are subscribed to the Google Groups 
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to blink-dev+unsubscr...@chromium.org.
To view this discussion on the web visit 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAHe_1dK9yFg4MuJcn9pm8S_wWT1SDOqXB_oXVnwmMTXUGz2%3DYA%40mail.gmail.com.

Reply via email to