Listing All Installed Font Families

To get a list of all available font families on your system, you can load the .NET drawing library and then ask the InstalledFontCollection for all font families:

[System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") | Out-Null
(New-Object System.Drawing.Text.InstalledFontCollection).Families

You can easily use this to check whether a specific font family is available, too:

[System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") | Out-Null
$families = (New-Object System.Drawing.Text.InstalledFontCollection).Families
$families -contains "Wingdings"

Posted Jul 24 2009, 08:00 AM by ps1
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.