class SFML::Text

Drawable rendered text. Like Sprite, requires a Font at construction time in SFML 3, and we hold a Ruby reference to it to keep the GPU resource alive while the Text object is in use.

font = SFML::Font.find(β€œDejaVuSans”) score = SFML::Text.new(font, β€œ0 : 0”, character_size: 48, fill_color: SFML::Color.white, position: [400, 30], style: %i) window.draw(score) score.string = β€œ1 : 0” # mutate freely after construction