1
Graphics / Re: bug in sf::Text when applying an outline color/thickness
« on: December 21, 2016, 07:18:12 pm »
I updated the code to better support \r\n as new line char without a graphic glitch.
Now sf::Text should not produce unwanted graphics glitches when using an outline color/thickness if the sf::Text string contains two consecutive new line character.
Here some screen for comparison, the text on the left is produced by the old code, the on on the right is produced by the new code
Now sf::Text should not produce unwanted graphics glitches when using an outline color/thickness if the sf::Text string contains two consecutive new line character.
Here some screen for comparison, the text on the left is produced by the old code, the on on the right is produced by the new code
sf::Text TestString;
TestString.setFont(TestFont);
TestString.setCharacterSize(60u);
TestString.setOutlineColor(sf::Color::Red);
TestString.setOutlineThickness(2.f);
TestString.setStyle(sf::Text::StrikeThrough | sf::Text::Underlined);
TestString.setString("Line 1\r\nLine 2");
TestString.setFont(TestFont);
TestString.setCharacterSize(60u);
TestString.setOutlineColor(sf::Color::Red);
TestString.setOutlineThickness(2.f);
TestString.setStyle(sf::Text::StrikeThrough | sf::Text::Underlined);
TestString.setString("Line 1\r\nLine 2");
sf::Text TestString;
TestString.setFont(TestFont);
TestString.setCharacterSize(60u);
TestString.setOutlineColor(sf::Color::Red);
TestString.setOutlineThickness(2.f);
TestString.setStyle(sf::Text::StrikeThrough | sf::Text::Underlined);
TestString.setString("Line 1\r\n\r\nLine 2");
TestString.setFont(TestFont);
TestString.setCharacterSize(60u);
TestString.setOutlineColor(sf::Color::Red);
TestString.setOutlineThickness(2.f);
TestString.setStyle(sf::Text::StrikeThrough | sf::Text::Underlined);
TestString.setString("Line 1\r\n\r\nLine 2");