From d6ba9440ca88ee22d31f6838ab468e1abaed9b49 Mon Sep 17 00:00:00 2001 From: def Date: Fri, 26 Jun 2020 23:42:04 +0200 Subject: [PATCH] Get rid of the annoying font size warnings Since we're not doing anything about them anyway, and I get them spamming me on every client start. --- src/engine/client/text.cpp | 3 --- src/game/client/components/mapimages.cpp | 5 ----- 2 files changed, 8 deletions(-) diff --git a/src/engine/client/text.cpp b/src/engine/client/text.cpp index 9a8c388ab..1dfa5af25 100644 --- a/src/engine/client/text.cpp +++ b/src/engine/client/text.cpp @@ -1714,10 +1714,7 @@ public: virtual void UploadEntityLayerText(IGraphics::CTextureHandle Texture, const char *pText, int Length, float x, float y, int FontSize) { if (FontSize < 1) - { - dbg_msg("pFont", "texture with id '%d' will not be updated. Reason - font is too small", (int)Texture); return; - } const char *pCurrent = (char *)pText; const char *pEnd = pCurrent + Length; diff --git a/src/game/client/components/mapimages.cpp b/src/game/client/components/mapimages.cpp index 3944c9074..7415b36f7 100644 --- a/src/game/client/components/mapimages.cpp +++ b/src/game/client/components/mapimages.cpp @@ -191,11 +191,6 @@ void CMapImages::UpdateEntityLayerText(IGraphics::CTextureHandle Texture, int Te int CurrentNumberSuitableFontSize = TextRender()->AdjustFontSize(aBuf, DigitsCount, TextureSize); int UniversalSuitableFontSize = CurrentNumberSuitableFontSize*0.9; // should be smoothed enough to fit any digits combination - if (UniversalSuitableFontSize < 1) - { - dbg_msg("pFont", "texture with id '%d' will not be loaded. Reason - font is too small", (int)Texture); - } - int ApproximateTextWidth = TextRender()->CalculateTextWidth(aBuf, DigitsCount, 0, UniversalSuitableFontSize); int XOffSet = (64-ApproximateTextWidth)/2; YOffset += ((TextureSize - UniversalSuitableFontSize)/2);