diff options
Diffstat (limited to 'indra/llrender')
| -rw-r--r-- | indra/llrender/llfontgl.cpp | 16 | ||||
| -rw-r--r-- | indra/llrender/llfontgl.h | 4 | 
2 files changed, 4 insertions, 16 deletions
| diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 7d827ae483..4eb10b2c93 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -225,7 +225,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons  		cur_y += llceil(mFontFreetype->getDescenderHeight());  		break;  	case VCENTER: -		cur_y -= (mFontFreetype->getAscenderHeight() - mFontFreetype->getDescenderHeight()) / 2.f; +		cur_y -= llceil((llceil(mFontFreetype->getAscenderHeight()) - llceil(mFontFreetype->getDescenderHeight())) / 2.f);  		break;  	case BASELINE:  		// Baseline, do nothing. @@ -445,19 +445,9 @@ 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::getLineHeight() const +S32 LLFontGL::getLineHeight() const  {  -	return (F32)llceil(mFontFreetype->getLineHeight() / sScaleY);  -} - -F32 LLFontGL::getAscenderHeight() const -{  -	return (F32)llceil(mFontFreetype->getAscenderHeight() / sScaleY);  -} - -F32 LLFontGL::getDescenderHeight() const -{  -	return (F32)llceil(mFontFreetype->getDescenderHeight() / sScaleY);  +	return llceil(mFontFreetype->getAscenderHeight() / sScaleY) + llceil(mFontFreetype->getDescenderHeight() / sScaleY);  }  S32 LLFontGL::getWidth(const std::string& utf8text) const diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h index dc8d848ed2..9d7e2891e3 100644 --- a/indra/llrender/llfontgl.h +++ b/indra/llrender/llfontgl.h @@ -115,9 +115,7 @@ 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 getLineHeight() const; -	F32 getAscenderHeight() const; -	F32 getDescenderHeight() const; +	S32 getLineHeight() const;  	S32 getWidth(const std::string& utf8text) const;  	S32 getWidth(const llwchar* wchars) const; | 
