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:
@@ -7,8 +7,8 @@ return Def.ActorFrame {
|
|||||||
LoadFont("_terminator two 60") .. {
|
LoadFont("_terminator two 60") .. {
|
||||||
InitCommand=cmd(y,-150;settext,ScreenString("Warning");diffuse,color("#fef500");strokecolor,color("#0167d2");shadowlength,0);
|
InitCommand=cmd(y,-150;settext,ScreenString("Warning");diffuse,color("#fef500");strokecolor,color("#0167d2");shadowlength,0);
|
||||||
};
|
};
|
||||||
LoadFont("_venacti bold 30") .. {
|
LoadFont("_venacti Bold 15px") .. {
|
||||||
InitCommand=cmd(y,20;settext,ScreenString("BodyText");wrapwidthpixels,1000;strokecolor,color("#0167d2");shadowlength,0);
|
InitCommand=cmd(y,20;settext,ScreenString("BodyText");uppercase,true;wrapwidthpixels,500;strokecolor,color("#0167d2");shadowlength,0);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -5,7 +5,6 @@ LineSpacing=38
|
|||||||
DrawExtraPixelsLeft=3
|
DrawExtraPixelsLeft=3
|
||||||
DrawExtraPixelsRight=0
|
DrawExtraPixelsRight=0
|
||||||
AdvanceExtraPixels=0
|
AdvanceExtraPixels=0
|
||||||
FontBaseZoom=0.5
|
|
||||||
0=12
|
0=12
|
||||||
1=12
|
1=12
|
||||||
2=12
|
2=12
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ LineSpacing=43
|
|||||||
DrawExtraPixelsLeft=3
|
DrawExtraPixelsLeft=3
|
||||||
DrawExtraPixelsRight=0
|
DrawExtraPixelsRight=0
|
||||||
AdvanceExtraPixels=0
|
AdvanceExtraPixels=0
|
||||||
FontBaseZoom=0.5
|
|
||||||
0=0
|
0=0
|
||||||
1=0
|
1=0
|
||||||
2=0
|
2=0
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ DrawExtraPixelsLeft=3
|
|||||||
DrawExtraPixelsRight=0
|
DrawExtraPixelsRight=0
|
||||||
AdvanceExtraPixels=3
|
AdvanceExtraPixels=3
|
||||||
ScaleAllWidthsBy=1.2068965517241379310344827586207
|
ScaleAllWidthsBy=1.2068965517241379310344827586207
|
||||||
FontBaseZoom=0.5
|
|
||||||
0=4
|
0=4
|
||||||
1=4
|
1=4
|
||||||
2=4
|
2=4
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ DrawExtraPixelsLeft=0
|
|||||||
DrawExtraPixelsRight=0
|
DrawExtraPixelsRight=0
|
||||||
AdvanceExtraPixels=3
|
AdvanceExtraPixels=3
|
||||||
ScaleAllWidthsBy=1.2068965517241379310344827586207
|
ScaleAllWidthsBy=1.2068965517241379310344827586207
|
||||||
FontBaseZoom=0.5
|
|
||||||
0=4
|
0=4
|
||||||
1=4
|
1=4
|
||||||
2=4
|
2=4
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ LineSpacing=31
|
|||||||
DrawExtraPixelsLeft=2
|
DrawExtraPixelsLeft=2
|
||||||
DrawExtraPixelsRight=2
|
DrawExtraPixelsRight=2
|
||||||
AdvanceExtraPixels=0
|
AdvanceExtraPixels=0
|
||||||
FontBaseZoom=0.5
|
|
||||||
AddToAllWidths=4
|
AddToAllWidths=4
|
||||||
0=5
|
0=5
|
||||||
1=5
|
1=5
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ LineSpacing=51
|
|||||||
DrawExtraPixelsLeft=0
|
DrawExtraPixelsLeft=0
|
||||||
DrawExtraPixelsRight=0
|
DrawExtraPixelsRight=0
|
||||||
AdvanceExtraPixels=0
|
AdvanceExtraPixels=0
|
||||||
FontBaseZoom=0.5
|
|
||||||
0=7
|
0=7
|
||||||
1=7
|
1=7
|
||||||
2=7
|
2=7
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ LineSpacing=60
|
|||||||
DrawExtraPixelsLeft=0
|
DrawExtraPixelsLeft=0
|
||||||
DrawExtraPixelsRight=0
|
DrawExtraPixelsRight=0
|
||||||
AdvanceExtraPixels=2
|
AdvanceExtraPixels=2
|
||||||
FontBaseZoom=0.5
|
|
||||||
0=12
|
0=12
|
||||||
1=12
|
1=12
|
||||||
2=12
|
2=12
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ DrawExtraPixelsLeft=0
|
|||||||
DrawExtraPixelsRight=0
|
DrawExtraPixelsRight=0
|
||||||
AdvanceExtraPixels=0
|
AdvanceExtraPixels=0
|
||||||
AddToAllWidths=2
|
AddToAllWidths=2
|
||||||
FontBaseZoom=0.5
|
|
||||||
0=6
|
0=6
|
||||||
1=6
|
1=6
|
||||||
2=6
|
2=6
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ LineSpacing=32
|
|||||||
DrawExtraPixelsLeft=4
|
DrawExtraPixelsLeft=4
|
||||||
DrawExtraPixelsRight=4
|
DrawExtraPixelsRight=4
|
||||||
AdvanceExtraPixels=0
|
AdvanceExtraPixels=0
|
||||||
FontBaseZoom=0.5
|
|
||||||
DefaultStrokeColor=#00000077
|
DefaultStrokeColor=#00000077
|
||||||
0=8
|
0=8
|
||||||
1=8
|
1=8
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ LineSpacing=36
|
|||||||
DrawExtraPixelsLeft=1
|
DrawExtraPixelsLeft=1
|
||||||
DrawExtraPixelsRight=0
|
DrawExtraPixelsRight=0
|
||||||
AdvanceExtraPixels=0
|
AdvanceExtraPixels=0
|
||||||
FontBaseZoom=0.5
|
|
||||||
DefaultStrokeColor=#FFFFFF00
|
DefaultStrokeColor=#FFFFFF00
|
||||||
0=15
|
0=15
|
||||||
1=15
|
1=15
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ LineSpacing=40
|
|||||||
DrawExtraPixelsLeft=0
|
DrawExtraPixelsLeft=0
|
||||||
DrawExtraPixelsRight=0
|
DrawExtraPixelsRight=0
|
||||||
AdvanceExtraPixels=0
|
AdvanceExtraPixels=0
|
||||||
FontBaseZoom=0.5
|
|
||||||
DefaultStrokeColor=#FFFFFF
|
DefaultStrokeColor=#FFFFFF
|
||||||
|
|
||||||
[numbers]
|
[numbers]
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ LineSpacing=51
|
|||||||
DrawExtraPixelsLeft=4
|
DrawExtraPixelsLeft=4
|
||||||
DrawExtraPixelsRight=4
|
DrawExtraPixelsRight=4
|
||||||
AdvanceExtraPixels=0
|
AdvanceExtraPixels=0
|
||||||
FontBaseZoom=0.5
|
|
||||||
0=8
|
0=8
|
||||||
1=8
|
1=8
|
||||||
2=8
|
2=8
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ LineSpacing=54
|
|||||||
DrawExtraPixelsLeft=4
|
DrawExtraPixelsLeft=4
|
||||||
DrawExtraPixelsRight=4
|
DrawExtraPixelsRight=4
|
||||||
AdvanceExtraPixels=0
|
AdvanceExtraPixels=0
|
||||||
FontBaseZoom=0.5
|
|
||||||
|
|
||||||
[numbers]
|
[numbers]
|
||||||
0=36
|
0=36
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ LineSpacing=60
|
|||||||
DrawExtraPixelsLeft=0
|
DrawExtraPixelsLeft=0
|
||||||
DrawExtraPixelsRight=0
|
DrawExtraPixelsRight=0
|
||||||
AdvanceExtraPixels=2
|
AdvanceExtraPixels=2
|
||||||
FontBaseZoom=0.5
|
|
||||||
0=24
|
0=24
|
||||||
1=24
|
1=24
|
||||||
2=24
|
2=24
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ LineSpacing=92
|
|||||||
DrawExtraPixelsLeft=1
|
DrawExtraPixelsLeft=1
|
||||||
DrawExtraPixelsRight=0
|
DrawExtraPixelsRight=0
|
||||||
AdvanceExtraPixels=2
|
AdvanceExtraPixels=2
|
||||||
FontBaseZoom=0.5
|
|
||||||
0=21
|
0=21
|
||||||
1=21
|
1=21
|
||||||
2=21
|
2=21
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ LineSpacing=60
|
|||||||
DrawExtraPixelsLeft=2
|
DrawExtraPixelsLeft=2
|
||||||
DrawExtraPixelsRight=0
|
DrawExtraPixelsRight=0
|
||||||
AdvanceExtraPixels=2
|
AdvanceExtraPixels=2
|
||||||
FontBaseZoom=0.5
|
|
||||||
0=24
|
0=24
|
||||||
1=24
|
1=24
|
||||||
2=24
|
2=24
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ LineSpacing=92
|
|||||||
DrawExtraPixelsLeft=2
|
DrawExtraPixelsLeft=2
|
||||||
DrawExtraPixelsRight=0
|
DrawExtraPixelsRight=0
|
||||||
AdvanceExtraPixels=2
|
AdvanceExtraPixels=2
|
||||||
FontBaseZoom=0.5
|
|
||||||
0=21
|
0=21
|
||||||
1=21
|
1=21
|
||||||
2=21
|
2=21
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ LineSpacing=120
|
|||||||
DrawExtraPixelsLeft=8
|
DrawExtraPixelsLeft=8
|
||||||
DrawExtraPixelsRight=8
|
DrawExtraPixelsRight=8
|
||||||
AdvanceExtraPixels=0
|
AdvanceExtraPixels=0
|
||||||
FontBaseZoom=0.5
|
|
||||||
|
|
||||||
[numbers]
|
[numbers]
|
||||||
0=67
|
0=67
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ LineSpacing=24
|
|||||||
DrawExtraPixelsLeft=2
|
DrawExtraPixelsLeft=2
|
||||||
DrawExtraPixelsRight=0
|
DrawExtraPixelsRight=0
|
||||||
AdvanceExtraPixels=0
|
AdvanceExtraPixels=0
|
||||||
FontBaseZoom=0.5
|
|
||||||
0=0
|
0=0
|
||||||
1=0
|
1=0
|
||||||
2=0
|
2=0
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ LineSpacing=29
|
|||||||
DrawExtraPixelsLeft=2
|
DrawExtraPixelsLeft=2
|
||||||
DrawExtraPixelsRight=0
|
DrawExtraPixelsRight=0
|
||||||
AdvanceExtraPixels=2
|
AdvanceExtraPixels=2
|
||||||
FontBaseZoom=0.5
|
|
||||||
0=0
|
0=0
|
||||||
1=0
|
1=0
|
||||||
2=0
|
2=0
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ LineSpacing=28
|
|||||||
DrawExtraPixelsLeft=4
|
DrawExtraPixelsLeft=4
|
||||||
DrawExtraPixelsRight=0
|
DrawExtraPixelsRight=0
|
||||||
AdvanceExtraPixels=0
|
AdvanceExtraPixels=0
|
||||||
FontBaseZoom=0.5
|
|
||||||
0=0
|
0=0
|
||||||
1=0
|
1=0
|
||||||
2=0
|
2=0
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ LineSpacing=96
|
|||||||
DrawExtraPixelsLeft=8
|
DrawExtraPixelsLeft=8
|
||||||
DrawExtraPixelsRight=0
|
DrawExtraPixelsRight=0
|
||||||
AdvanceExtraPixels=0
|
AdvanceExtraPixels=0
|
||||||
FontBaseZoom=0.5
|
|
||||||
|
|
||||||
0=0
|
0=0
|
||||||
1=0
|
1=0
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ DrawExtraPixelsLeft=2
|
|||||||
DrawExtraPixelsRight=0
|
DrawExtraPixelsRight=0
|
||||||
AdvanceExtraPixels=0
|
AdvanceExtraPixels=0
|
||||||
DefaultStrokeColor=#FFFFFF00
|
DefaultStrokeColor=#FFFFFF00
|
||||||
FontBaseZoom=0.5
|
|
||||||
0=0
|
0=0
|
||||||
1=0
|
1=0
|
||||||
2=0
|
2=0
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ LineSpacing=31
|
|||||||
DrawExtraPixelsLeft=3
|
DrawExtraPixelsLeft=3
|
||||||
DrawExtraPixelsRight=0
|
DrawExtraPixelsRight=0
|
||||||
AdvanceExtraPixels=0
|
AdvanceExtraPixels=0
|
||||||
FontBaseZoom=0.5
|
|
||||||
0=0
|
0=0
|
||||||
1=0
|
1=0
|
||||||
2=0
|
2=0
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ LineSpacing=34
|
|||||||
DrawExtraPixelsLeft=3
|
DrawExtraPixelsLeft=3
|
||||||
DrawExtraPixelsRight=0
|
DrawExtraPixelsRight=0
|
||||||
AdvanceExtraPixels=0
|
AdvanceExtraPixels=0
|
||||||
FontBaseZoom=0.5
|
|
||||||
0=0
|
0=0
|
||||||
1=0
|
1=0
|
||||||
2=0
|
2=0
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ LineSpacing=38
|
|||||||
DrawExtraPixelsLeft=3
|
DrawExtraPixelsLeft=3
|
||||||
DrawExtraPixelsRight=0
|
DrawExtraPixelsRight=0
|
||||||
AdvanceExtraPixels=0
|
AdvanceExtraPixels=0
|
||||||
FontBaseZoom=0.5
|
|
||||||
0=0
|
0=0
|
||||||
1=0
|
1=0
|
||||||
2=0
|
2=0
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ LineSpacing=60
|
|||||||
DrawExtraPixelsLeft=5
|
DrawExtraPixelsLeft=5
|
||||||
DrawExtraPixelsRight=0
|
DrawExtraPixelsRight=0
|
||||||
AdvanceExtraPixels=0
|
AdvanceExtraPixels=0
|
||||||
FontBaseZoom=0.5
|
|
||||||
0=0
|
0=0
|
||||||
1=0
|
1=0
|
||||||
2=0
|
2=0
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
Top=5
|
Top=5
|
||||||
LineSpacing=29
|
LineSpacing=29
|
||||||
DrawExtraPixelsLeft=2
|
DrawExtraPixelsLeft=2
|
||||||
FontBaseZoom=0.5
|
|
||||||
|
|
||||||
[numbers]
|
[numbers]
|
||||||
Baseline=24
|
Baseline=24
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ LineSpacing=60
|
|||||||
DrawExtraPixelsLeft=0
|
DrawExtraPixelsLeft=0
|
||||||
DrawExtraPixelsRight=0
|
DrawExtraPixelsRight=0
|
||||||
AdvanceExtraPixels=0
|
AdvanceExtraPixels=0
|
||||||
FontBaseZoom=0.5
|
|
||||||
|
|
||||||
[numbers]
|
[numbers]
|
||||||
Baseline=54
|
Baseline=54
|
||||||
|
|||||||
@@ -452,28 +452,34 @@ void BitmapText::SetMaxHeight( float fMaxHeight )
|
|||||||
|
|
||||||
void BitmapText::UpdateBaseZoom()
|
void BitmapText::UpdateBaseZoom()
|
||||||
{
|
{
|
||||||
const float fBaseZoom = m_pFont->GetFontBaseZoom();
|
|
||||||
|
|
||||||
if( m_fMaxWidth == 0 )
|
if( m_fMaxWidth == 0 )
|
||||||
{
|
{
|
||||||
this->SetBaseZoomX( fBaseZoom );
|
this->SetBaseZoomX( 1 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const float fWidth = GetUnzoomedWidth();
|
const float fWidth = GetUnzoomedWidth();
|
||||||
const float fZoom = min( 1, m_fMaxWidth/fWidth ); /* Never increase the zoom. */
|
if( fWidth != 0 ) // don't divide by 0
|
||||||
this->SetBaseZoomX( fBaseZoom * fZoom );
|
{
|
||||||
|
/* Never decrease the zoom. */
|
||||||
|
const float fZoom = min( 1, m_fMaxWidth/fWidth );
|
||||||
|
this->SetBaseZoomX( fZoom );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_fMaxHeight == 0 )
|
if( m_fMaxHeight == 0 )
|
||||||
{
|
{
|
||||||
this->SetBaseZoomY( fBaseZoom );
|
this->SetBaseZoomY( 1 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const float fHeight = GetUnzoomedHeight();
|
const float fHeight = GetUnzoomedHeight();
|
||||||
const float fZoom = min( 1, m_fMaxHeight/fHeight ); /* Never increase the zoom. */
|
if( fHeight != 0 ) // don't divide by 0
|
||||||
this->SetBaseZoomY( fBaseZoom * fZoom );
|
{
|
||||||
|
/* Never decrease the zoom. */
|
||||||
|
const float fZoom = min( 1, m_fMaxHeight/fHeight );
|
||||||
|
this->SetBaseZoomY( fZoom );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -228,7 +228,6 @@ Font::Font()
|
|||||||
m_iRefCount = 1;
|
m_iRefCount = 1;
|
||||||
m_pDefault = NULL;
|
m_pDefault = NULL;
|
||||||
m_bRightToLeft = false;
|
m_bRightToLeft = false;
|
||||||
m_fFontBaseZoom = 1;
|
|
||||||
m_DefaultStrokeColor = RageColor(1,1,1,1);
|
m_DefaultStrokeColor = RageColor(1,1,1,1);
|
||||||
m_bStrokeIsUnder = true;
|
m_bStrokeIsUnder = true;
|
||||||
}
|
}
|
||||||
@@ -692,7 +691,6 @@ void Font::Load( const RString &sIniPath, RString sChars )
|
|||||||
ini.RenameKey("Char Widths", "main");
|
ini.RenameKey("Char Widths", "main");
|
||||||
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 );
|
|
||||||
RString s;
|
RString s;
|
||||||
if( ini.GetValue( "main", "DefaultStrokeColor", s ) )
|
if( ini.GetValue( "main", "DefaultStrokeColor", s ) )
|
||||||
m_DefaultStrokeColor.FromString( s );
|
m_DefaultStrokeColor.FromString( s );
|
||||||
|
|||||||
@@ -147,7 +147,6 @@ public:
|
|||||||
void SetDefaultGlyph( FontPage *pPage );
|
void SetDefaultGlyph( FontPage *pPage );
|
||||||
|
|
||||||
bool IsRightToLeft() const { return m_bRightToLeft; };
|
bool IsRightToLeft() const { return m_bRightToLeft; };
|
||||||
float GetFontBaseZoom() const { return m_fFontBaseZoom; };
|
|
||||||
const RageColor &GetDefaultStrokeColor() const { return m_DefaultStrokeColor; };
|
const RageColor &GetDefaultStrokeColor() const { return m_DefaultStrokeColor; };
|
||||||
const bool GetStrokeIsUnder() const { return m_bStrokeIsUnder; };
|
const bool GetStrokeIsUnder() const { return m_bStrokeIsUnder; };
|
||||||
|
|
||||||
@@ -168,7 +167,6 @@ private:
|
|||||||
// There may be a better way to handle this.
|
// There may be a better way to handle this.
|
||||||
bool m_bRightToLeft;
|
bool m_bRightToLeft;
|
||||||
|
|
||||||
float m_fFontBaseZoom;
|
|
||||||
RageColor m_DefaultStrokeColor;
|
RageColor m_DefaultStrokeColor;
|
||||||
bool m_bStrokeIsUnder; // draw stroke under if true, over if false
|
bool m_bStrokeIsUnder; // draw stroke under if true, over if false
|
||||||
|
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ cl /Zl /nologo /c verstub.cpp /Fo"$(IntDir)"\
|
|||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalOptions="/MACHINE:I386 "$(intdir)\verstub.obj""
|
AdditionalOptions="/MACHINE:I386 "$(intdir)\verstub.obj""
|
||||||
AdditionalDependencies="libjpeg/jpeg.lib libpng/lib/libpng.lib"
|
AdditionalDependencies="libjpeg/jpeg.lib libpng/lib/libpng.lib"
|
||||||
OutputFile="../Program/StepMania-fastdebug.exe"
|
OutputFile="..\Program\StepMania-fastdebug.exe"
|
||||||
LinkIncremental="2"
|
LinkIncremental="2"
|
||||||
SuppressStartupBanner="TRUE"
|
SuppressStartupBanner="TRUE"
|
||||||
AdditionalLibraryDirectories=""
|
AdditionalLibraryDirectories=""
|
||||||
|
|||||||
Reference in New Issue
Block a user