Solved

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

Posted on 2009-04-09
6
1,249 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
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…

810 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