[FREETYPE][NTGDI] Use Face->num_faces instead of ttc_header.count (#7646)

Supporting raster fonts. Using
num_faces is the generic way.
JIRA issue: CORE-16165
- Use FT_FaceRec.num_faces instead
  of TT_Face.ttc_header.count in
  counting the font faces in
  IntGdiLoadFontsFromMemory function.
This commit is contained in:
Katayama Hirofumi MZ 2025-01-20 22:09:16 +09:00 committed by GitHub
parent d72864de95
commit d4f283b67b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1986,17 +1986,10 @@ IntGdiLoadFontsFromMemory(PGDI_LOAD_FONT pLoadFont,
if (FontIndex == -1)
{
if (FT_IS_SFNT(Face))
FT_Long iFace, num_faces = Face->num_faces;
for (iFace = 1; iFace < num_faces; ++iFace)
{
TT_Face TrueType = (TT_Face)Face;
if (TrueType->ttc_header.count > 1)
{
FT_Long i;
for (i = 1; i < TrueType->ttc_header.count; ++i)
{
FaceCount += IntGdiLoadFontsFromMemory(pLoadFont, NULL, i, -1);
}
}
FaceCount += IntGdiLoadFontsFromMemory(pLoadFont, NULL, iFace, -1);
}
FontIndex = 0;
}