diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index ab25e480..169a1017 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -1074,11 +1074,11 @@ bool CPhoneDevice::OnImageReady(cv::Mat& mat) double width = mat.size().width; // double ratio = std::min(height / 1024, width / 1920); double ratio = height / 1024.0; - int thickness = round(1.2 * ratio); + int thickness = round(1.4 * ratio); if (thickness < 1) thickness = 1; - else if (thickness > 4) thickness = 4; + else if (thickness > 5) thickness = 5; cv::Scalar scalar(255, 255, 255); // white - int fontSize = (int)(24.0 * ratio); + int fontSize = (int)(28.0 * ratio); cv::Point pt; std::string fontPath; @@ -1230,6 +1230,8 @@ bool CPhoneDevice::OnImageReady(cv::Mat& mat) } #endif + + textSize = ft2->getTextSize(it->text, fontSize, thickness, &baseline); XYLOG(XYLOG_SEVERITY_DEBUG, "%s font Size=%d height: %d baseline=%d", it->text.c_str(), fontSize, textSize.height, baseline);