Playing with fonts

To display these pieces of information, we'll need to use fonts. No additional external dependencies are required, however, we'll need to use a feature, so we need to update our Cargo.toml:

    [features]
    default = ["sdl2/ttf"]

By default, the sdl2 crate doesn't provide the ttf module, you need to enable it by adding the ttf feature to the compilation process. That's what we did by saying to cargo: by default, I want the ttf feature of the sdl2 crate enabled. You can try with and without it to see the difference, after adding this new context initialization:

    let ttf_context = sdl2::ttf::init().expect("SDL TTF initialization
failed"
);
If you get a missing library compilation error, it means you didn't install the corresponding library. To fix this issue, you need to install it through your favorite package manager.