From bbc265a9d5230603b7ee1b3f974ef27154d8507f Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 26 Jan 2012 16:30:38 -0800 Subject: EXP-1846 FIX Text positioning issues in Floaters, Notifications, UI, and toasts with UI size smaller than 1 also, re-enabled floater_test_textbox.xml --- indra/llrender/llfontgl.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'indra/llrender/llfontgl.cpp') diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 12f86cf599..a469581637 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -215,16 +215,17 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons cur_y = ((F32)y * sScaleY) + origin.mV[VY]; // Offset y by vertical alignment. + // use unscaled font metrics here switch (valign) { case TOP: - cur_y -= getAscenderHeight(); + cur_y -= mFontFreetype->getAscenderHeight(); break; case BOTTOM: - cur_y += getDescenderHeight(); + cur_y += mFontFreetype->getDescenderHeight(); break; case VCENTER: - cur_y -= (getAscenderHeight() - getDescenderHeight()) / 2.f; + cur_y -= (mFontFreetype->getAscenderHeight() - mFontFreetype->getDescenderHeight()) / 2.f; break; case BASELINE: // Baseline, do nothing. -- cgit v1.2.3