skia2/modules/skottie
Florin Malita 084fa1b52f [skottie] Use metrics for Shaper vertical alignment
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>
2019-06-13 13:04:53 +00:00
..
fuzz rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
gm IWYU for gms starting with 'a'. 2019-04-30 19:39:37 +00:00
include rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
src [skottie] Use metrics for Shaper vertical alignment 2019-06-13 13:04:53 +00:00
utils rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
BUILD.gn Reland "SkParagraph" 2019-06-11 17:20:36 +00:00
skottie.gni [skottie] Initial text range selector support 2019-06-04 20:50:32 +00:00