Hello world/Graphical: Difference between revisions

Content added Content deleted
(Add example for Crystal programming language)
m (Specify required font file location.)
Line 1,266: Line 1,266:


window = SF::RenderWindow.new(SF::VideoMode.new(800, 600), "Hello world/Graphical")
window = SF::RenderWindow.new(SF::VideoMode.new(800, 600), "Hello world/Graphical")

# A font file(s) MUST be in the directory of the Crystal file itself.
# CrSFML does NOT load font files from the filesystem root!
font = SF::Font.from_file("DejaVuSerif-Bold.ttf")
font = SF::Font.from_file("DejaVuSerif-Bold.ttf")