Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ brew install font-monaspace
### Windows
You can manually drag the fonts from the `fonts/otf` or `fonts/variable` directory into `C:\Windows\Fonts`. Alternatively, right-click the fonts you want and click Install.

```powershell
$ cd util
$ ./install_windows.sh

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

./install_windows.cmd instead of *.sh

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correction done, code update pushed.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used the script, works great! Hopefully the Monaspace team accepts the PR!

```

### Linux
You can manually drag the fonts from the `fonts/otf` and `fonts/variable` directory into `~/.local/share/fonts`.

Expand Down
28 changes: 28 additions & 0 deletions util/install_windows.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
@echo off

echo Checking for admin rights...
net session >nul 2>&1
if %errorLevel% == 0 (
echo Admin rights granted.
) else (
echo Admin rights required. Please run this script as an administrator.
exit /b 1
)

echo Installing fonts...

set mainFontFolder="./../fonts/otf"

for /r "%mainFontFolder%" %%f in (*.ttf, *.otf, *.woff, *.woff2) do (
copy "%%f" "%WINDIR%\Fonts"
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /v "%%~nxf (TrueType)" /t REG_SZ /d %%~nxf /f
)

set mainFontFolder="./../fonts/varible"

for /r "%mainFontFolder%" %%f in (*.ttf, *.otf, *.woff, *.woff2) do (
copy "%%f" "%WINDIR%\Fonts"
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /v "%%~nxf (TrueType)" /t REG_SZ /d %%~nxf /f
)

echo All fonts installed successfully.