Search code examples
wpfunicodefontsglyph

Segoe MDL2 icons in WPF glyphs missing?


I downloaded SegMDL2.ttf from https://learn.microsoft.com/en-us/windows/uwp/design/style/segoe-ui-symbol-font, added to the project, set Build Action as Resource and added following to the ResourceDictionary:

<FontFamily x:Key="mdl2">/Resources/Fonts/#Segoe MDL2 Assets</FontFamily>
<sys:String x:Key="mdl2 Save">&#xE74E;</sys:String>
<sys:String x:Key="mdl2 PDF">&#xEA90;</sys:String>

Why this displays correct glyph <TextBlock FontFamily="{StaticResource mdl2}" Text="{StaticResource mdl2 Save}"/> ,but this does not <TextBlock FontFamily="{StaticResource mdl2}" Text="{StaticResource mdl2 PDF}"/>?

Missing icon in Segoe MDL2 Assets font family I don't think this solution is applicable as I want to use embedded resource, not system font (targeting W10 & W7 systems)


Solution

  • I copied font from W10 1909 c:\Windows\Fonts\segmdl2.ttf and all glyphs are now visible. Don't use file hosted on MS website mentioned in question.