I'm drawing a background sf::RectangleShape for a sf::Text. After setting the Font, CharacterSize and the String I ask for its local bounds, to initialize the background rectangle:
sf::FloatRect textSize = text.getLocalBounds();
sf::RectangleShape background(sf::Vector2f(textSize.width, textSize.height));
Both the sf::Text and the sf::RectangleShape have the same position. But the background rectangle is always a little bit too small for the text. Top and Left are OK, but at the Bottom and the Right the text sticks out of the background rectangle.
Why is that so? What can I do about it?