diff --git a/src/libs/vlayout/vtextmanager.cpp b/src/libs/vlayout/vtextmanager.cpp index ee1a7cb04..62de75761 100644 --- a/src/libs/vlayout/vtextmanager.cpp +++ b/src/libs/vlayout/vtextmanager.cpp @@ -138,12 +138,13 @@ bool VTextManager::IsBigEnough(qreal fW, qreal fH, int iFontSize) TextLine tlOut = tl; fnt.setPixelSize(iFontSize + tl.m_iFontSize); QFontMetrics fm(fnt); + int iHorSp = fm.width(" "); tlOut.m_iHeight = fm.height(); QStringList qslLines = SplitString(tlOut.m_qsText, fW, fm); for (int iL = 0; iL < qslLines.count(); ++iL) { // check if every line fits within the label width - if (fm.width(qslLines[iL]) + 2*GetSpacing() > fW) + if (fm.width(qslLines[iL]) + iHorSp > fW) { return false; } diff --git a/src/libs/vlayout/vtextmanager.h b/src/libs/vlayout/vtextmanager.h index aea6741ab..e2f18e254 100644 --- a/src/libs/vlayout/vtextmanager.h +++ b/src/libs/vlayout/vtextmanager.h @@ -9,7 +9,7 @@ #include "../ifc/xml/vabstractpattern.h" #define MIN_FONT_SIZE 12 -#define MAX_FONT_SIZE 128 +#define MAX_FONT_SIZE 1024 /** * @brief The TextLine struct holds the information about one text line