remove FontBaseZoom in favor of doubleres font textures. This is cleaner and doesn't have weird interactions with maxwidth, wrapwidthpixels, etc

This commit is contained in:
Chris Danford
2008-05-27 17:08:25 +00:00
parent 94c489bae0
commit 0544328038
34 changed files with 17 additions and 44 deletions
+14 -8
View File
@@ -452,28 +452,34 @@ void BitmapText::SetMaxHeight( float fMaxHeight )
void BitmapText::UpdateBaseZoom()
{
const float fBaseZoom = m_pFont->GetFontBaseZoom();
if( m_fMaxWidth == 0 )
{
this->SetBaseZoomX( fBaseZoom );
this->SetBaseZoomX( 1 );
}
else
{
const float fWidth = GetUnzoomedWidth();
const float fZoom = min( 1, m_fMaxWidth/fWidth ); /* Never increase the zoom. */
this->SetBaseZoomX( fBaseZoom * fZoom );
if( fWidth != 0 ) // don't divide by 0
{
/* Never decrease the zoom. */
const float fZoom = min( 1, m_fMaxWidth/fWidth );
this->SetBaseZoomX( fZoom );
}
}
if( m_fMaxHeight == 0 )
{
this->SetBaseZoomY( fBaseZoom );
this->SetBaseZoomY( 1 );
}
else
{
const float fHeight = GetUnzoomedHeight();
const float fZoom = min( 1, m_fMaxHeight/fHeight ); /* Never increase the zoom. */
this->SetBaseZoomY( fBaseZoom * fZoom );
if( fHeight != 0 ) // don't divide by 0
{
/* Never decrease the zoom. */
const float fZoom = min( 1, m_fMaxHeight/fHeight );
this->SetBaseZoomY( fZoom );
}
}
}