fc0ea0a4a5
- 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> |
||
---|---|---|
.. | ||
audioplayer | ||
canvaskit | ||
particles | ||
pathkit | ||
skottie | ||
skparagraph | ||
skplaintexteditor | ||
skresources | ||
sksg | ||
skshaper | ||
svg |