skia2/modules/svg
Florin Malita fc0ea0a4a5 [svg] TextPath support
- introduce SkSVGTextPath and update the text render logic to
    instantiate new SkSVGTextContexts in onRenderText() overrides
    instead of renderText() root -- this is to observe spec semantics
    [1] requiring <text> and <textPath> to always start a new chunk,
    regardless of their relative nesting.
  - expand SkSVGTextContext to also store PathData when used in the
    scope of a textPath
  - PathData caches SkContourMeasures, for path position lookup
  - update flushChunk() to apply path glyph adjustments [2]:

    * the horizontal glyph position (including relative offset dx),
      adjusted for the glyph center yields a path offset
    * if the offset is outside the path range, the glyph is skipped
    * otherwise the position is determined based on the path matrix
      at the computed offset

   - to support the logic above, the chunk starting position is no
     longer used as a global blob offset but instead is folded into
     individual glyph RSXforms (and the blob always draws at {0,0})

[1] https://www.w3.org/TR/SVG11/text.html#TextLayout
[2] https://www.w3.org/TR/SVG11/text.html#TextpathLayoutRules

Bug: skia:10840
Change-Id: I462eada7c086646afdc1bc84f08ec2368613f1c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/349397
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2021-01-13 14:37:39 +00:00
..
include [svg] TextPath support 2021-01-13 14:37:39 +00:00
src [svg] TextPath support 2021-01-13 14:37:39 +00:00
tests [svg] TextPath support 2021-01-13 14:37:39 +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 [svg] Implement feGaussianBlur 2021-01-12 16:26:16 +00:00