From 7e133e3bdf3ee45b205ebfd6d4958250c769ba0d Mon Sep 17 00:00:00 2001 From: Ruslan Myhal <8909650+rmyhal@users.noreply.github.com> Date: Fri, 20 May 2022 10:31:35 +0100 Subject: [PATCH] fix shiftY calculation typo (#285) --- src/mbgl/text/shaping.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mbgl/text/shaping.cpp b/src/mbgl/text/shaping.cpp index 016841ba6..9f83cea7d 100644 --- a/src/mbgl/text/shaping.cpp +++ b/src/mbgl/text/shaping.cpp @@ -145,7 +145,7 @@ void align(Shaping& shaping, if (maxLineHeight != lineHeight) { shiftY = -blockHeight * verticalAlign - Shaping::yOffset; } else { - shiftY = (-verticalAlign * static_cast(lineCount + 0.5)) * lineHeight; + shiftY = (-verticalAlign * static_cast(lineCount) + 0.5f) * lineHeight; } for (auto& line : shaping.positionedLines) {