Windows – Get actual Font name of TTF file from Command Line

cmd.execommand linefontswindows

It seems like an easy question, how can I get the actual name of font from command line.

Here is an example. The font filename is segoesc.ttf. However, the actual name of font that shows up in the Font Menu is Segoe Script.

enter image description here

What I have tried:

  1. There is a python script out there, that can get the font name. But I prefer not to have Python dependency.

  2. Right clicking on Fontfile and go to Properties > Details, gives me the list of properties. I tried to use wmic but it does not show Title property.

wmic datafile "c:\Windows\fonts\segoesc.ttf" get Title

Thanks.

Best Answer

In PowerShell:

(New-Object -TypeName Windows.Media.GlyphTypeface -ArgumentList 'C:\Windows\Fonts\segoesc.ttf').Win32FamilyNames.Values

Returns Segoe Script

Credit to Samuel Leslie and PSWinGlue.

Related Question