Skip to content

Commit

Permalink
Fallback font is now aligned correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
yvt committed Feb 26, 2014
1 parent db88ee4 commit df81407
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Sources/Client/IFont.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ namespace spades {
if(s->Read(&fontSize, 4) < 4) {
SPRaise("Reading %s: file truncated", path.c_str());
}
fontSize = (float)fontSize;
this->fontSize = (float)fontSize;
fontSizeInverse = 1.f / fontSize;

std::vector<GlyphInfo> infos;
Expand Down Expand Up @@ -240,7 +240,6 @@ namespace spades {
float newScale = scale <= .8f ?
0.5f : std::max(1.f, floorf(scale));
// vertical-align: baseline
// FIXME: not working correctly
offset.y += (scale - newScale) * glyph.size;
scale = newScale;
}
Expand Down

0 comments on commit df81407

Please sign in to comment.