Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force encoding of transform/style following glyph run #425

Merged
merged 3 commits into from
Jan 26, 2024
Merged

Conversation

dfrg
Copy link
Collaborator

@dfrg dfrg commented Jan 25, 2024

Fixes #424 which describes a case where encoding a glyph run breaks the optimization that omits duplicate transforms/styles from their respective streams.

This uses flags in the encoding to force the next transform/style to be emitted. An alternative implementation would be to unconditionally encode a default transform/style after each glyph run but this seemed like the better approach to me.

Also changes SimpleText::add to use the glyph run API. This means all text in the vello demos now uses that code path rather than encoding glyph outlines directly.

dfrg added 3 commits January 24, 2024 21:31
Fixes #424 which describes a case where encoding a glyph run breaks the optimization that omits duplicate transforms/styles from their respective streams.

This uses flags in the encoding to force the next transform/style to be emitted. An alternative implementation would be to unconditionally encode a transform/style after each glyph run but this seemed like the better approach to me.

Also changes SimpleText::add to use the glyph run API. This means all text in the vello demos now uses that code path rather than encoding glyph outlines directly.
dfrg added a commit to linebender/xilem that referenced this pull request Jan 25, 2024
... and everything else, apparently. This pushes the new font code changes through the ecosystem.

Brings everything into sync and should put us in a good place to start releasing.

This works as is but depends on a vello commit that is still under review: linebender/vello#425 should land first and this should be updated with the new git rev before merging.
Copy link
Contributor

@Philipp-M Philipp-M left a comment

Choose a reason for hiding this comment

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

I'm still barely beneath the surface of vello (time to dig a little bit deeper), so take this with a grain of salt.

I think I understand the issue, and agree with the solution though.

@dfrg
Copy link
Collaborator Author

dfrg commented Jan 26, 2024

Thanks Philipp! Your reviews across the whole range of projects have been incredibly helpful in moving these changes forward.

@dfrg dfrg merged commit 944ce63 into main Jan 26, 2024
4 checks passed
@dfrg dfrg deleted the glyph-run-state-fix branch January 26, 2024 15:43
github-merge-queue bot pushed a commit to linebender/xilem that referenced this pull request Jan 26, 2024
* Update vello and parley deps...

... and everything else, apparently. This pushes the new font code changes through the ecosystem.

Brings everything into sync and should put us in a good place to start releasing.

This works as is but depends on a vello commit that is still under review: linebender/vello#425 should land first and this should be updated with the new git rev before merging.

* fmt :(

* update git revs
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 runs break transform/style optimization
2 participants