Scott Scott - 8 months ago 54 Question

Using custom fonts in my winform labels

I wonder if its possible to use a custom font for my form labels without installing it on the users machine? I would like to display a text using a font I have rights to, but its not installed on the potencial user machine.

Are there any solutions for this?


Here is the extract (using PrivateFontCollection):

Dim pfc As New PrivateFontCollection()
pfc.AddFontFile("C:\Path To\PALETX3.ttf")
label1.Font = New Font(pfc.Families(0), 16, FontStyle.Regular)

Converted from here: Load And Use Custom Font Without Installing It.

Also check this: Embedding/deploying custom font in .NET app