diff --git a/src/ccstruct/debugpixa.h b/src/ccstruct/debugpixa.h index 37e6321563..6a776e9fab 100644 --- a/src/ccstruct/debugpixa.h +++ b/src/ccstruct/debugpixa.h @@ -12,7 +12,11 @@ class DebugPixa { // TODO(rays) add another constructor with size control. DebugPixa() { pixa_ = pixaCreate(0); +#ifdef TESSERACT_DISABLE_DEBUG_FONTS + fonts_ = NULL; +#else fonts_ = bmfCreate(nullptr, 14); +#endif } // If the filename_ has been set and there are any debug images, they are // written to the set filename_.