Created
July 29, 2016 16:20
-
-
Save matthewjberger/aeda92755012184e94033783027ddf3a to your computer and use it in GitHub Desktop.
PowerShell Font Listing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From https://technet.microsoft.com/en-us/library/ff730944.aspx | |
# This will open an internet explorer window that will display all installed windows font names in their corresponding font. | |
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") | |
$objFonts = New-Object System.Drawing.Text.InstalledFontCollection | |
$colFonts = $objFonts.Families | |
$objIE = New-Object -com "InternetExplorer.Application" | |
$objIE.Navigate("about:blank") | |
$objIE.ToolBar = 0 | |
$objIE.StatusBar = 0 | |
$objIE.Visible = $True | |
$objDoc = $objIE.Document.DocumentElement.LastChild | |
foreach ($objFont in $colFonts) | |
{ | |
$strHTML = $strHTML + "<font size='5' face='" + $objFont.Name + "'>" + $objFont.Name + "</font><br>" | |
} | |
$objDoc.InnerHTML = $strHTML |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This will list all installed windows fonts | |
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") | |
(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