Skip to content

Commit

Permalink
[FREETYPE][NTGDI] Use Face->num_faces instead of ttc_header.count (re…
Browse files Browse the repository at this point in the history
…actos#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.
  • Loading branch information
katahiromz authored Jan 20, 2025
1 parent d72864d commit d4f283b
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions win32ss/gdi/ntgdi/freetype.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d4f283b

Please sign in to comment.