diff --git a/patches/opencv-3.4.20-drawing-mono-font.patch b/patches/opencv-3.4.20-drawing-mono-font.patch index 165daca4..d2718adb 100644 --- a/patches/opencv-3.4.20-drawing-mono-font.patch +++ b/patches/opencv-3.4.20-drawing-mono-font.patch @@ -93,7 +93,7 @@ diff -Nuarp opencv-3.4.20.orig/modules/imgproc/src/drawing.cpp opencv-3.4.20/mod double getFontScaleFromHeight(const int fontFace, const int pixelHeight, const int thickness) { -+ return pixelHeight / 16.0; ++ return pixelHeight / (fontFace == 1 ? 16 : (fontFace == 5 ? 24 : 40)); +#if 0 // By https://stackoverflow.com/a/27898487/1531708 const int* ascii = getFontData(fontFace); diff --git a/patches/opencv-4.8.1-drawing-mono-font.patch b/patches/opencv-4.8.1-drawing-mono-font.patch index 145392cb..869ac57b 100644 --- a/patches/opencv-4.8.1-drawing-mono-font.patch +++ b/patches/opencv-4.8.1-drawing-mono-font.patch @@ -93,7 +93,7 @@ diff -Nuarp opencv-4.8.1.orig/modules/imgproc/src/drawing.cpp opencv-4.8.1/modul double getFontScaleFromHeight(const int fontFace, const int pixelHeight, const int thickness) { -+ return pixelHeight / 16.0; ++ return pixelHeight / (fontFace == 1 ? 16 : (fontFace == 5 ? 24 : 40)); +#if 0 // By https://stackoverflow.com/a/27898487/1531708 const int* ascii = getFontData(fontFace);