summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-12-03 15:20:21 -0800
committerJames Cook <james@lindenlab.com>2009-12-03 15:20:21 -0800
commit2fe5e55f4fe84e0ff2d2857355861657474daae8 (patch)
tree394ece1936911cded60043e4bf033d6778dcc40d /indra
parent522fa624875800463f320f176af80db58d928c84 (diff)
Hack for EXT-2971 Letter R doesn't show when it's the last letter in a text block.
Add 1 pixel of padding to clipping rect computation. I think there is a deeper problem in the font width computation code, but I don't know where. Opened EXT-3112 for the deeper issue. Reviewed with Leyla.
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/lltextbase.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 741ab1737d..82a3c5cf47 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -543,9 +543,17 @@ void LLTextBase::drawText()
line_end = next_start;
}
+ // A patch for EXT-1944 "Implement ellipses in message well"
+ // introduced a regression where text in SansSerif ending in the
+ // letter "r" is clipped. This may be due to an off-by-one in
+ // font width information out of FreeType with our fractional font
+ // sizes. For now, just make an extra pixel of space to resolve
+ // EXT-2971 "Letter R doesn't show when it's the last letter in a
+ // text block". See James/Richard for details.
+ const S32 FIX_CLIPPING_HACK = 1;
LLRect text_rect(line.mRect.mLeft + mTextRect.mLeft - scrolled_view_rect.mLeft,
line.mRect.mTop - scrolled_view_rect.mBottom + mTextRect.mBottom,
- llmin(mDocumentView->getRect().getWidth(), line.mRect.mRight) - scrolled_view_rect.mLeft,
+ llmin(mDocumentView->getRect().getWidth(), line.mRect.mRight) - scrolled_view_rect.mLeft + FIX_CLIPPING_HACK,
line.mRect.mBottom - scrolled_view_rect.mBottom + mTextRect.mBottom);
// draw a single line of text