Link to home
Start Free TrialLog in
Avatar of jindalee
jindalee

asked on

A question about fonts (500 points)

Does Visual Studio 2008 (VB) provide any methods for extracting font details and properties?

I know that I can use fontstyle to get "Regular", "Italis" etc.

What I am looking for is any methods for extracting such details as font family, font metrics, description, trademarks etc
Avatar of UnifiedIS
UnifiedIS

The font class exposes some details
to get a list of all installed fonts on the system you can use:
System.Drawing.Text.InstalledFontCollection c = new System.Drawing.Text.InstalledFontCollection();
foreach( System.Drawing.FontFamily f in c.Families)
{
   // query about each here
}

Open in new window

Avatar of jindalee

ASKER

Thank you wht1986.

I can use the InstalledFontCollection to get some of the detail I have t get such as family and metrics. However, for the project upon whic I am working, these details are of less importance than details such as embedded descriptions, licences, trademarks, copyright etc.

Microsoft provides a tool that shows the sort of stuff I have to collect for the project. The tool is at http://www.microsoft.com/typography/PropertiesEditor.mspx. Unfortunately I cannot find anything on the MS sites that describe how to get at the information embedded in the font file.

The attached images show examples of the sort of stuff you can extract extract. (They are snapshots of the MS tool to which I refer.)
fontproperties.jpg
fontproperties2.jpg
fontproperties3.jpg
ASKER CERTIFIED SOLUTION
Avatar of wht1986
wht1986
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you. The link yp coderproject does the trick. The author of that article nor only explains ttfs fonts but provides code, albeit in C that I'll need to translate.