084fa1b52f
Relying on visual bounds yields incorrect results in some cases (e.g. leading/trailing empty lines). Update the vertical alignment logic to use metrics instead: - track the first line ascent and last line descent - compute content height as first_ascent + last_descent + line_height * (line_count - 1) - relocate Result::computeBounds() to the unit test (only user) Empirically, this causes top-alignment to be less snug (likely due to ascent slack in the tested fonts). Bug: skia:9098 Change-Id: Ib92bf907af8889d6b0d0fda22ef41a2cc8b50901 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220656 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org> |
||
---|---|---|
.. | ||
fuzz | ||
gm | ||
include | ||
src | ||
utils | ||
BUILD.gn | ||
skottie.gni |