Code Optimization

Interesting things about software development and code optimization

WPF System.Windows.Media.Fonts.SystemFontFamilies does not see all system fonts installed

Hello friends,

Today i would like to share one case i have faced with - WPF application that uses

 System.Windows.Media.Fonts.SystemFontFamilies can't see a font I have just installed but Word and other applications were able to see it immediately.

I did try Font Cache and Font Cache 3.0.0 and font cach data clearing but with no luck.

The only way to bring an installed font to my WPF application was to switch the projetc's target .Net version from 3.5 

to 4.8

Don't know if its my case only or common issue in .Net 3.5 but hope it will help someone at some time

Thank you ;)