8000 Use slightly more correct types for FreeType. · matplotlib/matplotlib@c404b9f · GitHub
[go: up one dir, main page]

Skip to content

Commit c404b9f

Browse files
committed
Use slightly more correct types for FreeType.
1 parent a8bb386 commit c404b9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ft2font.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ void FT2Font::clear()
568568
void FT2Font::set_size(double ptsize, double dpi)
569569
{
570570
FT_Error error = FT_Set_Char_Size(
571-
face, (long)(ptsize * 64), 0, (unsigned int)(dpi * hinting_factor), (unsigned int)dpi);
571+
face, (FT_F26Dot6)(ptsize * 64), 0, (FT_UInt)(dpi * hinting_factor), (FT_UInt)dpi);
572572
if (error) {
573573
throw_ft_error("Could not set the fontsize", error);
574574
}
@@ -661,7 +661,7 @@ void FT2Font::set_text(
661661
xys.push_back(pen.x);
662662
xys.push_back(pen.y);
663663

664-
FT_Glyph_Get_CBox(thisGlyph, ft_glyph_bbox_subpixels, &glyph_bbox);
664+
FT_Glyph_Get_CBox(thisGlyph, FT_GLYPH_BBOX_SUBPIXELS, &glyph_bbox);
665665

666666
bbox.xMin = std::min(bbox.xMin, glyph_bbox.xMin);
667667
bbox.xMax = std::max(bbox.xMax, glyph_bbox.xMax);

0 commit comments

Comments
 (0)
0