add DefaultStrokeColor for fonts to turn a Font's stroke layer off by default
This commit is contained in:
@@ -134,6 +134,8 @@ bool BitmapText::LoadFromFont( const RString& sFontFilePath )
|
||||
|
||||
m_pFont = FONT->LoadFont( sFontFilePath );
|
||||
|
||||
this->SetStrokeColor( m_pFont->GetDefaultStrokeColor() );
|
||||
|
||||
BuildChars();
|
||||
|
||||
return true;
|
||||
|
||||
@@ -229,6 +229,7 @@ Font::Font()
|
||||
m_pDefault = NULL;
|
||||
m_bRightToLeft = false;
|
||||
m_fFontBaseZoom = 1;
|
||||
m_DefaultStrokeColor = RageColor(1,1,1,1);
|
||||
}
|
||||
|
||||
Font::~Font()
|
||||
@@ -691,6 +692,9 @@ void Font::Load( const RString &sIniPath, RString sChars )
|
||||
ini.GetValue( "main", "CapitalsOnly", bCapitalsOnly );
|
||||
ini.GetValue( "main", "RightToLeft", m_bRightToLeft );
|
||||
ini.GetValue( "main", "FontBaseZoom", m_fFontBaseZoom );
|
||||
RString s;
|
||||
if( ini.GetValue( "main", "DefaultStrokeColor", s ) )
|
||||
m_DefaultStrokeColor.FromString( s );
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
@@ -148,6 +148,7 @@ public:
|
||||
|
||||
bool IsRightToLeft() const { return m_bRightToLeft; };
|
||||
float GetFontBaseZoom() const { return m_fFontBaseZoom; };
|
||||
const RageColor &GetDefaultStrokeColor() const { return m_DefaultStrokeColor; };
|
||||
|
||||
private:
|
||||
/* List of pages and fonts that we use (and are responsible for freeing). */
|
||||
@@ -167,6 +168,7 @@ private:
|
||||
bool m_bRightToLeft;
|
||||
|
||||
float m_fFontBaseZoom;
|
||||
RageColor m_DefaultStrokeColor;
|
||||
|
||||
/* We keep this around only for reloading. */
|
||||
RString m_sChars;
|
||||
|
||||
Reference in New Issue
Block a user