diff --git a/stepmania/src/BitmapText.cpp b/stepmania/src/BitmapText.cpp index 4a483df691..24d3434fa0 100644 --- a/stepmania/src/BitmapText.cpp +++ b/stepmania/src/BitmapText.cpp @@ -171,17 +171,10 @@ void BitmapText::BuildChars() const glyph &g = m_pFont->GetGlyph(szLine[j]); /* set vertex positions */ - float vshift = float(g.fp->vshift); - - /* If either the font or the glyph is kanji, align the character - * centers. (Otherwise, leave it aligned at the baseline.) */ - if(m_pFont->IsKanjiFont() || g.fp->kanji) - vshift += g.fp->GetCenter() - m_pFont->GetCenter(); - - v[0].p = RageVector3( iX+g.hshift, iY+vshift, 0 ); // top left - v[1].p = RageVector3( iX+g.hshift, iY+vshift+g.height, 0 );// bottom left - v[2].p = RageVector3( iX+g.hshift+g.width, iY+vshift+g.height, 0 );// bottom right - v[3].p = RageVector3( iX+g.hshift+g.width, iY+vshift, 0 ); // top right + v[0].p = RageVector3( iX+g.hshift, iY+g.fp->vshift, 0 ); // top left + v[1].p = RageVector3( iX+g.hshift, iY+g.fp->vshift+g.height, 0 ); // bottom left + v[2].p = RageVector3( iX+g.hshift+g.width, iY+g.fp->vshift+g.height, 0 ); // bottom right + v[3].p = RageVector3( iX+g.hshift+g.width, iY+g.fp->vshift, 0 ); // top right /* Advance the cursor. */ iX += g.hadvance; diff --git a/stepmania/src/Font.cpp b/stepmania/src/Font.cpp index 03f2004653..8964c45f56 100644 --- a/stepmania/src/Font.cpp +++ b/stepmania/src/Font.cpp @@ -39,8 +39,6 @@ void FontPage::Load( const FontPageSettings &cfg ) m_pTexture = TEXTUREMAN->LoadTexture( m_sTexturePath ); ASSERT( m_pTexture != NULL ); - kanji = cfg.Kanji; - // load character widths vector FrameWidths; int i; @@ -99,7 +97,7 @@ void FontPage::Load( const FontPageSettings &cfg ) } /* Shift the character up so the top will be rendered at the baseline. */ - vshift = -baseline; + vshift = (float) -baseline; SetTextureCoords(FrameWidths); SetExtraPixels(cfg.DrawExtraPixelsLeft, cfg.DrawExtraPixelsRight); @@ -440,7 +438,6 @@ void Font::LoadFontPageSettings(FontPageSettings &cfg, IniFile &ini, const CStri ini.GetValueI( PageName, "LineSpacing", cfg.LineSpacing ); ini.GetValueI( PageName, "Top", cfg.Top ); ini.GetValueI( PageName, "Baseline", cfg.Baseline ); - ini.GetValueB( PageName, "Kanji", cfg.Kanji ); /* Iterate over all keys. */ const IniFile::key *k = ini.GetKey(PageName); diff --git a/stepmania/src/Font.h b/stepmania/src/Font.h index 0475e19e2c..1cbebb72e4 100644 --- a/stepmania/src/Font.h +++ b/stepmania/src/Font.h @@ -45,7 +45,6 @@ struct FontPageSettings Top, Baseline; float ScaleAllWidthsBy; - bool Kanji; map CharToGlyphNo; /* If a value is missing, the width of the texture frame is used. */ @@ -57,8 +56,7 @@ struct FontPageSettings LineSpacing(-1), ScaleAllWidthsBy(1), Top(-1), - Baseline(-1), - Kanji(false) + Baseline(-1) { } }; @@ -81,8 +79,8 @@ public: /* Page-global properties. */ int height; - bool kanji; - int LineSpacing, vshift; + int LineSpacing; + float vshift; int GetCenter() const { return height/2; } private: @@ -120,7 +118,6 @@ public: void CapsOnly(); int GetHeight() const { return def->height; } - bool IsKanjiFont() const { return def->kanji; } int GetCenter() const { return def->GetCenter(); } int GetLineSpacing() const { return def->LineSpacing; }