SFML community forums
Help => Graphics => Topic started by: Contadotempo on February 07, 2012, 11:00:15 am
-
Hello,
sf::Text seems to be ignoring blank spaces I put at the end of a string. When I try to get the Global Bounds's width it always returns the value of the string without the spaces
The problem is shown by the code:
#include <SFML/Graphics.hpp>
#include <iostream>
int main()
{
sf::Text text1("Hello this is a string");
sf::Text text2("Hello this is a string ");
std::cout << "Bounds for text1: " << text1.GetGlobalBounds().Width << std::endl;
std::cout << "Bounds for text2: " << text2.GetGlobalBounds().Width << std::endl;
getchar();
return 0;
}
Is this behaviour intentional?
Is there a workaround?
Using latest commit of SFML,
Windows 7,
ATI Radeon HD4870.
Best Regards.
-
Please search before posting:
http://www.sfml-dev.org/forum/viewtopic.php?t=6672
-
Ugh, didn't use the correct terms to search.
I'm sorry I feel stupid. :oops: