delphifontsresourcesdelphi-2009

How to use external fonts?


Is it possible to use a font directly from resources in Delphi and how?

I have a problem with the very first steps.Example I cannot include Segoe UI Light font in resources of a project,an exception occurs.And that is only if the file's extension is 'ttf'.

If the written above is not possible then how do I use an external font without deploying the font separately(from executable)?

Thanks in advance!


Solution

  • On Windows 2000 and later, you can use AddFontMemResourceEx to install fonts for your process from memory.