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 );
|
m_pFont = FONT->LoadFont( sFontFilePath );
|
||||||
|
|
||||||
|
this->SetStrokeColor( m_pFont->GetDefaultStrokeColor() );
|
||||||
|
|
||||||
BuildChars();
|
BuildChars();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -229,6 +229,7 @@ Font::Font()
|
|||||||
m_pDefault = NULL;
|
m_pDefault = NULL;
|
||||||
m_bRightToLeft = false;
|
m_bRightToLeft = false;
|
||||||
m_fFontBaseZoom = 1;
|
m_fFontBaseZoom = 1;
|
||||||
|
m_DefaultStrokeColor = RageColor(1,1,1,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
Font::~Font()
|
Font::~Font()
|
||||||
@@ -691,6 +692,9 @@ void Font::Load( const RString &sIniPath, RString sChars )
|
|||||||
ini.GetValue( "main", "CapitalsOnly", bCapitalsOnly );
|
ini.GetValue( "main", "CapitalsOnly", bCapitalsOnly );
|
||||||
ini.GetValue( "main", "RightToLeft", m_bRightToLeft );
|
ini.GetValue( "main", "RightToLeft", m_bRightToLeft );
|
||||||
ini.GetValue( "main", "FontBaseZoom", m_fFontBaseZoom );
|
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; };
|
bool IsRightToLeft() const { return m_bRightToLeft; };
|
||||||
float GetFontBaseZoom() const { return m_fFontBaseZoom; };
|
float GetFontBaseZoom() const { return m_fFontBaseZoom; };
|
||||||
|
const RageColor &GetDefaultStrokeColor() const { return m_DefaultStrokeColor; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/* List of pages and fonts that we use (and are responsible for freeing). */
|
/* List of pages and fonts that we use (and are responsible for freeing). */
|
||||||
@@ -167,6 +168,7 @@ private:
|
|||||||
bool m_bRightToLeft;
|
bool m_bRightToLeft;
|
||||||
|
|
||||||
float m_fFontBaseZoom;
|
float m_fFontBaseZoom;
|
||||||
|
RageColor m_DefaultStrokeColor;
|
||||||
|
|
||||||
/* We keep this around only for reloading. */
|
/* We keep this around only for reloading. */
|
||||||
RString m_sChars;
|
RString m_sChars;
|
||||||
|
|||||||
Reference in New Issue
Block a user