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

Don't track variations at default location #38

Merged
merged 1 commit into from
Apr 20, 2024
Merged

Don't track variations at default location #38

merged 1 commit into from
Apr 20, 2024

Conversation

dfrg
Copy link
Collaborator

@dfrg dfrg commented Apr 20, 2024

For variable fonts, when all normalized coordinates are equal to 0, that is equivalent to the default location in variation space and all variation processing can be disabled.

Detect this when pushing a new shaped run and don't store the unnecessary coordinates.

This "fixes" a current performance problem in vello where glyphs from variable fonts are not cached. This effectively forces variable glyphs at the default location to be treated as non-variable allowing them to be cached.

For variable fonts, when all normalized coordinates are equal to 0, that is equivalent to the default location in variation space and all variation processing can be disabled.

Detect this when pushing a new shaped run and don't store the unnecessary coordinates.
Copy link
Member

@xStrom xStrom left a comment

Choose a reason for hiding this comment

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

Haven't run the code, but it looks fine.

@dfrg dfrg added this pull request to the merge queue Apr 20, 2024
Merged via the queue into main with commit fb8a5ee Apr 20, 2024
19 checks passed
@dfrg dfrg deleted the drop-var-coords branch April 20, 2024 18:35
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.

2 participants