diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index 3136401f..2c372503 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -1607,10 +1607,12 @@ void DrawOutlineText(cv::Ptr ft2, cv::Mat& mat, const std::st for (std::vector::const_iterator it = lines.cbegin(); it != lines.cend(); ++it ) { - textSize = ft2->getTextSize(*it, fontSize, thickness, &baseline); + std::string trimmedLine = *it; + trimString(trimmedLine); + textSize = ft2->getTextSize(trimmedLine, fontSize, thickness, &baseline); lineHeight = std::max(fontSize, textSize.height + baseline); - ft2->putText(mat, *it, pt, fontSize, clr, thickness, cv::LINE_AA, false, true); + ft2->putText(mat, trimmedLine, pt, fontSize, clr, thickness, cv::LINE_AA, false, true); pt.x = startPoint.x; pt.y += lineHeight + (lineHeight >> 2); // 125%