skia2/modules/skottie
Florin Malita dcafc5d2bc [skottie] Visual-only text valign
Historically, Skottie started with vertical alignment based on the
typographic bounding box.  This was meant to account for empty
leading/trailing lines.

At some point [1], the strategy was changed to also take the visual
bounding box into account (union of typographic and visual bounds).

It turns out this is still suboptimal: aligning based on font metrics
yields poor results in practice, and pretty much everyone expects
visual-only alignment.

This CL is an attempt to fix things:

1) update kVisualTop/kVisualCenter/kVisualBottom to use visual bounds
   only (as their name implies)
2) introduce kDeprecatedVisualCenter to preserves the old behavior
   for compatibility, and use it for the legacy sk_vj flags

The latter is done to minimize disruption for clients which have
adjusted for the current misalignment: luckily they're mostly using the
old sk_vj flag instead of explicit resize/valign policies, and they can
continue to do so without change, while new clients can opt into the
new/improved valign modes.

The change is guarded by a build flag for g3 staging.

[1] https://skia-review.googlesource.com/c/skia/+/224188

Change-Id: I334c1713ce32635e3649711f072a3dcdf6b12244
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501016
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2022-02-07 17:04:17 +00:00
..
fuzz [canvaskit] Add skottie to Bazel build 2022-02-04 19:18:27 +00:00
gm [canvaskit] Add skottie to Bazel build 2022-02-04 19:18:27 +00:00
include [canvaskit] Add skottie to Bazel build 2022-02-04 19:18:27 +00:00
src [skottie] Visual-only text valign 2022-02-07 17:04:17 +00:00
tests [canvaskit] Add skottie to Bazel build 2022-02-04 19:18:27 +00:00
utils [canvaskit] Add skottie to Bazel build 2022-02-04 19:18:27 +00:00
BUILD.bazel [canvaskit] Add skottie to Bazel build 2022-02-04 19:18:27 +00:00
BUILD.gn Reland "[skottie] AllCaps support" 2021-09-03 14:43:59 +00:00
skottie.gni add sharpen effect support to skottie player 2021-12-14 19:44:26 +00:00