How to install a windows font using C#
You’ll need a different approach installing fonts. Use an installer (create a setup project) to install the fonts Another (more easy) approach using a native method. Declare the dll import: [DllImport(“gdi32.dll”, EntryPoint=”AddFontResourceW”, SetLastError=true)] public static extern int AddFontResource( [In][MarshalAs(UnmanagedType.LPWStr)] string lpFileName); In your code: // Try install the font. result = AddFontResource(@”C:\MY_FONT_LOCATION\MY_NEW_FONT.TTF”); error = Marshal.GetLastWin32Error(); … Read more