commit | 71bcfef9f7f92fed11e843b02b93fb4a886fcf3f | [log] [tgz] |
---|---|---|
author | Florin Malita <fmalita@chromium.org> | Fri Oct 02 14:15:50 2020 -0400 |
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | Fri Oct 02 19:33:35 2020 +0000 |
tree | d1edaa779a5d1977e6020cd1a3707b46cab85009 | |
parent | b509bbb81f36f6cd17da0f2e90b724d379de43de [diff] |
[skottie] Auto-resize and VAlign support for point text Auto-resizing and vertical alignment require a non-empty text box. But currently, the presence of the text box is used to discriminate between point text [1] and paragraph text [2]. In order to support auto-scaling and v-alignment for point text, we must decouple the text mode encoding from the text box: * introduce and explicit LinebreakPolicy property for skottie::Shaper, and use it to control line breaking instead of the text box presence * by default, the line breaking policy is initialized per existing AE/BM semantics: non-empty text box -> paragraph mode, empty box -> point mode * the policy can be overridden via the PropertyObserver APIs to enable point mode auto-resizing and vertical alignment [1] https://helpx.adobe.com/after-effects/using/creating-editing-text-layers.html#enter_point_text [2] https://helpx.adobe.com/after-effects/using/creating-editing-text-layers.html#enter_paragraph_text Change-Id: I007144283a31a2faa579d7eec82af72af3d540cb Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321788 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Florin Malita <fmalita@google.com>