summaryrefslogtreecommitdiff
path: root/indra/newview/llhudtext.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-01-19 19:44:15 -0800
committerRichard Linden <none@none>2012-01-19 19:44:15 -0800
commit4fa9f2892b7a9967f9e97228c17e7b277fc56aae (patch)
treec7e330b71e4d5127902f9b4fc5fbeabadf021a15 /indra/newview/llhudtext.cpp
parent9de0b5ed4891dcfcb54e35d9bb0401309455d66a (diff)
parent19320842ebc39c1b528a2107323f9e918d688177 (diff)
Automated merge with ssh://hg.lindenlab.com/richard/viewer-experience-merge
Diffstat (limited to 'indra/newview/llhudtext.cpp')
-rw-r--r--indra/newview/llhudtext.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index 24a876c59a..579b6008ae 100644
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -227,7 +227,7 @@ void LLHUDText::renderText()
segment_iter != mTextSegments.end(); ++segment_iter )
{
const LLFontGL* fontp = segment_iter->mFont;
- y_offset -= fontp->getLineHeight();
+ y_offset -= fontp->getLineHeight() - 1; // correction factor to match legacy font metrics
U8 style = segment_iter->mStyle;
LLFontGL::ShadowType shadow = LLFontGL::DROP_SHADOW;
@@ -480,8 +480,6 @@ void LLHUDText::updateSize()
F32 width = 0.f;
S32 max_lines = getMaxLines();
- //S32 lines = (max_lines < 0) ? (S32)mTextSegments.size() : llmin((S32)mTextSegments.size(), max_lines);
- //F32 height = (F32)mFontp->getLineHeight() * (lines + mLabelSegments.size());
S32 start_segment;
if (max_lines < 0) start_segment = 0;
@@ -491,7 +489,7 @@ void LLHUDText::updateSize()
while (iter != mTextSegments.end())
{
const LLFontGL* fontp = iter->mFont;
- height += fontp->getLineHeight();
+ height += fontp->getLineHeight() - 1; // correction factor to match legacy font metrics
width = llmax(width, llmin(iter->getWidth(fontp), HUD_TEXT_MAX_WIDTH));
++iter;
}