Solved

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

Posted on 2009-04-09
6
1,228 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
Comment Utility
0
 
LVL 1

Author Comment

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

Author Comment

by:cybeh
Comment Utility
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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 9

Expert Comment

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

Author Comment

by:cybeh
Comment Utility
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
Comment Utility
FontFamilies only enumerates TrueType fonts.  Screen and plotter fonts are not supported.  Thus, no action is required.

0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This video discusses moving either the default database or any database to a new volume.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

763 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

10 Experts available now in Live!

Get 1:1 Help Now