Skip to content

lottie/text: support perpendicular rotation in text follow path#4449

Open
tinyjin wants to merge 1 commit into
mainfrom
jinny/enhance-text-follow-path
Open

lottie/text: support perpendicular rotation in text follow path#4449
tinyjin wants to merge 1 commit into
mainfrom
jinny/enhance-text-follow-path

Conversation

@tinyjin

@tinyjin tinyjin commented Jun 10, 2026

Copy link
Copy Markdown
Member

Added missing spec, perpendicular option in the text follow path.

see : https://lottiefiles.github.io/lottie-docs/text/#text-follow-path

CleanShot 2026-06-10 at 19 02 04@2x

test file : embedded_text_on_path_sample.json

Before After Expected
CleanShot 2026-06-10 at 19 05 10@2x CleanShot 2026-06-10 at 19 03 57@2x Notion 2026-06-10 19 03 31

@tinyjin tinyjin self-assigned this Jun 10, 2026
Copilot AI review requested due to automatic review settings June 10, 2026 10:07
@tinyjin tinyjin requested a review from Nor-s as a code owner June 10, 2026 10:07
@tinyjin tinyjin added enhancement Improve features lottie Lottie animation compliance Specification Compliance for W3C, Lottie, SVG, etc. labels Jun 10, 2026
@github-actions

Copy link
Copy Markdown

Binary Size Report

Config main text main data PR text PR data Delta
arm64-clang 852,215 23,672 852,711 23,672 +496 (+0.06%)
x86-gcc 881,336 11,516 881,868 11,516 +532 (+0.06%)
x86_64-clang 857,074 22,176 857,550 22,176 +476 (+0.05%)
x86_64-gcc 862,971 21,912 863,381 21,912 +410 (+0.05%)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for the Lottie text-follow-path “perpendicular” option by parsing the follow-path p property and applying it during glyph placement so text can rotate according to the path’s direction.

Changes:

  • Parse the follow-path p property from Lottie JSON into the text follow-path model.
  • Store the parsed perpendicular flag in the render context used during text layout.
  • When enabled, rotate glyph transforms by the path angle during follow-path placement.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/loaders/lottie/tvgLottieParser.cpp Parses follow-path p into the text follow-path structure.
src/loaders/lottie/tvgLottieModel.h Adds a perpendicular property to LottieTextFollowPath.
src/loaders/lottie/tvgLottieBuilder.h Tracks a perpToPath flag in RenderText context.
src/loaders/lottie/tvgLottieBuilder.cpp Evaluates perpendicular per-frame and rotates glyph transforms when enabled.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

Copy link
Copy Markdown

Pixel Test Report

Backend Compared Diff Failed
gl 292 0 0
wg 292 0 0
sw 292 0 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compliance Specification Compliance for W3C, Lottie, SVG, etc. enhancement Improve features lottie Lottie animation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants