Solved

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

Posted on 2009-04-09
6
1,233 Views
Last Modified: 2013-11-26
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
Comment
Question by:cybeh
  • 3
  • 2
6 Comments
 
LVL 9

Expert Comment

by:Deathrace
ID: 24109188
0
 
LVL 1

Author Comment

by:cybeh
ID: 24109231
http://www.developerfusion.com/code/189/truetype-font/ <- this is design for VB but not VB.NET.
0
 
LVL 1

Author Comment

by:cybeh
ID: 24109261
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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 9

Expert Comment

by:Deathrace
ID: 24114173
sorry for that, i hope you might get some hints from those urls so i suggested.
0
 
LVL 1

Author Comment

by:cybeh
ID: 24114258
It's okay. Just that I tried that VB6 solution before and trying to convert to .NET, but no luck.
0
 
LVL 5

Accepted Solution

by:
JMoon5FTM earned 500 total points
ID: 24174852
FontFamilies only enumerates TrueType fonts.  Screen and plotter fonts are not supported.  Thus, no action is required.

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
A short film showing how OnPage and Connectwise integration works.
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now