Skip to content

Instantly share code, notes, and snippets.

@matthewjberger
Last active January 5, 2021 14:29
Show Gist options
  • Save matthewjberger/101c504d6d65183507093f2322721655 to your computer and use it in GitHub Desktop.
Save matthewjberger/101c504d6d65183507093f2322721655 to your computer and use it in GitHub Desktop.
Lists all installed TrueType fonts on Windows
# Displays all installed truetype font names in their corresponding font in a browser
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
$objFonts = New-Object System.Drawing.Text.InstalledFontCollection
$colFonts = $objFonts.Families
foreach ($objFont in $colFonts)
{
$strHTML = $strHTML + "<font size='5' face='" + $objFont.Name + "'>" + $objFont.Name + "</font><br>"
}
$strHTML | Out-File output.html
Invoke-Expression ./output.html
(New-Object System.Drawing.Text.InstalledFontCollection).Families
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment