[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] Font style not not shown properly
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] Font style not not shown properly |
Date: |
Tue, 25 Aug 2015 11:16:29 +0200 (CEST) |
> We are using FreeType for reading fonts for our SaaS based
> application. It worked fine on all fonts till now. But now its
> creating trouble with some fonts, attached is a font file which
> didn't worked properly. Problem is that FreeType return style value
> "Regular" but actually its style is "BlackItalic". A screenshot of
> values that FreeType function FT_Get_Sfnt_Name returns in
> FT_SfntName object is attached. First i thought that problem could
> be with the font file. But Microsoft word and notepad are showing
> correct style (i.e. BlackItalic). So can you please analyze this
> font and provide any help in this regard.
FreeType's return value is correct: The font's sub-family is `Regular'
in its `name' table.
As far as I know, Microsoft uses a database to get proper sub-family
names of common old fonts that don't fit the classical
Regular-Bold-Italic-BoldItalic scheme, and which lack the extended,
newer entries in the `name' table (cf. IDs 16, 17, 21, and 22).
If you really need such functionality for very old fonts you have to
also maintain such a database.
Werner