freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] TTF Descriptor


From: Tomasz Jamroszczak
Subject: Re: [ft] TTF Descriptor
Date: Wed, 01 Mar 2017 19:46:31 +0100
User-agent: Opera Mail/1.0 (Win32)

W dniu .02.2017 o 05:01 Werner LEMBERG <address@hidden> pisze:


        When I use FontForge for a font, I can see in a field
        "Descriptor" in TTF Properties comment from the font file,
        such as "Generated using IcoMoon".  I would like to get that
        comment using FreeType (I want to know whether the font was
        generated by such tools).  I think that "Descriptor"
        information is close to font family name and font name.  Is it
        possible to get that information?

First of all, do

  grep 'Generated using IcoMoon' <your TTF>

If you get a result, the information should be retrievable.  IIRC,
fontforge uses a small SFNT table (`PfEd' IIRC) to hold such
information.  Note, however, that output of this information can be
suppressed while fontforge is generating a font.

Other tools add some information to the font's `name' table, and maybe
fontforge does the same.  In other words, there is more than a single
place where fontforge might add such information – if such information
isn't suppressed.

The `PfEd' table can be extracted with `FT_Load_Sfnt_Table'; however,
you have to do the parsing by yourself.  Data from the `name' table is
available via `FT_Get_Sfnt_Name'.

OK, iterating over all the names using FT_Get_Sfnt_Name_Count + FT_Get_Sfnt_Name is enough to get that information. Thanks.

Best Regards,
Tomasz Jamroszczak



reply via email to

[Prev in Thread] Current Thread [Next in Thread]