mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-04 11:25:58 -04:00
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:
commit
361e99aea4
@ -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 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user