Fixed text rendering artifacts on Radeon cards, revised.

Reverted the padding used for drawing to 1.0 and increased the padding during glyph generation instead.
This commit is contained in:
Radek Dutkiewicz 2019-10-23 00:53:34 +01:00 committed by Lukas Dürrenberger
parent 689f468e36
commit 6a79ebf1b3
2 changed files with 2 additions and 2 deletions

View File

@ -601,7 +601,7 @@ Glyph Font::loadGlyph(Uint32 codePoint, unsigned int characterSize, bool bold, f
{
// Leave a small padding around characters, so that filtering doesn't
// pollute them with pixels from neighbors
const unsigned int padding = 1;
const unsigned int padding = 2;
width += 2 * padding;
height += 2 * padding;

View File

@ -50,7 +50,7 @@ namespace
// Add a glyph quad to the vertex array
void addGlyphQuad(sf::VertexArray& vertices, sf::Vector2f position, const sf::Color& color, const sf::Glyph& glyph, float italicShear, float outlineThickness = 0)
{
float padding = 0.5;
float padding = 1.0;
float left = glyph.bounds.left - padding;
float top = glyph.bounds.top - padding;