Hello
Is there a way to make outline only outer space with text? As you can see it works fine with shapes, but text outlined inside and outside.
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
int main() {
sf::RenderWindow window(sf::VideoMode(800, 600), "My window");
sf::Event event;
sf::Font font;
sf::Text text;
sf::RectangleShape shape;
font.loadFromFile("font.ttf");
text.setFont(font);
text.setString("HELLO");
text.setCharacterSize(200);
text.setFillColor(sf::Color(255,0,0,128));
text.setOutlineColor(sf::Color(0,0,0,128));
text.setOutlineThickness(5);
shape.setSize(sf::Vector2f(100,100));
shape.setPosition(100, 300);
shape.setFillColor(sf::Color(255,0,0,128));
shape.setOutlineColor(sf::Color(0,0,0,128));
shape.setOutlineThickness(5);
while (window.isOpen()) {
while (window.pollEvent(event)) if (event.type == sf::Event::Closed) window.close();
window.clear(sf::Color::White);
window.draw(text);
window.draw(shape);
window.display();
}
return 0;
}