freetype
[Top][All Lists]
Advanced

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

Re: [ft] How do you reference FreeType family names via HTML CSS?


From: Werner LEMBERG
Subject: Re: [ft] How do you reference FreeType family names via HTML CSS?
Date: Thu, 25 Jul 2013 08:46:10 +0200 (CEST)

> For example, when I open the font HelveticaLTStd-BlkCond.ttf with
> FreeType, it sets the family_name to "Helvetica Lt Std" and the
> style_name to "Condensed Black". As far as I know, CSS doesn't
> provide any means to address such a font, as the CSS font-style
> property is limited to one of three values: normal, italic,
> oblique. So the "Condensed Black" property is invisible to CSS. I've
> looked at the .ttf file in FontLab and found that it has two "Family
> Name" values, and one of them is what would work ("Helvetica Lt Std
> Cnd Blk"), but FreeType doesn't provide this family name.

You have to handle that by yourself, based on the entries in the name
ID values in TTF's `name' table (to be accessed with
`FT_Get_Sfnt_Name').

  http://www.microsoft.com/typography/otspec/name.htm

Maybe ID 6, the PostScript name for the font, works for you.  Another
possibility is accessing the WWS data (IDs 21 and 22).

Unfortunately, it's a very tricky business.


    Werner



reply via email to

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