summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2012-06-21 17:50:41 -0400
committerOz Linden <oz@lindenlab.com>2012-06-21 17:50:41 -0400
commit4397516ca5b8fdb95acb425c55e90cf1cd5a9595 (patch)
treeaeff419b803e6560ccd6d2b0a4fd1cb4c46ddc4b /indra/llrender
parentf64a79d9d14fe52dc9ac599bc9e4faf8009254ce (diff)
parentb10df0b6c41c0044cb05dedba12db7923868b1ae (diff)
merge changes for DRTVWR-168
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llfontgl.cpp10
-rw-r--r--indra/llrender/llfontgl.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index fccbf37a8d..4dc2fcd714 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -422,6 +422,16 @@ S32 LLFontGL::renderUTF8(const std::string &text, S32 begin_offset, S32 x, S32 y
}
// font metrics - override for LLFontFreetype that returns units of virtual pixels
+F32 LLFontGL::getAscenderHeight() const
+{
+ return mFontFreetype->getAscenderHeight() / sScaleY;
+}
+
+F32 LLFontGL::getDescenderHeight() const
+{
+ return mFontFreetype->getDescenderHeight() / sScaleY;
+}
+
S32 LLFontGL::getLineHeight() const
{
return llceil(mFontFreetype->getAscenderHeight() / sScaleY) + llceil(mFontFreetype->getDescenderHeight() / sScaleY);
diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h
index 74bdbb43e7..5ed5d2c4eb 100644
--- a/indra/llrender/llfontgl.h
+++ b/indra/llrender/llfontgl.h
@@ -115,6 +115,8 @@ public:
S32 renderUTF8(const std::string &text, S32 begin_offset, S32 x, S32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style = NORMAL, ShadowType shadow = NO_SHADOW) const;
// font metrics - override for LLFontFreetype that returns units of virtual pixels
+ F32 getAscenderHeight() const;
+ F32 getDescenderHeight() const;
S32 getLineHeight() const;
S32 getWidth(const std::string& utf8text) const;