Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tesseract: disable debug fonts #1834

Merged

Conversation

benoit-pierre
Copy link
Contributor

@benoit-pierre benoit-pierre commented Jun 22, 2024

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

This change is Reviewable

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
```
DebugPixa() {
pixa_ = pixaCreate(0);
-#ifdef TESSERACT_DISABLE_DEBUG_FONTS
+#if 1//def TESSERACT_DISABLE_DEBUG_FONTS
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Patching feels a bit convoluted compared to just setting it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no knob in the build system to enable the flag… And it's only used here, so it's actually easier then having to patch CMakeLists.txt, or create a dedicated toolchain file to tweak the compilation flags just for tesseract.

(I almost used something like set(CMAKE_C_FLAGS_INIT "$(strip $(CFLAGS)) $${CPPFLAGS} $${CFLAGS}") when generating the toolchain file to make it easier to tweak those).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange, but alright.

@Frenzie Frenzie requested a review from NiLuJe June 22, 2024 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants