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

Fix FontCollection glyph typeface caching #17519

Merged
merged 5 commits into from
Nov 19, 2024

Conversation

Gillibald
Copy link
Contributor

@Gillibald Gillibald commented Nov 15, 2024

What does the pull request do?

This PR ensures the current IFontCollection implementations properly cache glyph typeface when they create a synthetic typeface.

This also changes the SystemFontCollection so created glyph typefaces are added to the cache before the nearest match is attempted to be found.

What is the current behavior?

What is the updated/expected behavior with this PR?

How was the solution implemented (if it's not obvious)?

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

@Gillibald Gillibald added the backport-candidate-11.2.x Consider this PR for backporting to 11.2 branch label Nov 15, 2024
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.3.999-cibuild0053361-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@Gillibald Gillibald changed the title Fix SystemFontCollection typeface matching [WIP] Fix FontCollection glyph typeface caching Nov 15, 2024
@Gillibald Gillibald changed the title [WIP] Fix FontCollection glyph typeface caching Fix FontCollection glyph typeface caching Nov 15, 2024
@maxkatz6 maxkatz6 added the bug label Nov 15, 2024
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.3.999-cibuild0053366-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.3.999-cibuild0053388-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@MrJul MrJul merged commit 28c2107 into AvaloniaUI:master Nov 19, 2024
10 checks passed
maxkatz6 pushed a commit that referenced this pull request Nov 26, 2024
* Make sure we always cache the created glyph typeface before we try to find the nearest match

* Cleanup usings

* Add failing test

* Cache the matched glyph typeface for EmbeddedFontCollection
@maxkatz6 maxkatz6 added backported-11.2.x and removed backport-candidate-11.2.x Consider this PR for backporting to 11.2 branch labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants