简体   繁体   中英

Installing Fonts using NSIS

I am installing fonts in my setup application using:

Section "Fonts"
  SetOutPath "$FONTS"
  StrCpy $FONT_DIR $FONTS
    !insertmacro InstallTTFfont '..\FONTS\English\Arial.ttf'
    SendMessage ${HWND_BROADCAST} ${WM_FONTCHANGE} 0 0 /TIMEOUT=5000
SectionEnd

(I have included !include FontReg.nsh and !include FontName.nsh) At times, especially on Win 7(with UAC enabled), the setup progress goes into a non-reponsive mode(progress bar remains frozen at the end of the font installation and setup does not proceed). Is there anything to avoid this scenario?. Kindly help.

Thanks, Bomzinho

There is some macros dedicated for registering fonts available on the NSIS wiki. They do a bit more than just copying the .ttf file.

Also you could look at the page on http://nsis.sourceforge.net/Advanced_Font_Installation

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