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

Author Topic: SFML 2.0 Class Text without outline  (Read 1562 times)

0 Members and 1 Guest are viewing this topic.

czerwonymoskit

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
SFML 2.0 Class Text without outline
« on: August 11, 2022, 08:51:40 am »
How to set an outline for text in sfml 2.0? I don't see such a method in the documentation? setOutline?

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: SFML 2.0 Class Text without outline
« Reply #1 on: August 11, 2022, 09:47:42 am »
Text outlines were added (setOutlineThickness & setOutlineColor) in SFML 2.4 exactly 6 years ago, any reason you don't want to use a more recent version of SFML?

Anyway, if you can't update to 2.5, you can make an outline by drawing the same text 8 times around your text with 1 (or more) pixel offset in each direction, or create an outline in a fragment shader if you know some GLSL.

czerwonymoskit

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: SFML 2.0 Class Text without outline
« Reply #2 on: August 12, 2022, 02:12:50 pm »
Now, in the middle of the project, I don't want to change the version. I followed your advice and looped 8 times - it works. I have an outline... thanks
 :)