Better font installation
This commit is contained in:
@@ -220,19 +220,22 @@ if ($Flags.FontsEnabled)
|
|||||||
Write-Divider
|
Write-Divider
|
||||||
Write-Host "Installing Fonts"
|
Write-Host "Installing Fonts"
|
||||||
Set-Location ~
|
Set-Location ~
|
||||||
Remove-Item ~\fonts | Out-Null
|
|
||||||
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/JetBrainsMono.zip
|
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/JetBrainsMono.zip
|
||||||
mkdir ~\fonts
|
mkdir ~\fonts
|
||||||
Copy-Item ~\JetBrainsMono.zip ~\fonts\JetBrainsMono.zip
|
Copy-Item ~\JetBrainsMono.zip ~\fonts\JetBrainsMono.zip
|
||||||
Set-Location ~\fonts | Out-Null
|
Set-Location ~\fonts | Out-Null
|
||||||
unzip JetBrainsMono.zip
|
unzip JetBrainsMono.zip
|
||||||
Remove-Item JetBrainsMono.zip
|
Remove-Item JetBrainsMono.zip
|
||||||
$UserFonts = "$env:LOCALAPPDATA\Microsoft\Windows\Fonts"
|
$FontsPath = "~\fonts"
|
||||||
New-Item -ItemType Directory -Path $UserFonts -Force | Out-Null
|
|
||||||
Get-ChildItem -Filter *.ttf | ForEach-Object {
|
$shell = New-Object -ComObject Shell.Application
|
||||||
Invoke-Item $_.FullName
|
$fonts = $shell.Namespace(0x14)
|
||||||
|
|
||||||
|
Get-ChildItem $FontsPath -Include *.ttf,*.otf -File | ForEach-Object {
|
||||||
|
$fonts.CopyHere($_.FullName)
|
||||||
}
|
}
|
||||||
Set-Location ~
|
Set-Location ~
|
||||||
|
Remove-Item ~\fonts -Force -Recurse| Out-Null
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Divider
|
Write-Divider
|
||||||
|
|||||||
Reference in New Issue
Block a user