mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
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:
parent
689f468e36
commit
6a79ebf1b3
@ -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
|
// Leave a small padding around characters, so that filtering doesn't
|
||||||
// pollute them with pixels from neighbors
|
// pollute them with pixels from neighbors
|
||||||
const unsigned int padding = 1;
|
const unsigned int padding = 2;
|
||||||
|
|
||||||
width += 2 * padding;
|
width += 2 * padding;
|
||||||
height += 2 * padding;
|
height += 2 * padding;
|
||||||
|
@ -50,7 +50,7 @@ namespace
|
|||||||
// Add a glyph quad to the vertex array
|
// 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)
|
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 left = glyph.bounds.left - padding;
|
||||||
float top = glyph.bounds.top - padding;
|
float top = glyph.bounds.top - padding;
|
||||||
|
Loading…
Reference in New Issue
Block a user