1
0
Fork 0

source/Graphics/Font/FreeTypeDriver.cpp: get rid of some compiler warnings by proper casting.

This commit is contained in:
Henrik Hautakoski 2018-05-12 19:25:57 +02:00
parent 17e580dfa2
commit ede60da544

View file

@ -148,10 +148,10 @@ Font::Glyph FreeTypeDriver::loadGlyph(unsigned int codepoint, Image& img, unsign
bmp.rows,
bmp.buffer);
glyph.offset.x = metrics.horiBearingX / (1 << 6);
glyph.offset.y = metrics.horiBearingY / (1 << 6);
glyph.size.x = (metrics.width / (1 << 6)) + (outlineSize * 2);
glyph.size.y = (metrics.height / (1 << 6)) + (outlineSize * 2);
glyph.offset.x = static_cast<unsigned char>(metrics.horiBearingX / (1 << 6));
glyph.offset.y = static_cast<unsigned char>(metrics.horiBearingY / (1 << 6));
glyph.size.x = static_cast<unsigned char>(metrics.width / (1 << 6)) + (outlineSize * 2);
glyph.size.y = static_cast<unsigned char>(metrics.height / (1 << 6)) + (outlineSize * 2);
}
glyph.advance = static_cast<unsigned char>(metrics.horiAdvance >> 6) + (outlineSize * 2);