[RESOLVED] Is there a way to check for a specific font?
Let's say I had an app which needed a specific font (which I do, in my case "small fonts") and I want to make it so that the program checks to see if this font is available on the target PC and, if not, bring up a msgbox with details of what font is needed and then terminate on clicking "EXIT" in the msgbox.
Is there any way of checking for a specific font in the system?
Re: Is there a way to check for a specific font?
Why don't you simply install the font along with your application? :confused:
Re: Is there a way to check for a specific font?
Code:
Dim i As Long
For i = 0 To Screen.FontCount - 1
Debug.Print i, Screen.Fonts(i)
Next
Re: Is there a way to check for a specific font?
Use Screen.Fonts
Code:
Private Function FontExists(FontName As String) As Boolean
Dim strC As String, intLoop As Integer
strC = LCase$(FontName)
For intLoop = 0 To Screen.FontCount - 1
If LCase$(Screen.Fonts(intLoop)) = strC Then
FontExists = True
Exit For
End If
Next intLoop
End Function
Re: Is there a way to check for a specific font?
That seems to work...thank you both! (rated, of course!)