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

Author Topic: sf::Text and line spacing  (Read 4718 times)

0 Members and 1 Guest are viewing this topic.

dk123

  • Newbie
  • *
  • Posts: 49
    • View Profile
sf::Text and line spacing
« on: November 07, 2014, 04:40:12 am »
Hi, I'm seeing that SFML currently doesn't have an option to
specifically set the spacing between lines in pixels for text.

This would be great for making small adjustments to text
to make it display better on screen.
(Instead of perhaps the lines too far apart, or too cramped up
top-bottom to each other)

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: sf::Text and line spacing
« Reply #1 on: November 07, 2014, 09:04:32 am »
Although SFML doesn't provide this, it uses the line spacing defined by the font, so modifying the font file should be an option.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: sf::Text and line spacing
« Reply #2 on: November 07, 2014, 01:42:04 pm »
http://en.sfml-dev.org/forums/index.php?topic=16451.0

Since we already more or less agreed on letter spacing, I think we can get line spacing done as well ;)
Laurent Gomila - SFML developer

dk123

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: sf::Text and line spacing
« Reply #3 on: November 07, 2014, 09:44:01 pm »
Although SFML doesn't provide this, it uses the line spacing defined by the font, so modifying the font file should be an option.

While possible, I feel doing that is terribly inconvenient. Especially if you want to make small adjustments, check how it looks like on screen, and iterate the process until you feel it's just right.

http://en.sfml-dev.org/forums/index.php?topic=16451.0

Since we already more or less agreed on letter spacing, I think we can get line spacing done as well ;)

Thanks, this is great to hear!  :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: sf::Text and line spacing
« Reply #4 on: November 07, 2014, 10:10:06 pm »
In the meantime, you can split your text into one instance per line, and adjust their vertical spacing.
Laurent Gomila - SFML developer