Merge pull request #44 from vladimirgamalian/master

Missed Font::IsGlyphProvided definition has been added. Removed extra pixels from Font::GetGlyphRect().
This commit is contained in:
Dmitry Marakasov 2015-07-27 23:51:36 +03:00
commit 361e99aea4

View File

@ -153,7 +153,7 @@ Rect Font::GetGlyphRect(Uint16 ch) const {
int minx, maxx, miny, maxy; int minx, maxx, miny, maxy;
if (TTF_GlyphMetrics(font_, ch, &minx, &maxx, &miny, &maxy, nullptr) != 0) if (TTF_GlyphMetrics(font_, ch, &minx, &maxx, &miny, &maxy, nullptr) != 0)
throw Exception("TTF_GlyphMetrics"); throw Exception("TTF_GlyphMetrics");
return Rect(minx, miny, maxx - minx + 1, maxy - miny + 1); return Rect(minx, miny, maxx - minx, maxy - miny);
} }
int Font::GetGlyphAdvance(Uint16 ch) const { int Font::GetGlyphAdvance(Uint16 ch) const {