Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f8cc0a3f00cb0e2da5ff71b7da5c00f6328133f0
https://github.com/WebKit/WebKit/commit/f8cc0a3f00cb0e2da5ff71b7da5c00f6328133f0
Author: Yulun Wu <[email protected]>
Date: 2025-02-12 (Wed, 12 Feb 2025)
Changed paths:
M
Source/WebCore/layout/formattingContexts/inline/InlineContentConstrainer.cpp
Log Message:
-----------
[text-wrap-mode] update raggedness function to independently weight
stretch/shrink.
https://bugs.webkit.org/show_bug.cgi?id=287489
<rdar://144622653>
Reviewed by Alan Baradlay.
The current implementation for raggedness uses the square of the difference
between
the ideal and candidate line width. Knuth-Plass offers a more sophisticated
raggedness
metric that allows for separate weights for text that is too long or too short
(stretchability vs shrinkability), and is an easy change that will give us more
control
over how text is laid out relative to our ideal width. This CL lands the full
implementation
in:
http://www.eprg.org/G53DOC/pdfs/knuth-plass-breaking.pdf
Additionally, textWrapPrettyStretchability and textWrapPrettyShrinkability are
needed
for the hyphenation algorithm definded in the paper which will be landed in a
follow
up PR.
Canonical link: https://commits.webkit.org/290286@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes