1
Graphics / sf::Text removes spaces from GetGlobalBounds, SFML 2.0
« on: February 29, 2012, 11:10:11 pm »
When calling sf::Text.GetGlobalBounds().width It will not count in starting or ending white spaces. Is this intentional? If so, is there a way to get the width with the added white space.
In this test, they all print the same.
Tested with SFML 2.0 Build 204
In this test, they all print the same.
Code: [Select]
sf::Text test1(" test");
sf::Text test2("test ");
sf::Text test3(" test ");
sf::Text test4("test");
printf("%f\n",test1.GetGlobalBounds().Width);
printf("%f\n",test2.GetGlobalBounds().Width);
printf("%f\n",test3.GetGlobalBounds().Width);
printf("%f\n",test4.GetGlobalBounds().Width);
Tested with SFML 2.0 Build 204