Is there an easy way (in .Net) to test if a Font is installed on the current machine?
To check if the font is installed, press Windows key+Q then type: fonts then hit Enter on your keyboard. You should see your fonts listed in the Font Control Panel. If you don't see it and have a ton of them installed, type in its name in the search box to find it. That's all there is to it.
View Installed Fonts In Windows 10 or 11, type Control Panel in the search field and select it from the results. With Control Panel in Icon View, click the Fonts icon. Windows displays all the installed fonts.
Windows 11 has a specialized folder in which it stores its system fonts. The default location of this folder is C:\\Windows\Fonts. If you installed Windows 11 on a separate disk, you'll need to navigate to the Windows folder in that drive and look for the Fonts folder.
string fontName = "Consolas"; float fontSize = 12; using (Font fontTester = new Font( fontName, fontSize, FontStyle.Regular, GraphicsUnit.Pixel)) { if (fontTester.Name == fontName) { // Font exists } else { // Font doesn't exist } }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With