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!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

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.