Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Test if a Font is installed

Is there an easy way (in .Net) to test if a Font is installed on the current machine?

like image 595
GvS Avatar asked Sep 22 '08 09:09

GvS


People also ask

How do you check a font is installed or not?

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.

How do I find my fonts in Windows 10?

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.

Where are fonts stored Windows 11?

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.


1 Answers

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     } } 
like image 119
Jeff Hillman Avatar answered Oct 07 '22 06:10

Jeff Hillman