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

Author Topic: Font size  (Read 1576 times)

0 Members and 1 Guest are viewing this topic.

Mina66

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • Email
Font size
« on: April 18, 2013, 10:07:54 am »
How to know the size of the X?


Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Font size
« Reply #1 on: April 18, 2013, 11:20:46 am »
Not sure. You must play with font.getGlyph('g').bounds, but I don't know the exact formula and I haven't got time to figure it now. The glyph's bounding rect is relative to the base line, and the total height of a line is font.getLineHeight().
Laurent Gomila - SFML developer

Mina66

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • Email
Re: Font size
« Reply #2 on: April 18, 2013, 03:03:41 pm »
and the total height of a line is font.getLineHeight().

I can not find this method
getLineHeight()

I SFML 2.0

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Font size
« Reply #3 on: April 18, 2013, 03:10:54 pm »
Sorry. It's getLineSpacing.
Laurent Gomila - SFML developer

 

anything