Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Text set outline results in uneven outlines  (Read 1784 times)

0 Members and 1 Guest are viewing this topic.

dk123

  • Newbie
  • *
  • Posts: 49
    • View Profile
Text set outline results in uneven outlines
« on: August 30, 2016, 02:26:16 pm »
Hi, I've been testing out the outline feature shipped with sfml 2.4, but I'm noticing uneven outlines.
I've set my outline colour to black (0,0,0,255) and an outline thickness of 1.5, but as you can see in the screenshot, the outline thicknesses are uneven (even within the same letter)


Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Text set outline results in uneven outlines
« Reply #1 on: August 30, 2016, 02:46:10 pm »
First make sure that your final text position has integer coordinates (check your current view, the text position, its origin, the viewport, ...). You'll always get artifacts when drawing stuff at decimal pixel positions. Then try integer outline thickness; it's not required, but since it's a new feature, there may be bugs.
Laurent Gomila - SFML developer

dk123

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: Text set outline results in uneven outlines
« Reply #2 on: August 31, 2016, 03:38:57 am »
Rounding the position down to integer coordinates solved the issue. Thanks!