Improved appearance of fallback fonts with the software renderer

This commit is contained in:
yvt 2014-02-14 23:37:59 +09:00
parent cee25473e0
commit 5643f094f4
2 changed files with 11 additions and 9 deletions

View File

@ -52,7 +52,7 @@ namespace spades {
20,
4,
true);
font->SetGlyphYRange(3.f, 17.f);
font->SetGlyphYRange(2.f, 15.f);
SPLog("Font 'CMUSansCondensed' Loaded");
return font;
}

View File

@ -249,14 +249,16 @@ namespace spades {
// margin to make the border completely transparent
// (considering the OpenGL's linear interpolation)
inRect.min.x -= 0.5f;
inRect.min.y -= 0.5f;
outRect.min.x -= 0.5f;
outRect.min.y -= 0.5f;
inRect.max.x += 0.5f;
inRect.max.y += 0.5f;
outRect.max.x += 0.5f;
outRect.max.y += 0.5f;
if(!roundSize){
inRect.min.x -= 0.5f;
inRect.min.y -= 0.5f;
outRect.min.x -= 0.5f;
outRect.min.y -= 0.5f;
inRect.max.x += 0.5f;
inRect.max.y += 0.5f;
outRect.max.x += 0.5f;
outRect.max.y += 0.5f;
}
outRect.min *= scale;
outRect.max *= scale;