Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1379
  • Last Modified:

How to detect if the font is a true type font by using VB.NET?


We are trying to load all the true type font font name inside the user system into a combo box.
We manage to work until the code as below, but, may I know how can we check if the font is a true type font?

Please advice.

For Each font As FontFamily In FontFamily.Families
                If (font.IsStyleAvailable(FontStyle.Regular)) Then
                      ' Do some code here
                End If
            Next font

Open in new window

  • 3
  • 2
1 Solution
cybehAuthor Commented: <- this is design for VB but not VB.NET.
cybehAuthor Commented: <- this is just loading True Type Font, but it's not checking if the input font is a valid true type font or not.

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

sorry for that, i hope you might get some hints from those urls so i suggested.
cybehAuthor Commented:
It's okay. Just that I tried that VB6 solution before and trying to convert to .NET, but no luck.
FontFamilies only enumerates TrueType fonts.  Screen and plotter fonts are not supported.  Thus, no action is required.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now