Use a vector to store bundled font names to preserve initialization order

This commit is contained in:
Dan Paulat 2023-09-21 23:35:26 -05:00
parent 3202476267
commit 7edd512ff7

View file

@ -34,7 +34,7 @@ static void LoadFcApplicationFont(const std::string& fontFilename);
static void LoadFonts(); static void LoadFonts();
static void LoadTextures(); static void LoadTextures();
static const std::unordered_map<types::Font, std::string> fontNames_ { static const std::vector<std::pair<types::Font, std::string>> fontNames_ {
{types::Font::din1451alt, ":/res/fonts/din1451alt.ttf"}, {types::Font::din1451alt, ":/res/fonts/din1451alt.ttf"},
{types::Font::din1451alt_g, ":/res/fonts/din1451alt_g.ttf"}, {types::Font::din1451alt_g, ":/res/fonts/din1451alt_g.ttf"},
{types::Font::Inconsolata_Regular, ":/res/fonts/Inconsolata-Regular.ttf"}}; {types::Font::Inconsolata_Regular, ":/res/fonts/Inconsolata-Regular.ttf"}};