Here is one solution: C #:
public partial class Form1 : Form { public Form1() { SetFontFinal(); InitializeComponent(); }
And here is one method in VB:
Public Function FontExists(FontName As String) As Boolean Dim oFont As New StdFont Dim bAns As Boolean oFont.Name = FontName bAns = StrComp(FontName, oFont.Name, vbTextCompare) = 0 FontExists = bAns End Function
source share