diff --git a/src/crashlog.cpp b/src/crashlog.cpp index c080ec241c..35f0076bde 100644 --- a/src/crashlog.cpp +++ b/src/crashlog.cpp @@ -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); diff --git a/src/fontcache/freetypefontcache.cpp b/src/fontcache/freetypefontcache.cpp index 1bde653f94..0ff2a6eb66 100644 --- a/src/fontcache/freetypefontcache.cpp +++ b/src/fontcache/freetypefontcache.cpp @@ -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; } };