The loading part is relatively straightforward. The first parameter tells Gosu what size to make the font (height in pixels), and the second tells it what font to use.

Now you may be wondering where the font actually comes from- there’s no “Nimbus Mono L” file in the snippet repository, so how does Gosu know what the font looks like? There are three ways:

name: "Font Name" tells Gosu to get that font name from your operating system. If it can’t find it, it uses a default font.

name: "./font/path.ttf" tells Gosu to load a TrueType Font file from disk. This is helpful if you have a font which might not be installed on your player’s system. Note that Gosu expects to see a / or ./ at the beginning so that it knows this is a file.

Or you can just omit the argument and Gosu will pick a default font. This is helpful for prototyping.

Our drawing is also very similar to images. In fact, the only difference is that the font also requires some text to draw. The Font class can take the same additional parameters for additional effect: