Results 1 to 5 of 5

Thread: Adding new font

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2021
    Posts
    19

    Adding new font

    Hello. Is there any way to add a .ttf file here?

    Name:  font.jpg
Views: 304
Size:  16.0 KB

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,464

    Re: Adding new font

    You can add a font to your application, but not to the system fonts collection

  3. #3
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,464

    Re: Adding new font

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

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Oct 2021
    Posts
    19

    Re: Adding new font

    I see. Thank you.

  5. #5
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,464

    Re: Adding new font

    You can add to your windows fonts collection, but it’s not done in vb…

    https://www.barcodefaq.com/knowledge-base/ttf-install/

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width