Merge pull request #4132 from ctrlaltdavid/3d-text-size

Tweak 3D text overlay text size calculations
This commit is contained in:
Brad Hefta-Gaub 2015-01-19 12:24:51 -08:00
commit c7c7c35654

View file

@ -238,8 +238,8 @@ QSizeF Text3DOverlay::textSize(const QString& text) const {
QFont font(SANS_FONT_FAMILY, FIXED_FONT_POINT_SIZE); // Same font properties as render()
QFontMetrics fontMetrics(font);
const float TEXT_SCALE_ADJUST = 1.02f; // Experimentally detemined for the specified font
const int TEXT_HEIGHT_ADJUST = -6;
const float TEXT_SCALE_ADJUST = 1.025f; // Experimentally detemined for the specified font
const int TEXT_HEIGHT_ADJUST = -10;
float scaleFactor = _lineHeight * TEXT_SCALE_ADJUST * LINE_SCALE_RATIO / (float)FIXED_FONT_POINT_SIZE;
QStringList lines = text.split(QRegExp("\r\n|\r|\n"));