Welcome to the WPF feedback portal. We’re happy you’re here! If you have feedback on how to improve the WPF, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
By documentation, you can easily override skin fontfamily settings, like this,
FluentLightThemeSettings settings = new FluentLightThemeSettings
{ FontFamily = (FontFamily)FindResource("MicrosoftYaHeiUI"),};
SfSkinManager.RegisterThemeSettings("FluentLight", settings);
Howerver, you can use only two kinds of fonts here to get things right,
1) Preinstalled font in System Fonts directory,
FontFamily = new FontFamily("Preinstalled Font Name");2) File system absolute path, <FontFamily x:Key="MicrosoftYaHeiUI">file:///D:/Font/Path/On/Disk/#Microsoft YaHei UI</FontFamily>
The rest font resource usage just cannot do things right, like,1) Packaged as content,<FontFamily x:Key="KeyName">./Relative/Path/To/Font/#Font Name</FontFamily>2) Packaged in the same assembly as resource,<FontFamily x:Key="KeyName">pack://application:,,,/Fonts/#Pericles Light</FontFamily>
3) Packaged in the other resource assembly as resource,
<FontFamily x:Key="KeyName">pack://application:,,,/FontLibrary;Component/Fonts/#Pericles Light</FontFamily>
By my observation, for the right font resource FontFamily.BaseUri always not null, but after construct a ThemeSetting and call it with SfSkinManager.RegisterThemeSettings, the control it created has FontFamily.BaseUri == null, maybe this is the issue.