diff --git a/client/renderSDL/CBitmapFont.cpp b/client/renderSDL/CBitmapFont.cpp index 53a09460b..13de8dcdd 100644 --- a/client/renderSDL/CBitmapFont.cpp +++ b/client/renderSDL/CBitmapFont.cpp @@ -212,6 +212,12 @@ CBitmapFont::CBitmapFont(const std::string & filename): SDL_FreeSurface(atlasImage); atlasImage = scaledSurface; } + + logGlobal->debug("Loaded BMP font: '%s', height %d, ascent %d", + filename, + getLineHeightScaled(), + getFontAscentScaled() + ); } CBitmapFont::~CBitmapFont() diff --git a/client/renderSDL/CTrueTypeFont.cpp b/client/renderSDL/CTrueTypeFont.cpp index 2119ba14a..dcf3661d6 100644 --- a/client/renderSDL/CTrueTypeFont.cpp +++ b/client/renderSDL/CTrueTypeFont.cpp @@ -73,6 +73,14 @@ CTrueTypeFont::CTrueTypeFont(const JsonNode & fontConfig): TTF_SetFontStyle(font.get(), getFontStyle(fontConfig)); TTF_SetFontHinting(font.get(),TTF_HINTING_MONO); + logGlobal->debug("Loaded TTF font: '%s', point size %d, height %d, ascent %d, descent %d, line skip %d", + fontConfig["file"].String(), + getPointSize(fontConfig["size"]), + TTF_FontHeight(font.get()), + TTF_FontAscent(font.get()), + TTF_FontDescent(font.get()), + TTF_FontLineSkip(font.get()) + ); } CTrueTypeFont::~CTrueTypeFont() = default; diff --git a/client/renderSDL/RenderHandler.cpp b/client/renderSDL/RenderHandler.cpp index be0d5db3b..f1afc8255 100644 --- a/client/renderSDL/RenderHandler.cpp +++ b/client/renderSDL/RenderHandler.cpp @@ -342,6 +342,8 @@ std::shared_ptr RenderHandler::loadFont(EFonts font) return fonts.at(font); const int8_t index = static_cast(font); + logGlobal->debug("Loading font %d", static_cast(index)); + auto configList = CResourceHandler::get()->getResourcesWithName(JsonPath::builtin("config/fonts.json")); std::shared_ptr loadedFont = std::make_shared(); std::string bitmapPath;