QUESTION
In C# or VB.NET, under WinForms class library or WPF, and without requiring 3rd party applications or APIs, I would like to know how to retrieve the title of a text font file, in the same way as it is shown when doing right click on a text font file and going to the details property page.
In other words, I need to obtain the exact name as which the font will be registered in the Windows Registry, which is not the same name as gives me the System.Drawing.FontFamily.Name
property neither the System.Drawing.Font.Name
property.
RESEARCH
There are some questions in StackOverflow about how to get the font name, like this and this, but none for the font title.
Nothing of that could help me. I'll give an example of the difference:
I have a true type font file with file name "OpenSans-Light.ttf", which in the details property page is shown as "Open Sans Light", but using a System.Drawing.FontFamily
based solution i get the name "Open Sans".
Then, after I've seen that maybe .NET Framework (WindowsForms) class library does not provide a functionality to obtain the font title, I tried to discover which function from the Windows API could be using the windows shell extension of the file details property sheet to obtain the font title...
...I found nothing about it, no information, nothing of nothing, just the GetFontData function which does not provides me the info that I need.