Mbee

How can I embed fonts within my script?

4 posts in this topic

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.

Thanks!

Share this post


Link to post
Share on other sites



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

1 person likes this

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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

Thanks, Master UEZ!  You've helped me out often, and I greatly appreciate it!

 

Share this post


Link to post
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.

Share this post


Link to post
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