Skip to content

Commit

Permalink
tesseract: disable debug fonts (#1834)
Browse files Browse the repository at this point in the history
Avoid spurious error traces:
```
Error in pixReadMemTiff: function not present
Error in pixReadMem: tiff: no pix returned
Error in pixaGenerateFontFromString: pix not made
Error in bmfCreate: font pixa not made
```
  • Loading branch information
benoit-pierre authored Jun 22, 2024
1 parent f80dc33 commit e8a385a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions thirdparty/tesseract/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ list(APPEND PATCH_CMD COMMAND ${KO_PATCH}
${CMAKE_CURRENT_SOURCE_DIR}/k2pdfopt.patch
${CMAKE_CURRENT_SOURCE_DIR}/cmake_tweaks.patch
${CMAKE_CURRENT_SOURCE_DIR}/fix-old-tc-build.patch
${CMAKE_CURRENT_SOURCE_DIR}/no_debug_fonts.patch
)

list(APPEND CMAKE_ARGS
Expand Down
11 changes: 11 additions & 0 deletions thirdparty/tesseract/no_debug_fonts.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- i/src/ccstruct/debugpixa.h
+++ w/src/ccstruct/debugpixa.h
@@ -14,7 +14,7 @@
// TODO(rays) add another constructor with size control.
DebugPixa() {
pixa_ = pixaCreate(0);
-#ifdef TESSERACT_DISABLE_DEBUG_FONTS
+#if 1//def TESSERACT_DISABLE_DEBUG_FONTS
fonts_ = NULL;
#else
fonts_ = bmfCreate(nullptr, 14);

0 comments on commit e8a385a

Please sign in to comment.