Skip to content

Commit

Permalink
Regression: fix initialization of font->style vs font->face_style
Browse files Browse the repository at this point in the history
  • Loading branch information
1bsyl committed Dec 18, 2018
1 parent ca85a15 commit 4c284c5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions SDL_ttf.c
Expand Up @@ -355,8 +355,6 @@ TTF_Font* TTF_OpenFontIndexRW(SDL_RWops *src, int freesrc, int ptsize, long inde
FT_Set_Charmap(face, found);
}

/* Set the default font style */
font->style = font->face_style;
font->outline = 0;
TTF_SetFontKerning(font, 1);

Expand All @@ -369,6 +367,9 @@ TTF_Font* TTF_OpenFontIndexRW(SDL_RWops *src, int freesrc, int ptsize, long inde
font->face_style |= TTF_STYLE_ITALIC;
}

/* Set the default font style */
font->style = font->face_style;

/* Make sure that our font face is scalable (global metrics) */
if (FT_IS_SCALABLE(face)) {
/* Set the character size and use default DPI (72) */
Expand Down

0 comments on commit 4c284c5

Please sign in to comment.