From 8d67cc08b71b59b1e1759a404c26840a64429851 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 19 Mar 2017 22:15:36 +0100 Subject: [PATCH] CNeutrinoFonts: reduce debug spam In some cases with many following dynamic size changes, it could be better to suppress this output. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/96e05c69dcf521a334dcc59f048647f54c651b41 Author: Thilo Graf Date: 2017-03-19 (Sun, 19 Mar 2017) Origin message was: ------------------ CNeutrinoFonts: reduce debug spam In some cases with many following dynamic size changes, it could be better to suppress this output. ------------------ This commit was generated by Migit --- src/driver/neutrinofonts.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/driver/neutrinofonts.cpp b/src/driver/neutrinofonts.cpp index 80b40377e..8c200a301 100644 --- a/src/driver/neutrinofonts.cpp +++ b/src/driver/neutrinofonts.cpp @@ -269,10 +269,12 @@ int CNeutrinoFonts::getDynFontSize(int dx, int dy, std::string text, int style) if (text.empty()) tmpText = "x"; _width = dynFont->getRenderWidth(tmpText); if ((_height > dy) || (_width > dx)) { - if (dynFlag) + if (dynFlag){ dynSize--; - else - printf("##### [%s] Specified size (dx=%d, dy=%d) too small, use minimal font size.\n", __FUNCTION__, dx, dy); + }else{ + if (debug) + printf("##### [%s] Specified size (dx=%d, dy=%d) too small, use minimal font size.\n", __FUNCTION__, dx, dy); + } break; } else if ((_height < dy) || (_width < dx)) {