Typeface identification

Jonathan Kew jfkthame at gmail.com
Wed Apr 26 18:24:50 CEST 2023

On 26/04/2023 15:42, Peter Flynn wrote:
> On 26/04/2023 11:38, Jonathan Kew wrote:
>> On 26/04/2023 10:10, Peter Flynn wrote:
>>> [...] but Raleway (for example) has no indication that I can find
>>> that it is a sans-serif typeface.
>> In theory, for OpenType fonts you should be able to determine this 
>> from the panose classification values in the OS/2 table.
> Ooooh. I love being proved wrong! Thank you. I'm only just beginning to 
> use OT fonts, so I hadn't come across this.
>> And looking at Raleway, it does indeed identify itself as sans-serif:
> Is there a command-line tool that extracts panose data?

The example I showed was extracted using TTX, from the python FontTools 
package,[1] Dump the OS/2 table with a command like:

     ttx -t 'OS/2' Raleway-Regular.otf

to get an XML file "Raleway-Regular.ttx". Then I looked through the 
Monotype github pages[2] to see what the numbers mean, and added those 

- JK

[1] https://github.com/fonttools/fonttools
[2] https://monotype.github.io/panose/pan2.htm

> I can see 
> several tools to *edit* it, and tools like panosifier that you have to 
> embed in a Python script, but not a simple extracter. neither fc-list 
> nor otfinfo make any mention of panose.
>>      <panose>
>>        <bFamilyType value="2"/>        Latin Text
>>        <bSerifStyle value="11"/>       Normal Sans
>>        <bWeight value="5"/>            Book
>>        <bProportion value="3"/>        Modern
>>        <bContrast value="3"/>          Very Low
>>        <bStrokeVariation value="1"/>   No Fit
>>        <bArmStyle value="1"/>          No Fit
>>        <bLetterForm value="6"/>        Normal/Rounded
>>        <bMidline value="0"/>           Any
>>        <bXHeight value="3"/>           Constant/Standard
>>      </panose>
>> However, I wouldn't trust the panose data to be accurate/meaningful 
> That's another whole problem. Metadata isn't a concern for most makers.
>> many of the fonts out there in the world... maybe some heroic person 
>> would care to do (or has done) a survey to see how often these values 
>> are set reasonably by designers/vendors.
> I can certainly do it for the fonts I'm dealing with from the LaTeX Font 
> Catalog if I can find a tool to extract the data in a manipulable form 
> (XML would be perfect).
> Peter

More information about the tex-live mailing list.