Skip to content

Commit

Permalink
Change direction of y offset in calculating size
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Jun 19, 2019
1 parent be1b551 commit fb38296
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Binary file modified Tests/images/test_y_offset.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/_imagingft.c
Expand Up @@ -686,8 +686,8 @@ font_getsize(FontObject* self, PyObject* args)
x_max -= offset;
}

bbox.yMax -= glyph_info[i].y_offset;
bbox.yMin -= glyph_info[i].y_offset;
bbox.yMax += glyph_info[i].y_offset;
bbox.yMin += glyph_info[i].y_offset;
if (bbox.yMax > y_max)
y_max = bbox.yMax;
if (bbox.yMin < y_min)
Expand Down

0 comments on commit fb38296

Please sign in to comment.