From e990fb41e54c62014cbf2ff15682ae3ec818c215 Mon Sep 17 00:00:00 2001 From: devZoGok Date: Tue, 19 May 2026 19:41:10 +0300 Subject: [PATCH] increasing the advance with every character --- text.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/text.cpp b/text.cpp index 2d0c334..e25baaa 100755 --- a/text.cpp +++ b/text.cpp @@ -98,11 +98,12 @@ namespace vb01{ Glyph glyph = *glyphPtr; prepareGlyphs(glyph, glyphTexId, advanceOffset); Vector2 size = glyph.size, bearing = glyph.bearing; + int numShifts = 6; if(horizontal) - advanceOffset.x += node->getScale().x * (size.x + bearing.x); + advanceOffset.x += node->getScale().x * (glyph.advance >> numShifts); else - advanceOffset.y += node->getScale().y * size.y; + advanceOffset.y += node->getScale().y * (glyph.advance >> numShifts); } }