diff --git a/src/gpufont/font.hpp b/src/gpufont/font.hpp index 731f18a..0ebf419 100644 --- a/src/gpufont/font.hpp +++ b/src/gpufont/font.hpp @@ -1143,7 +1143,8 @@ class Font { std::vector & boundingBoxes, float & advanceY, const bool vFlip = false, - const float fontSize_px = 42){ + const float fontSize_px = 42, + const float lineHeightMultiplier = 1){ float advanceX = 0; @@ -1168,7 +1169,7 @@ class Font { if(charcode == '\n'){ advanceX = 0; - advanceY += getLineHeight(fontSize_px); + advanceY += getLineHeight(fontSize_px) * lineHeightMultiplier; if(!vFlip){ advanceY *= -1; } @@ -1188,7 +1189,6 @@ class Font { FT_Error error = FT_Get_Kerning(face, previous, glyph.index, kerningMode, &kerning); if(!error){ advanceX += (((float)kerning.x * letterFontSize_px)) / emSize * worldSize; - cout << "WHAT IS THIS EVEN HAPPYNG"; } } @@ -1243,7 +1243,7 @@ class Font { boundingBox.p1 = glm::vec4(maxX, minY, 0, 1); boundingBox.p2 = glm::vec4(maxX, maxY, 0, 1); boundingBox.p3 = glm::vec4(minX, maxY, 0, 1); - advanceY += getLineHeight(fontSize_px); + advanceY += getLineHeight(fontSize_px) * lineHeightMultiplier; if(!vFlip){ advanceY *= -1; }