1sf::Text text;
2
3// select the font
4text.setFont(font); // font is a sf::Font
5
6// set the string to display
7text.setString("Hello world");
8
9// set the character size
10text.setCharacterSize(24); // in pixels, not points!
11
12// set the color
13text.setFillColor(sf::Color::Red);
14
15// set the text style
16text.setStyle(sf::Text::Bold | sf::Text::Underlined);
17
18...
19
20// inside the main loop, between window.clear() and window.display()
21window.draw(text);
22