dotfiles/win/Modules/Font/Font.psm1
2021-01-17 16:50:51 +08:00

19 lines
439 B
PowerShell

function Get-Font{
[CmdletBinding()]
param(
[string] $keyword
)
[System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
$families = (New-Object System.Drawing.Text.InstalledFontCollection).Families
foreach ($family in $families) {
if (-not $keyword || $family.Name.Contains($keyword)) {
echo $family.Name
}
}
}
Export-ModuleMember -Function Get-Font