support for distance field fonts

This commit is contained in:
Flameshadowxeroshin
2017-10-02 17:00:11 -05:00
parent c1088c1abc
commit e92c8f80a3
3 changed files with 11 additions and 1 deletions
+6
View File
@@ -414,6 +414,10 @@ void BitmapText::DrawChars( bool bUseStrokeTexture )
m_aVertices[i+j].c.a = (unsigned char)( m_aVertices[i+j].c.a * fAlpha );
}
}
bool bDistanceField = m_pFont->IsDistanceField();
if( bDistanceField )
DISPLAY->SetEffectMode( EffectMode_DistanceField );
for( int start = iStartGlyph; start < iEndGlyph; )
{
@@ -443,6 +447,8 @@ void BitmapText::DrawChars( bool bUseStrokeTexture )
start = end;
}
if( bDistanceField )
DISPLAY->SetEffectMode( EffectMode_Normal );
}
/* sText is UTF-8. If not all of the characters in sText are available in the