Skip to content

Commit ae23753

Browse files
committed
font support in nsis
1 parent eada03a commit ae23753

File tree

8 files changed

+11
-260
lines changed

8 files changed

+11
-260
lines changed

windows/FontName-0.7.exe

77.7 KB
Binary file not shown.

windows/Inter/Inter.ttc

-12.6 MB
Binary file not shown.
-889 KB
Binary file not shown.

windows/Inter/LICENSE.txt

Lines changed: 0 additions & 92 deletions
This file was deleted.

windows/Inter/help.txt

Lines changed: 0 additions & 165 deletions
This file was deleted.

windows/deploy.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,8 @@ cp -rnv /mingw64/share/fontconfig/ ${deploy_dir}/share/
6666
cp -rnv /mingw64/share/GConf/ ${deploy_dir}/share/
6767

6868
# Redacted Script
69-
cp -rnv /mingw64/share/fonts/cantarell ${deploy_dir}/share/fonts
70-
cp -rnv windows/RedactedScript/ ${deploy_dir}/share/fonts/
71-
cp -rnv windows/Inter/ ${deploy_dir}/share/fonts/
69+
mkdir -v ${deploy_dir}/share/fonts
70+
cp -rnv windows/fonts/ ${deploy_dir}/share/
7271

7372
#Regen font cache
7473
#fc-cache -f -v
@@ -91,11 +90,14 @@ EOF
9190
echo "Creating NSIS script..."
9291
cat << EOF > windows/${app_name}-Installer.nsi
9392
!include "MUI2.nsh"
93+
!include FontName.nsh
94+
!include WinMessages.nsh
9495
9596
Name ${app_name}
9697
9798
Outfile "${app_name}-Installer.exe"
9899
InstallDir "\$LOCALAPPDATA\\Programs\\${app_name}"
100+
99101
# RequestExecutionLevel admin ; Request administrative privileges
100102
RequestExecutionLevel user
101103
@@ -181,6 +183,12 @@ Section "Install"
181183
File /r "deploy\\*"
182184
CreateDirectory \$SMPROGRAMS\\${app_name}
183185
186+
; fonts
187+
StrCpy $FONT_DIR $FONTS
188+
!insertmacro FontName "\$INSTDIR\\share\\fonts\\RedactedScript-Regular.ttf"
189+
!insertmacro FontName "\$INSTDIR\\share\\fonts\\InterVariable.ttf"
190+
SendMessage ${HWND_BROADCAST} ${WM_FONTCHANGE} 0 0 /TIMEOUT=5000
191+
184192
; Start menu
185193
CreateShortCut "\$SMPROGRAMS\\${app_name}\\${app_name}.lnk" "\$INSTDIR\bin\\${exe_name}" "" "\$INSTDIR\\${icon_file/\//\\}" 0
186194
File renamed without changes.

0 commit comments

Comments
 (0)