Recent

Author Topic: Default font embedded  (Read 334 times)

dasa2

  • New member
  • *
  • Posts: 9
Default font embedded
« on: February 06, 2023, 09:47:08 pm »
From Delphi im used to use TApplication.DefaultFont is there an equivalent in Lazarus?
I have several forms so putting Font.Name on each one and use PartentFont gets messy quick.
I also want to embedd the font as a resource, what is the correct way to then use the font in the application?

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2007
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Default font embedded
« Reply #1 on: February 06, 2023, 10:03:16 pm »
For what OS?
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

dasa2

  • New member
  • *
  • Posts: 9
Re: Default font embedded
« Reply #2 on: February 06, 2023, 10:06:22 pm »

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2007
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Default font embedded
« Reply #3 on: February 06, 2023, 10:16:26 pm »
For Windows I made and published here a wrapper available to download.
You need to set the font when you create the form(s) (for auto-updating controls, parentfont must be set to true ofc.)
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

 

TinyPortal © 2005-2018