From b886e6fe1cab695a4247cb724729d8c349c9abdd Mon Sep 17 00:00:00 2001 From: Fini Jastrow Date: Fri, 28 Apr 2023 18:47:36 +0200 Subject: [PATCH] Revert "Feature: Add -WindowsCompatibleOnly switch parameter to install.ps1" [why] We do not have specific Windows Compatible fonts anymore. All fonts are Windows Compatible now. This reverts commit 539eb92138f65f68bbc87b51626b7be62f652e69. --- install.ps1 | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/install.ps1 b/install.ps1 index d985a7085..bfea03a81 100644 --- a/install.ps1 +++ b/install.ps1 @@ -11,19 +11,13 @@ .EXAMPLE C:\PS> ./install.ps1 FiraCode, Hack Installs all the FiraCode and Hack fonts. -.EXAMPLE - C:\PS> ./install.ps1 CascadiaCode -WindowsCompatibleOnly - Filters fonts to include only those labeled as 'Windows Compatible' - Can be used in combination with the -FontName and/or -WhatIf parameters .EXAMPLE C:\PS> ./install.ps1 DejaVuSansMono -WhatIf Shows which fonts would be installed without actually installing the fonts. Remove the "-WhatIf" to install the fonts. #> [CmdletBinding(SupportsShouldProcess)] -param ( - [switch]$WindowsCompatibleOnly -) +param () dynamicparam { $Attributes = [Collections.ObjectModel.Collection[Attribute]]::new() @@ -50,17 +44,8 @@ end { Join-Path $PSScriptRoot patched-fonts | Push-Location foreach ($aFontName in $FontName) { - Get-ChildItem $aFontName -Recurse | Where-Object { - $IsValidFileExtension = $_.Extension -match 'ttf|otf' - - if ($WindowsCompatibleOnly) { - $IsValidFileExtension -and ($_.BaseName -match 'Windows Compatible') - } else { - $IsValidFileExtension - } - } | ForEach-Object { - $fontFiles.Add($_) - } + Get-ChildItem $aFontName -Filter "*.ttf" -Recurse | Foreach-Object {$fontFiles.Add($_)} + Get-ChildItem $aFontName -Filter "*.otf" -Recurse | Foreach-Object {$fontFiles.Add($_)} } Pop-Location