Change: Include font style in font name for Freetype.

This commit is contained in:
Peter Nelson 2023-05-26 19:33:09 +01:00 committed by Patric Stout
parent 3ae1a80576
commit 220b08b868
2 changed files with 5 additions and 5 deletions

View File

@ -185,10 +185,10 @@ char *CrashLog::LogConfiguration(char *buffer, const char *last) const
" Medium: %s\n"
" Large: %s\n"
" Mono: %s\n\n",
FontCache::Get(FS_SMALL)->GetFontName(),
FontCache::Get(FS_NORMAL)->GetFontName(),
FontCache::Get(FS_LARGE)->GetFontName(),
FontCache::Get(FS_MONO)->GetFontName()
FontCache::Get(FS_SMALL)->GetFontName().c_str(),
FontCache::Get(FS_NORMAL)->GetFontName().c_str(),
FontCache::Get(FS_LARGE)->GetFontName().c_str(),
FontCache::Get(FS_MONO)->GetFontName().c_str()
);
buffer += seprintf(buffer, last, "AI Configuration (local: %i) (current: %i):\n", (int)_local_company, (int)_current_company);

View File

@ -41,7 +41,7 @@ public:
~FreeTypeFontCache();
void ClearFontCache() override;
GlyphID MapCharToGlyph(WChar key) override;
std::string GetFontName() override { return face->family_name; }
std::string GetFontName() override { return fmt::format("{}, {}", face->family_name, face->style_name); }
bool IsBuiltInFont() override { return false; }
};