mirror of
https://github.com/devZoGok/vb01.git
synced 2026-08-26 19:43:30 +00:00
increasing the advance with every character
This commit is contained in:
@@ -98,11 +98,12 @@ namespace vb01{
|
|||||||
Glyph glyph = *glyphPtr;
|
Glyph glyph = *glyphPtr;
|
||||||
prepareGlyphs(glyph, glyphTexId, advanceOffset);
|
prepareGlyphs(glyph, glyphTexId, advanceOffset);
|
||||||
Vector2 size = glyph.size, bearing = glyph.bearing;
|
Vector2 size = glyph.size, bearing = glyph.bearing;
|
||||||
|
int numShifts = 6;
|
||||||
|
|
||||||
if(horizontal)
|
if(horizontal)
|
||||||
advanceOffset.x += node->getScale().x * (size.x + bearing.x);
|
advanceOffset.x += node->getScale().x * (glyph.advance >> numShifts);
|
||||||
else
|
else
|
||||||
advanceOffset.y += node->getScale().y * size.y;
|
advanceOffset.y += node->getScale().y * (glyph.advance >> numShifts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user