Skip to content

Use SDL_ttf to display texts #84

@petitlapin

Description

@petitlapin

Linked to:

This is the first step to have an i18n sustainable project.
If we want to keep the initial fonts (we would need to find them...), I would suggest to have a map of fonts in screen.cc (key being the locale, value being the TTF_Font) and have a unique entrypoint to display texts in this class (so no more display text directly from sprites.cc).

We can cache most of the generated texts (all that are static and won't change during the game) and delete them whenever we change locale.

A first step could be to display the copyright at the bottom of the main screen () and move on with the other texts. Note that we would "temporary" lose the translations for all the other languages so ideally, we should not release a version until we have a clean way to handle all the existing translations...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions