Visual Basic 2010 FontDialog And TrueType Fonts

450 views
Skip to first unread message

Demonicpagan

unread,
Oct 11, 2011, 9:14:11 PM10/11/11
to dotnetde...@googlegroups.com
I am working on a project where I allow the user to set their font, however, the issue I am running into is if I choose a font such as Minion Pro which is not a TrueType font, I am presented with the lovely error of "Only TrueType fonts are supported. This is not a TrueType font." How do I go about only having my FontDialog control only display TrueType system fonts so a user doesn't select anything other. Thanks for any assistance anyone may be able to provide me.

    Private Sub SelectFont(ByVal IncomingFont As Font)
        ' Allow user to change Title Input Text font

        With FontDialog1
            ' Set initial font
            .Font = IncomingFont
            .AllowScriptChange = False
            .ShowColor = True
            .ShowApply = True
            .ShowDialog()
        End With
    End Sub

Demonicpagan

unread,
Oct 27, 2011, 9:06:43 AM10/27/11
to dotnetde...@googlegroups.com
Does anyone know?

Peter Smith

unread,
Nov 9, 2011, 3:54:21 PM11/9/11
to dotnetde...@googlegroups.com
On Thu, Oct 27, 2011 at 9:06 AM, Demonicpagan <demoni...@gmail.com> wrote:
> Does anyone know?
>

I'm sure SOMEONE knows.

Peter Smith

unread,
Nov 9, 2011, 3:56:14 PM11/9/11
to dotnetde...@googlegroups.com

I'm also sure that typing 'fontcontrol only truetype' into a google
search box brought me to:

http://stackoverflow.com/questions/6302454/c-sharp-setting-fontdialog-to-only-display-truetype-fonts

and it's taken me longer to type this, than it took to find it. Looks
like SOMEBODY knows. :)

Demonicpagan

unread,
Nov 10, 2011, 2:06:12 PM11/10/11
to dotnetde...@googlegroups.com
Will what you posted work in a VB.net instance. That link is for a C# explanation and I no experience in C# when it comes to that language.
Reply all
Reply to author
Forward
0 new messages