-
Notifications
You must be signed in to change notification settings - Fork 810
fix: Fallback from Segoe UI Symbol to configured symbol font #21070
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds missing fallback support for the "Segoe UI Symbol" font in FontFamily
and introduces a unit test to verify symbol font fallback behavior.
- Extend the font fallback condition in
FontFamily
to include "Segoe UI Symbol" - Refactor unit tests: narrow the WASM guard and add a new
Symbol_Fonts_Fallback
test
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
src/Uno.UI/UI/Xaml/FontFamily.cs | Added a Contains("Segoe UI Symbol") check alongside existing symbol font conditions |
src/Uno.UI.RuntimeTests/.../Given_FontFamily.cs | Updated test scaffold: wrapped only the pure-name test in #if __WASM__ , added a fallback test |
Comments suppressed due to low confidence (2)
src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Media/Given_FontFamily.cs:61
- Add additional test cases where the family name contains the symbol font as part of a path or file name (e.g.,
"fonts/Segoe UI Symbol.ttf"
) to ensure theContains
logic correctly triggers fallback in non-exact-match scenarios.
fontFamily = new FontFamily("Segoe UI Symbol");
src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Media/Given_FontFamily.cs:57
- [nitpick] Consider renaming this test to something more descriptive, e.g.
Fallback_When_FontFamilyIsSymbolFont
, to clearly convey the scenario being validated.
public void Symbol_Fonts_Fallback()
π€ Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21070/wasm-skia-net9/index.html |
π€ Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21070/docs/index.html |
1 similar comment
π€ Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21070/docs/index.html |
π€ Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21070/wasm-skia-net9/index.html |
c0d694d
to
5ff0f19
Compare
π€ Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21070/wasm-skia-net9/index.html |
π€ Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21070/docs/index.html |
|
5ff0f19
to
a29f40c
Compare
π€ Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21070/docs/index.html |
π€ Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21070/wasm-skia-net9/index.html |
Keeping open until new text rendering changes are merged, after which it will need to be adjusted cc @ramezgerges |
|
GitHub Issue: closes #4579
PR Type: π Bugfix
What is the current behavior? π€
What is the new behavior? π
PR Checklist β
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Run
results.Other information βΉοΈ