Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1366
  • Last Modified:

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

Hi,

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

0
cybeh
Asked:
cybeh
  • 3
  • 2
1 Solution
 
cybehAuthor Commented:
http://www.developerfusion.com/code/189/truetype-font/ <- this is design for VB but not VB.NET.
0
 
cybehAuthor Commented:
http://aspalliance.com/318_Loading_a_true_type_font_with_GDI <- this is just loading True Type Font, but it's not checking if the input font is a valid true type font or not.

Thanks.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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