DEV Community

vblover programmer
vblover programmer

Posted on

(VB .Net): Using Local Font Files

#vb
Imports System.Drawing.Text
Public Class Form1
    Dim Collection As New PrivateFontCollection
     Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        For Each File As String In IO.Directory.GetFiles(".\Fonts", "*.ttf")
            Collection.AddFontFile(File)
        Next
        Me.Font = New Font(Collection.Families(0), 12, FontStyle.Bold)
        Me.Label2.Font = New Font(Collection.Families(1), 12, FontStyle.Bold)
    End Sub
End Class
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more