Jump to content

How can I embed fonts within my script?

Recommended Posts

My GUI app uses some open source/free fonts that aren't commonly found in other user's systems. I'd like to embed them into my compiled script, much like an image file converted by binary by tools such as BinaryToAu3Kompressor.exe, so that when I distribute my app, I don't have to include font files and the like but only the executable.

Is there an AutoIt-recommended procedure for doing this?  I suppose I could use BinaryToAu3Kompressor.exe on the TTF. files or whatever, but I'm not sure that will work correctly.

Once I have the fonts I need in binary format, I plan to use one of the _WinApi or GDI+ funcs to re-substantiate the binary data into a working font structure...

I'm eager to hear your advice and recommendations.


Link to comment
Share on other sites

Look at the section " Display Font from Memory: " how to load a TTF from memory.

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

i once had to to that, i included the fonts in the distributable, but i could have easily used FileInstall. at run time i used _WinAPI_AddFontResourceEx to load the font for use. seems to be the simplest approach for me.

Signature - my forum contributions:



LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates


Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...