A question about fonts (500 points)

Posted on 2009-04-17
Last Modified: 2013-11-27
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
Question by:jindalee
    LVL 18

    Expert Comment

    The font class exposes some details
    LVL 12

    Expert Comment

    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

    LVL 1

    Author Comment

    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 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.)
    LVL 12

    Accepted Solution

    Hmm I dont know of any libraries that read the font extensions, but here is a few links that might help

    Font Specification

    some C code that can read TTF header data
    LVL 1

    Author Closing Comment

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
    More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now