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

Author Topic: Glyph outline color  (Read 1113 times)

0 Members and 1 Guest are viewing this topic.

toricray

  • Newbie
  • *
  • Posts: 2
    • View Profile
Glyph outline color
« on: July 07, 2022, 11:01:14 am »
When we working with sf::Text we can set the outline color, but how can I do that when I work with sf::Font/Glyph? I can set glyph outline but it just made it thicker because both glyph and outline are the same color (white).
I need font texture (with all the glyphs) with black outline

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Glyph outline color
« Reply #1 on: July 07, 2022, 11:18:25 am »
As far as I know we just draw the glyph twice, once with an outline and the specific color and once without outline, see the implementation: https://github.com/SFML/SFML/blob/master/src/SFML/Graphics/Text.cpp#L505
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/