views:

248

answers:

1

I'm working on an app that requires a particular barcode true type font that is unlikely to be on the user's PC.

Can I somehow embed the font in the app, or do I need to use the installer to install the font?

+3  A: 

Yes, you can save it as a resource in the EXE file, and on user's pc, you can extract it as a file using a TResourceStream instance. Then you can call AddFontResource API function. At last, you should send a WM_FONTCHANGE message to all top-level windows in the system (Check Remark section of AddFontResource description in MSDN website).

If you need an example code, let me know.

vcldeveloper
Be aware that you might break some copyright laws or license restrictions, if you do not have the redistribution rights for this font.
Warren P