Minor fixes

This commit is contained in:
SirLynix
2023-11-26 11:25:52 +01:00
parent 1ac992b5c7
commit 2622951144
13 changed files with 68 additions and 84 deletions

View File

@@ -506,8 +506,8 @@ namespace Nz
if (glyph.atlasRect.width > 0 && glyph.atlasRect.height > 0)
{
// Add a small border to prevent GPU to sample another glyph pixel
glyph.atlasRect.width += m_glyphBorder*2;
glyph.atlasRect.height += m_glyphBorder*2;
glyph.atlasRect.width += m_glyphBorder * 2;
glyph.atlasRect.height += m_glyphBorder * 2;
if (!m_atlas->Insert(fontGlyph.image, &glyph.atlasRect, &glyph.flipped, &glyph.layerIndex))
{
@@ -518,8 +518,8 @@ namespace Nz
// Recenter and remove glyph border
glyph.atlasRect.x += m_glyphBorder;
glyph.atlasRect.y += m_glyphBorder;
glyph.atlasRect.width -= m_glyphBorder*2;
glyph.atlasRect.height -= m_glyphBorder*2;
glyph.atlasRect.width -= m_glyphBorder * 2;
glyph.atlasRect.height -= m_glyphBorder * 2;
}
glyph.aabb = fontGlyph.aabb;