Skip to content

vello: Support brush transforms for glyph runs#1632

Merged
waywardmonkeys merged 1 commit into
linebender:mainfrom
waywardmonkeys:vello-classic-glyph-run-brush-transform
May 15, 2026
Merged

vello: Support brush transforms for glyph runs#1632
waywardmonkeys merged 1 commit into
linebender:mainfrom
waywardmonkeys:vello-classic-glyph-run-brush-transform

Conversation

@waywardmonkeys
Copy link
Copy Markdown
Collaborator

Add a brush_transform field to encoded GlyphRun and expose it through DrawGlyphs. The resolver now emits an additional transform immediately before the glyph-run PATH marker, so gradient and image brushes use the run paint transform while per-glyph geometry transforms remain unchanged.

Thread the option through the scenes text helper and add smoke snapshot coverage using a transformed linear gradient across rendered text.

BREAKING CHANGE: Low-level callers constructing vello_encoding::GlyphRun literals must initialize brush_transform, usually to None.

Fixes #1631.

@waywardmonkeys waywardmonkeys requested a review from raphlinus May 9, 2026 03:39
@waywardmonkeys waywardmonkeys force-pushed the vello-classic-glyph-run-brush-transform branch from 4d0f429 to bc5e006 Compare May 9, 2026 03:43
Copy link
Copy Markdown
Contributor

@raphlinus raphlinus left a comment

Choose a reason for hiding this comment

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

Looks good, I didn't find any problems. Thanks!

@waywardmonkeys waywardmonkeys added this pull request to the merge queue May 15, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 15, 2026
Add a `brush_transform` field to encoded `GlyphRun` and expose it through
`DrawGlyphs`. The resolver now emits an additional transform immediately
before the glyph-run `PATH` marker, so gradient and image brushes use the
run paint transform while per-glyph geometry transforms remain unchanged.

Thread the option through the scenes text helper and add smoke snapshot
coverage using a transformed linear gradient across rendered text.

BREAKING CHANGE: Low-level callers constructing `vello_encoding::GlyphRun`
literals must initialize `brush_transform`, usually to `None`.

Fixes linebender#1631.
@waywardmonkeys waywardmonkeys force-pushed the vello-classic-glyph-run-brush-transform branch from bc5e006 to 3096ead Compare May 15, 2026 06:51
@waywardmonkeys waywardmonkeys enabled auto-merge May 15, 2026 06:51
@waywardmonkeys waywardmonkeys added this pull request to the merge queue May 15, 2026
Merged via the queue into linebender:main with commit 0312d43 May 15, 2026
17 checks passed
@waywardmonkeys waywardmonkeys deleted the vello-classic-glyph-run-brush-transform branch May 15, 2026 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Glyph rendering with gradient brush

2 participants