Based on this StackOverflow answer, I wrote this PowerShell script:
$charId = [Int32][char]$args[0]
[System.Reflection.Assembly]::LoadWithPartialName("PresentationCore") | Out-Null
[System.Windows.Media.Fonts]::GetFontFamilies("C:\Windows\Fonts") | ForEach-Object {
foreach ($face in $_.GetTypefaces()) {
$glyph = $null
$face.TryGetGlyphTypeface([ref]$glyph) | Out-Null
if ($glyph -and $glyph.CharacterToGlyphMap.TryGetValue($charId, [ref]0)) {
$_.Source.Split("#")[1]
break
}
}
}
Save it as a file with a ps1
extension; I called it fonttest.ps1
.
Before PowerShell will let you run scripts, you'll need to do Set-ExecutionPolicy Unrestricted -Scope CurrentUser
. Then you can run it like so:
.\fonttest.ps1 你
The .\
is important, and you'll need to be in the same directory as where you saved the script. That last character is the one you want to test all fonts for. You'll get a printout of all font families that have a glyph for that character. On my computer, the above command produced this:
Microsoft JhengHei
Microsoft JhengHei UI
Microsoft YaHei
Microsoft YaHei UI
Yu Gothic
MS Mincho
MS PMincho
DFKai-SB
SimHei
KaiTi
SimSun
NSimSun
Meiryo
Meiryo UI
MS Gothic
MS UI Gothic
MS PGothic
FangSong
Yu Mincho
MingLiU
PMingLiU
MingLiU_HKSCS
Arial Unicode MS
Adobe Fangsong Std
Adobe Fan Heiti Std
Adobe Heiti Std
Adobe Kaiti Std
Kozuka Gothic Pro
Kozuka Mincho Pro
Adobe Ming Std
Adobe Song Std
Kozuka Gothic Pr6N
Kozuka Mincho Pr6N
DengXian
Microsoft MHei