fix w4018

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
pappeste
2021-06-18 17:45:51 -07:00
committed by Esteban Papp
parent 97354ce90a
commit 10f950b726
33 changed files with 72 additions and 73 deletions
@@ -252,8 +252,8 @@ int AZ::FontRenderer::GetGlyph(GlyphBitmap* glyphBitmap, int* horizontalAdvance,
const int textureSlotBufferHeight = glyphBitmap->GetHeight();
// might happen if font characters are too big or cache dimenstions in font.xml is too small "<font path="VeraMono.ttf" w="320" h="368"/>"
const bool charWidthFits = iX + m_glyph->bitmap.width <= textureSlotBufferWidth;
const bool charHeightFits = iY + m_glyph->bitmap.rows <= textureSlotBufferHeight;
const bool charWidthFits = static_cast<int>(iX + m_glyph->bitmap.width) <= textureSlotBufferWidth;
const bool charHeightFits = static_cast<int>(iY + m_glyph->bitmap.rows) <= textureSlotBufferHeight;
const bool charFitsInSlot = charWidthFits && charHeightFits;
AZ_Error("Font", charFitsInSlot, "Character code %d doesn't fit in font texture; check 'sizeRatio' attribute in font XML or adjust this character's sizing in the font.", characterCode);