Welcome, Guest. Please login or register.

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

0 Members and 1 Guest are viewing this topic.

OniLinkPlus

  • Sr. Member
  • ****
  • Posts: 498
    • View Profile
Font Sizes, how do they work?!
« on: September 17, 2011, 01: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: 27423
    • View Profile
    • SFML's website
    • Email
Font Sizes, how do they work?!
« Reply #1 on: September 17, 2011, 07: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

  • Sr. Member
  • ****
  • Posts: 498
    • View Profile
Font Sizes, how do they work?!
« Reply #2 on: September 17, 2011, 07: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