-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Wrong icons for buttons in Registry Preview #25284
Comments
cc: @randyrants |
This one is interesting and likely why toolbars used images for 100 years instead of relying on built-in fonts (as the current incarnation of the commandbar tells you to.) I'll have to see what happened with this and figure out a path forward. |
Quick ask on this, as there are several ways to assign an icon to the button, and I'm trying to avoid creating images for each of the buttons. I found this, in the blurb about "SymbolIcon" in the API docs:
Based off the screenshot, I'm assuming you're in Windows 11, but can you confirm that "Segoe Fluent Icon" is a font installed to your system? It will take some time for me to find a machine or get a VM-capable box running with Simplified Chinese; I have one or two devices running in other languages somewhere, but I wanted to check your device first. Likewise, it appears that it might be an issue with XAML itself: microsoft/microsoft-ui-xaml#6392 |
@randyrants The system in the screenshot of the original post is Win 10 22H2. I just installed PowerToys in Win 11 22H2 in the virtual machine, and the language is also zh-Hans, the icons displays correctly. I took a look, the font "Segoe MDL2 Assets" exists in both systems, but the font "Segoe Fluent Icons" only exists in Win 11. And after I manually installed the "Segoe Fluent Icons" font to Win 10, the software GUI became correct. Then there are two things involved here:
Therefore, if there is a way to directly specify the font-fallback-chain in the software, just like the CSS statement: |
I think I have it. I switched how the icon was being selected and told it to use the StaticResource SymbolThemeFontFamily which should handle the fallback better. If it doesn't, I'll pull someone into the conversation to see what the options are, like locking it to the Windows 10 font, rather than 11. |
I am using Windows 10 and have no problems. Usung the static resource soud good to me and I think that should fix it. |
I agree it should, but the fallback behavior with zh-Hans hasn't, well, fallen back as it should. On Win11, it should use Segoe Fluent Icons, but on Win10 it should look for Segou MDL2 Assets, and if Windows 8 was supported, it should look for Segoe UI Symbol. For LIXiangChen, Windows 10 with Simplified Chinese, the original code picked up an unexpected font for the icon, which is the oddity. My hope is that by calling out the StaticResource explicitly, it will behave better. WinUI3 just has some odd behavior at times. Normally, I would think I've missed something but the last few days, have the stuff I'm debugging ends up being broken for everyone, which leave me confused! |
This issue is well familiar to me. The icons are defined with their names, like |
See also microsoft/microsoft-ui-xaml#8375 |
@randyrants the changes in your open pr circumvent this by specifically setting the icons with valid code points 👍🏻 |
Related: microsoft/microsoft-ui-xaml#8375 |
@niels9001 that's what I said 😝. I made MicrosoftDocs/winrt-api#2363 to specifically focus on the Docs/SymbolIcon page. |
There's another one with the same issue in Flyout, which uses |
Yes, I'm aware of that one, @niels9001 is too. |
@1332186865 That one is on Microsoft, see issue linked above. |
Can we please limi discussion on the original reported bug. |
Who is working here on fixing what and is the fix for the initial report merged? I am a bit confused as this issues moved somehow away from the initial bug report. |
@htcfreek If no one is picking this up I'm happy to help with this as I'm working on a UI related PR for Registry Preview anyway 👍 |
@niels9001 |
*At least, for a number of icons in specific controls. Not the entire SymbolIcon function |
This has not been successfully fixed
|
This has been shipped for 0.70.0. Please updated to the latest release. Thank you. |
Microsoft PowerToys version
0.69.0
Installation method
GitHub
Running as admin
None
Area(s) with issue?
Registry Preview
Steps to reproduce
In the Simplified Chinese environment, most icons are garbled characters.
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
Other Software
No response
The text was updated successfully, but these errors were encountered: