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 May 23, 2019
1 parent 3368500 commit 2c5e1f9
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 @@ -661,8 +661,8 @@ font_getsize(FontObject* self, PyObject* args)

FT_Get_Glyph(face->glyph, &glyph);
FT_Glyph_Get_CBox(glyph, FT_GLYPH_BBOX_SUBPIXELS, &bbox);
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 2c5e1f9

Please sign in to comment.