The Segoe fonts from Windows are restricted in use for Windows only, and cannot be hosted or freely used in another environment. See this document.
The most important one for Uno is Segoe MDL 2, which is used in SymbolIcon. Uno replaces it with Microsoft OpenSource Symbol Font, but many of the symbols do not match (see #2834, #2766).
A possible solution would be to create a font that is similar to Segoe MDL 2 with the appropriate, either from the existing opensource ones if legally possible, or as a brand new font.
This issue also contains related discussion - #967
Reproducible also on macOS. The CheckBox Inderterminant state uses a Glyph that is showing as a question mark.
In a previous discussion @scottkuhl mentioned that the fonts provided by the Fluent UI design may be a good replacement for the older WinJS symbols set. It seems to be using the same glyphs codes, and looks like the original Segoe MDL font.
There's a catch, though, as the license states the following:
License Grant
Microsoft grants to Developer, a non-exclusive, revocable, worldwide, non- assignable, non-transferable, royalty-free license to use the Fabric Assets (defined below) or a subset of them (e.g. the âToolkitâ) exclusively for the following purposes:
a. In connection with the use of a Microsoft API within the development of a software application, website, or product you create or a service you offer designed to provide access or interact with a Microsoft service or application (âApplicationâ)
b. To illustrate that Application integrates with one or more Microsoft products and services.
This seems rather restrictive for the use in Uno.
It depends how (a) is interpreted. "OR" range :)
"In connection with the use of a Microsoft API within the development of:
( a software application, [OR] website, OR product you create ) OR (a service you offer designed to (provide access OR interact with) ( a Microsoft service OR application ))"
would allow using this font.
But:
(a software application, [OR] website, OR product you create OR a service you offer ) designed to ((provide access OR interact) (with a Microsoft service OR application))" would not.
But maybe someone from Uno (Nventive?) simply ask Microsoft if they allow Uno to include Fluent UI font in distribution?
Microsoft just published Fluent Icon library - https://www.figma.com/community/file/836835755999342788
Figma
This is a set of the 24px Microsoft Fluent System Icons - used for products across Microsoft. This reimagined set of icons is derived from Microsoftâs MDL2 and Monoline icon sets. The Fluent System Icons are friendlier, have rounded corners, simplified shapes and come in 2 themes: Regular & Filled.
There should be a change soon about licensing, look at this discussion.
Should this be closed now?
It can indeed. Thanks!
@jeromelaban would you mind clarifying the current status of this issue (unfortunately it's not clear to me even after reading through links above):
Thanks in advance
@DierkDroth No, the Segoe fonts cannot be used outside of Windows. This issue is closed because Uno provides its own font that replaces Segoe MDL for Uno.
The documentation is available here.
It may be possible to replace the font on Windows, but the Uno fluent font may not yet define all the symbols used by Windows. You may also need to change all the resources that define symbol fonts in WinUI, and that may not be possible for some controls.
Thanks for clarification, @jeromelaban
@jeromelaban I'm sorry, I'm still struggling with the documentation. I have buttons like this in my (UWP) code:
Content = "\uE974";
FontFamily = new FontFamily("Segoe MDL2 Assets");
How would I need to change that code to have the "uno-fluentui-assets.tff" font active?
BTW: CheckBoxes are looking OK now
BTW: CheckBoxes are looking OK now
@jeromelaban I stand corrected: although CheckBoxes look OK on iOS, they don't on WASM: the checkmark is missing as a CheckBox is checked.
I've seen the CheckBox issue on Skia as well I think. Might warrant a new issue.
@DierkDroth CheckBox is now using the new fluent symbols font. As for the locations where Segoe MDL2 Assets is used, for now it is best to use the SymbolThemeFontFamily resource instead and avoid referencing Segoe MDL2 Assets directly.
@jeromelaban can you confirm that the checkmark for CheckBox on WASM is not working?
@DierkDroth no, the CheckBox is working properly. Make sure to reference the new font in your application.
@jeromelaban sorry I'm still lost:
Here is what I tried:
Nothing helped: there now are no icons at all in WASM, just default place holders
@DierkDroth this means that the font is not loaded properly. Can you validate that the generated HTML for those placeholders is using the proper font ?
@jeromelaban I'm not exactly sure where you wanted me to look.
Anyway, here is what I found:
<link rel="stylesheet" type="text/css" href="./package_498c8f8bfa516d21d155a50cc12ae61751583400/Fonts.css" />Is that what you're looking for?
@DierkDroth I'm talking about inspecting the DOM elements using the browser debugger, and see if the specific elements displayed are actually using the requested font. Is that the case ?
I'm sorry I would not know what to do and how to do that. Where would I find exact steps?
Also: wouldn't the fact that no icons are displayed already prove that the "wrong" font is used?
@jeromelaban I added a sample project to demonstrate the problem.
UnoFonts.zip