FT_STYLE_FLAG_ITALIC may be incorrectly set
From OpenType Specification:
Bit 9:
If bit 9 is set, then this font is to be considered an “oblique” style by processes which make a distinction between oblique and italic styles, such as Cascading Style Sheets font matching. For example, a font created by algorithmically slanting an upright face will set this bit.
If a font has a version 4 or later OS/2 table and this bit is not set, then this font is not to be considered an “oblique” style. For example, a font that has a classic italic design will not set this bit.
This bit, unlike the ITALIC bit (bit 0), is not related to style-linking in applications that assume a four-member font-family model comprised of regular, italic, bold and bold italic. It may be set or unset independently of the ITALIC bit. In most cases, if OBLIQUE is set, then ITALIC will also be set, though this is not required.
The code in src/sfnt/sfobjs.c
(permlink)
if ( face->os2.fsSelection & 512 ) /* bit 9 */
flags |= FT_STYLE_FLAG_ITALIC;
else if ( face->os2.fsSelection & 1 ) /* bit 0 */
flags |= FT_STYLE_FLAG_ITALIC;
sets the FT_STYLE_FLAG_ITALIC when meet the Bit 9, which may produce some issue when using some fonts. A few of fonts may set this bit in a Regular font, and set both Bit 0 in the Italic font of the same family, which means the Regular style is designed to be slant and the Italic style looks more slant; or, in some circumstance, Oblique style is designed to be different from the Italic style, and installed to the system at the same time. This may affect the font chooser of applications, which may find nothing when looking for a Regular style font (scene 1); or may omit the Oblique style font.
This code affects Fontconfig's font picker. Ref permlink.