Solved

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

Posted on 2009-04-09
6
1,255 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
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

829 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