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

Author Topic: Font Sizes, how do they work?!  (Read 2778 times)

0 Members and 1 Guest are viewing this topic.

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
Font Sizes, how do they work?!
« on: September 17, 2011, 03:32:45 am »
I know that font size works by setting the height of a specific character to the chosen height in pixels, and scales other pixels accordingly, but I forget which character this is.
Also, if I set the font size to 12, what's the height of the tallest character in an average font, say Arial?
I use the latest build of SFML2

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Font Sizes, how do they work?!
« Reply #1 on: September 17, 2011, 09:20:34 am »
The character size is the maximum size that a character can have. Which one it is depends on the font. But why do you want to know that?
Laurent Gomila - SFML developer

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
Font Sizes, how do they work?!
« Reply #2 on: September 17, 2011, 09:44:00 pm »
Quote from: "Laurent"
The character size is the maximum size that a character can have. Which one it is depends on the font. But why do you want to know that?
I'm dealing with finicky sub-window titles, and I need the height of the top bar to be just right for the title text. I'm working on a custom GUI system with sub-windows, although right now I'm tempted to just ditch the custom sub-windows and let users of the library just use sf::RenderWindow.
I use the latest build of SFML2

 

anything