System.Drawing.Font & System.Drawing.FontFamily
 Private Sub DrawFont()
        Dim fam As FontFamily
        Dim fnt As Font
        Dim g As Graphics
        Dim brsh As System.Drawing.Brush
        brsh = Brushes.DarkGreen
        g = pb1.CreateGraphics
        fam = New FontFamily(GenericFontFamilies.SansSerif)
        fnt = New Font(fam, 12, FontStyle.Bold)
        g.DrawString("Generic SanSerif bold font", fnt, brsh, 100, 138)
        fnt = New Font(fam, 12, FontStyle.Italic)
        brsh = Brushes.DarkViolet
        g.DrawString("Generic SanSerif italic font", fnt, brsh, 100, 178)
    End Sub

The simplest possible DrawString using different FontStyles on each example, FontStyle.Bold and FontStyle.Italic.

All of the regular font styles are available that are available elsewhere, such as Underline and StrikeThrough.

Be sure to include "Imports System.Drawing.Text"

You may need a Try statement to catch the error when the Font is unavailable on the machine.


GenericFontFamilies should be available and can be assigned if another Font Family raises an exception

10/18/2015
TheLonelyProgrammer.Net
Alone in a sea of non-programmers