简体   繁体   中英

how to install fonts using inno setup

I want to pre install the fonts for inno setup. I have made a custom inno setup installer with font Aller Light.Now when i run my inno setup for the first time on a client machine. The design is not coming proper due to fonts.. but when installer is run once again then design comes proper.

Just to make it more clear,this font is used in the design of my installer,and not in the application which is deployed using this installer. I just need a way to install the fonts on the client machine before installer executable opens the welcome page,so that design i made for custom setup is proper.

This is a bad idea; it's bad practice to modify the user's system prior to the start of the "real" installation phase. You should strongly consider a redesign to use a system standard font or to use bitmap images of your text in the desired style rather than trying to install a font.

Inno has a mechanism to install a font as part of the installation itself, which will be sufficient for your application (see FontInstall ).

If you really want to go down the bad-practice path, you can probably get something to work with some InitializeSetup code that calls ExtractTemporaryFile and the AddFontResource WinAPI . (Don't forget to send the broadcast message too.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM