skia2/modules
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
..
audioplayer implement SkAudioPLayer for Android 2020-12-15 00:12:48 +00:00
canvaskit Remove Improved Perlin Noise 2021-01-11 15:27:26 +00:00
particles Remove SkEffectBinding feature from particle system 2021-01-12 19:36:27 +00:00
pathkit [canvaskit] Update to emsdk 2.0.10 2020-12-14 15:27:28 +00:00
skottie [skottie] Add text colorization GM 2020-12-10 17:10:48 +00:00
skparagraph Position inside family glyph 2021-01-11 22:41:25 +00:00
skplaintexteditor Enable ClangTidy check readability-const-return-type. 2020-08-07 17:42:38 +00:00
skresources Make SkBase64 interface less unpleasant. 2021-01-08 20:28:19 +00:00
sksg Work on hiding filter-quality 2020-12-23 17:05:17 +00:00
skshaper Revert "Cache ICU break iterators in SkUnicode_icu" 2021-01-08 02:29:03 +00:00
svg [svg] TextPath support 2021-01-13 14:37:39 +00:00