Skip to content

Commit

Permalink
TTF_MeasureText: measure strings ended with more than one space (Bug …
Browse files Browse the repository at this point in the history
…4515)
  • Loading branch information
1bsyl committed Apr 23, 2019
1 parent cb70fd7 commit ae7ab60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SDL_ttf.c
Expand Up @@ -2626,7 +2626,7 @@ static int TTF_Size_Internal(TTF_Font *font,

/* Measurement mode */
if (measure_width) {
int cw = maxx - minx;
int cw = SDL_max(maxx, FT_FLOOR(x + prev_advance)) - minx;
if (cw >= measure_width) {
break;
}
Expand Down

0 comments on commit ae7ab60

Please sign in to comment.