-
Notifications
You must be signed in to change notification settings - Fork 97
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
v1.1.5 Update #47
v1.1.5 Update #47
Conversation
Will this include use of the newly added CornerRadius to controls? It's useful to update code like this.
Separately, let me know if you need help with, or run across issues, updating to the WinSymbols3 font. For example, I can write a quick script to generate https://github.com/amwx/FluentAvalonia/blob/master/FluentAvalonia/UI/Controls/IconElement/Symbol.cs using latest glyph mappings. I'm not sure if this method is needed at all after this?
|
Yep! I've already started making the changes on some controls.
Will do. I haven't gotten there yet, I'm still going over the templates to make sure they're up to date, which is a little time consuming. |
@robloo Unfilled Icons: https://gist.github.com/amwx/578e4aae716519251b8e09140d2d57c3 |
Oh, I thought you were keeping the WinUI Segoe Fluent Unicode points to match upstream. I didn't realize you were building your own symbols different from upstream WinUI.
This is no issue really. I can easily build you a new, custom font using a new IconMapping file with whatever you want.
I would definitely merge these if possible. WinUI uses the suffix 'Fill' so 'Heart' and 'HeartFill' would be in the same enum. https://docs.microsoft.com/en-us/windows/apps/design/style/segoe-fluent-icons-font#layering-and-mirroring
This is also not much of an issue. I already have code that can re-map to whatever icon size you would like. If you want, I can re-map all available ones to size 20 for you automatically. Some follow-up questions:
|
I meant the when I created the Symbol enum originally. What I actually did was start with the UWP Symbol enum, tried to match what I could of the MDL2 symbols with FluentUI, and then added a bunch of additional icons in there - but it originally was built to fit FluentUI since at the time Segoe Fluent wasn't a thing (or still early) and it and MDL2 have restrictive licenses.
Sorry if I made it sound more confusing than it should be, but that's the intent here - to follow your idea of matching Segoe Fluent where possible. I've already mapped what I could to the Segoe Fluent code points. In the two files I linked above, the values are remapped, and I tested it with WinSymbols3 font and it works. Those enum values that are set to zero are the ones that are missing matching code points, and then in comments I put what I'm currently mapping to.
That would be great! Keep the code points that match the same for compatibility and everything else can be put where ever its not in the way. I don't know how much work this is (and I hope its not too much), but your help on this is greatly appreciated! |
@amwx Ok, I know how to complete this without too much work -- we are thinking the same now! I'll try to set aside a few hours today/tomorrow to finish it for you. I will do the following:
|
@amwx I ran into several things with the source files. Can you verify what should be done about the cells highlighted in red in the attached workbook? There is no source Unicode point specified for either SegoeFluent or FluentUISymbols. Edit: I think I read this too literally at first. Most of these unknowns originate from the comment "fluentUI codepoint same as nonfilled". It's possible this comment is old and was based off the first version of the enum when everything was just FluentUISystem Unicode points. When you switched relevant glyphs over to SegoeFluent, the comment may now may simply mean "codepoint same as non-filled" -- keep the same Unicode point between filled/nonfilled enums. In that case most of the issues go away. HOWEVER, I would not keep a filled enum value when the filled/non-filled versions are the same. If the Unicode points are the same, don't duplicate and don't include the filled variant. |
@robloo The comment "fluentUI codepoint same as nonfilled" means that the unicode value for the filled symbol is the same as the unfilled between the 2 FluentUI font files. I guess that doesn't mean much now that I think about it since 1) the unfilled are remapped, and 2)they're being switched to 20px variants. I've added the code points for the red cells, and made sure to use the 20px variants so all is ready now. I've also corrected Crop unfilled (I accidentally put the FluentUI value) and Earth where I left off 'E' |
@amwx I ran into some complications because the This will be possible because I finally ran across the original Segoe UI Symbols icon definitions here. |
No problem. If there's anything you need from me or any way I can help, just let me know. And no worries on time. I discovered last night that the changes made to ItemsSourceView for 0.10.8 broke the ItemsRepeater, and therefore the NavigationView, so this PR will be held until that gets fixed. |
I completed the very first build of the mapping file. This generated the JSON file attached below that looks like the given image inside the Symbol Icon Manager. There are errors and I can't build a font from this so there is a fair bit of debugging left I expect. I should have a font by tomorrow though. This enum is going to be huge -- 505 entries is what it comes out to right now. There are almost 200 in the Windows Symbol enum itself. Then you have added several and included both filled/regular variants. This also doesn't include all the other icons that will be merged in from the standard SegoeFluent font (but won't be in the enum, only the font). When complete:
After the initial mapping file is complete, edits should be made within the JSON file directly or through the UI in the Symbol Icon Manager. There is a very complicated build process to generate the initial mapping file but it isn't needed going forward. |
@amwx Please give this a good testing: |
I've only taken a quick look, but overall it looks like it's working really well. One observation: Were there some new symbols added to the enum, some of them I don't remember being present? That's fine if so, I just want to make sure I'm not going crazy. In related news, as it stands, the new font file will cut ~2MB off the package/solution size, so that's awesome |
Yes, I wanted the enum to be 100% compatible with upstream so it includes ALL values from the WinUI Symbol enum. Then I also added in all of your new ones as well. 505 in total. The font itself includes everything in the enum plus everything in SegoeFluent that exists in the current mapping file. This means the FluentAvalonia font is also compatible with SegoeFluent while including your new symbols as well (in much higher Unicode points so there is no overlap). The initial build process was more complicated than I would have liked but you can read through it starting here: https://github.com/robloo/SymbolIconManager/blob/acceda83c61b2eb3d26624319ac47678c7e4ebba/Source/Models/Specialized/FluentAvalonia.cs#L33
The enum includes all symbols in WinUI and not all of them have an equivalent in the new font. I just don't know a good mapping for them. This can be improved by updating the SegoeFluent.json mapping file and then rebuilding all fonts. I decided it's better for the enum to have an entry even if the glyph doesn't exist (so copy/pasted code compiles). In addition, I noticed the conversion to size 20 FluentUISystem SVGs doesn't seem to be working everywhere so I definitely will give the font another look. Just let me know what else you might find and I'll rebuild it next week.
Perfect! Another bonus of the Symbol Icon Manager is can build custom fonts specifically for an app. This is for the same reason: to cut down on app package size. This is especially helpful for some larger apps. |
Perfect. What I'll probably do is just mark the missing WinUI symbols with an I've given everything a closer look, and there's only a few missing that should be there: These show a mapping, but are showing the 'invalid glyph' character. These should be showing something, but don't have a mapping present. These have a code point for the 'Destination' but is undefined for the source. How difficult is it to build the font itself now that the mapping file is generated? Good to know for future use, and if it's not hard I could probably fix the second set above myself. |
Yea, what you found with the first set matches with the log file. The build script wasn't able to locate a few SVG files. I'm not sure why but I'll take a look. The second set is probably because those mappings are missing in SegoeFluent.json (the mapping to build that font). Those mappings are master and will overwrite anything in the custom FluentAvalonia mappings file. I shouldn't be overwriting a good source with a missing one though so that's a bug in merge functionality I'll fix. I'll also update SegoeFluent font itself. I'll rebuild the font again from initial after fixing this. Don't worry about updating the json mapping file. Afterwards, I'll document how to font, its quite easy on Windows. I'll also probably make a button for known fonts to make it even easier. Edit: Good idea with the Obsolete attribute too. I'll automatically add that in the generated file for you. Let me know what message you would like for it. |
Can you please re-review the below list in upstream FluentUISystem repo: https://github.com/microsoft/fluentui-system-icons. It appears they have removed them entirely from the font (they do not exist in the upstream .ttf files and I can't locate the SVG files either). SVG files are critical in order to build a font. They also don't exist anymore in https://github.com/microsoft/fluentui-system-icons/blob/master/icons.md. The only place they are still referenced is FluentSystemIcons-Filled.json and FluentSystemIcons-Regular.json which is why they still are detected and processed by the Symbol Icon Manager. Perhaps they changed the name and didn't properly update the repository: cloud_backup could now be cloud_archive for example (I can't compare images to tell though). I'm not sure what to do here.
Important: These appear to have been removed from the .TTF files as well. This means they wouldn't work on your end as soon as you update the TTF files. My guess is these are Windows-specific icons that never should have been released publicly to begin with Your listCloudBackup/CloudBackupFilled Build LogError: Missing SVG source URL, mapping skipped src=0xF2E8, dst=0xF8039 (ic_fluent_cloud_backup_48_regular) |
Ah, I found the commit that seems to have changed all these. The good news is that they likely were just renamed. microsoft/fluentui-system-icons#331 What will be removed on July 15th Arrow Growth → Arrow Trending Lines |
Thanks, I'll be sure to fix that. It's likely an issue with the SegoeFluent mappings.
Yes, correct. However, WinUI also defines the resource to use for this That said, Microsoft is using some old codepoints that they shouldn't: microsoft/microsoft-ui-xaml#5887. So a few glyphs won't appear even with the new font. I should probably support these old codepoints in the SegoeFluent replacement font (WinSymbols3) but don't because they really should have been obsoleted by now. I would suggest for Fluent Avalonia you update to the latest codepoints. I have all the mappings from the old, original Segoe UI Symbol codepoints to the new ones in SegoeMDL2Assets/SegoeFluent here: https://github.com/robloo/SymbolIconManager/blob/main/Source/Data/Mappings/SegoeUISymbolToSegoeMDL2Assets.json. It would just be a find-replace and things should work. If all of this still doesn't get things to work, I never defined a name in the font file so maybe that won't allow you to select the font properly in XAML. You'll need to do something like:
I'm already doing this mentioned above. "The font itself includes everything in the enum plus everything in SegoeFluent that exists in the current mapping file. This means the FluentAvalonia font is also compatible with SegoeFluent while including your new symbols as well (in much higher Unicode points so there is no overlap)." Edit:
It's entirely possible I couldn't find a replacement symbol for these. So if you have one please let me know. If we talk specific codepoints I think this is easily fixable. How did you get this to work previously? |
@robloo Thanks. I got myself confused between still having the old code points but changing the font. I already have |
Let's hope this does it! There are lots of fixes and synchronizations with upstream SegoeFluent. Major changes include:
Note that these changes mean everything is updated including the enum as there were Unicode point changes. I'm pretty happy where things are with the build process even if it's a lot more complicated than I would like. It is also fully automated now. Feel free to browse through the code if you get a chance in the future and you should be able to make updates yourself as needed without too much effort.
|
ContentDialog - wrong property usage for IsSecondaryButtonEnabled
FluentAvalonia v1.1.5 update, which features a full pass over all controls to ensure they're visually ok compared to the new WinUI Fluent v2 styles & matching Windows 11.
This PR is just about complete. I'm waiting for a fix in Avalonia for
ItemsSourceView
to either be pushed into 0.10.8 or for 0.10.9 to be released. If you update to 0.10.8, theNavigationView
will break b/c of this bug with theItemsRepeater
/ItemsSourceView
New Controls
InfoBadge
control & integration withNavigationView
New features:
NOTE:
ContentMenu
will not be supported in FluentAvalonia - useContextFlyout
Fixes
InfoBar
to more closely resemble WinUI (Fixes [Bug] Incorrect InfoBar Severity Icon #45)Frame
(Fixes Navigation Control Animation Glitch #46)Miscellaneous
Deprecations/Removals
[Other updates to be added as they're completed]