skia2/modules/svg
Florin Malita 735ac97eb4 [svg] Relative postioning support for text
Introduce support for relative position adjustments [1]:

  - plumb dx, dy attributes
  - extend ScopedPosResolver to also handle the new attributes
  - introduce ShapeBuffer to store both utf8 text and position
    adjustments for shaping (replaces prev 'filtered' array).
  - position adjustments are cumulative (relative adjustments affect
    all following characters)
  - utf8 encoding is variable length; for simplicity, ensure that the
    pos adjustment array and the utf8 array are always the same size by
    repeating the pos adjustment times number of utf8 bytes
  - introduce a temporary buffer for retrieving utf8 cluster information
    from SkShaper
  - post-shaping, use the utf8 cluster info to map back to character
    indices and apply the associated position adjutment

[1] https://www.w3.org/TR/SVG11/text.html#TSpanElementDXAttribute

Bug: skia:10840
Change-Id: Ia9f227f91723400711ff2b5d260976290da1e2e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/346636
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2020-12-22 19:19:12 +00:00
..
include [svg] Relative postioning support for text 2020-12-22 19:19:12 +00:00
src [svg] Relative postioning support for text 2020-12-22 19:19:12 +00:00
tests Reland "[svg] Absolute positioning support for text" 2020-12-18 02:09:18 +00:00
utils [svg] Allow clients to pass a custom SkFontMgr 2020-11-11 01:51:44 +00:00
BUILD.gn Reland "[svg] Absolute positioning support for text" 2020-12-18 02:09:18 +00:00
svg.gni Reland "[svg] Absolute positioning support for text" 2020-12-18 02:09:18 +00:00