Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Dec 12, 2023
1 parent 3d5c943 commit 8fceb97
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion patches/opencv-3.4.20-drawing-mono-font.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion patches/opencv-4.8.1-drawing-mono-font.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8fceb97

Please sign in to comment.