Skip to content

Conversation

maxkatz6
Copy link
Member

@maxkatz6 maxkatz6 commented Sep 5, 2025

What does the pull request do?

Instead of self-registering FontManager on first access, it's safer to keep lazy initialization inside of AvaloniaLocator.

At first, I implemented this PR by registering FontManager early, during rendering backend initialization. But then I remembered about AvaloniaLocator.ToLazy being an option and redid this PR.

Fixed issues

Fixes #10081

@maxkatz6
Copy link
Member Author

maxkatz6 commented Sep 5, 2025

Simplified this PR a lot by using AvaloniaLocator.ToLazy method. Also reverting initialization order changes. Now this PR shouldn't introduce any potential behavioral changes.

@MrJul
Copy link
Member

MrJul commented Sep 5, 2025

Note: a lot of tests are failing.

@maxkatz6
Copy link
Member Author

maxkatz6 commented Sep 6, 2025

Weirdly, failing tests are platform specific. And none are failing on my machine.
Would need to have another look later.

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.

FontManager auto-registers itself instead of being registered in Application::RegisterServices

2 participants