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

when set {x:Null} to any control's FontFamily property, application will crashed #15873

Closed
Luoyingliang opened this issue May 31, 2024 · 4 comments · Fixed by #15896
Closed
Labels

Comments

@Luoyingliang
Copy link
Contributor

Describe the bug

in WPF, set {x:Null} to any control's FontFamily property, it will fallback to the default fontfamily rather than throw exception, but in Avalonia (version 11.0.10) will throw a exception and application crashed

To Reproduce

set {x:Null} to any control's FontFamily property

Expected behavior

fallback to the default fontfamily

Avalonia version

11.0.10

OS

Windows, Linux, Android

Additional context

No response

@appel1
Copy link
Contributor

appel1 commented May 31, 2024

Duplicate of #15287 ?

And perhaps setting FontFamily to null should fail property validation as it works in WPF?

@Luoyingliang
Copy link
Contributor Author

Duplicate of #15287 ?

And perhaps setting FontFamily to null should fail property validation as it works in WPF?

yep, it's duplicated.
right, it's work in WPF

@rabbitism
Copy link
Contributor

There are multiple RPs related to font loading now, so we probably need to ask @Gillibald to check if any previous PR already fixed this issue.

@Luoyingliang
Copy link
Contributor Author

There are multiple RPs related to font loading now, so we probably need to ask @Gillibald to check if any previous PR already fixed this issue.

ok

Luoyingliang added a commit to Luoyingliang/Avalonia that referenced this issue Jun 3, 2024
maxkatz6 pushed a commit that referenced this issue Aug 12, 2024
…application (#15896)

* fix #15873

* fix: FontFamily wrong assignment

* Revert extra whitespaces

---------

Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants