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

Author Topic: defaultfont charactersize  (Read 3528 times)

0 Members and 1 Guest are viewing this topic.

thoniel

  • Newbie
  • *
  • Posts: 21
    • ICQ Messenger - 157157736
    • View Profile
defaultfont charactersize
« on: July 19, 2009, 10:16:27 pm »
hi
is there any chance to change the character size of the default font (using dotnet)?

im writing a very simple gui and i dont want to have to load a font from file if not neccessary, but the default font provided by sfml is way to big.

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
defaultfont charactersize
« Reply #1 on: July 19, 2009, 10:29:41 pm »
That's currently not possible. The default character size of 30 is hardcoded. It's difficult to say where that size could be provided. But since it's a *default font*, the easiest way for you would be to indeed load a font by yourself and specify the size you wanted.

thoniel

  • Newbie
  • *
  • Posts: 21
    • ICQ Messenger - 157157736
    • View Profile
defaultfont charactersize
« Reply #2 on: July 19, 2009, 10:43:29 pm »
sure but that way i need to deliver a font with the dll and i dont like to have external dependencies where i have no control (room for human errors)

but it seems i have no choice. thanks

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
defaultfont charactersize
« Reply #3 on: July 19, 2009, 10:59:23 pm »
You can change the size of the string independently of the size of the font it uses.

With dotnet you can also embed files in your executable as resources.
Laurent Gomila - SFML developer

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
defaultfont charactersize
« Reply #4 on: July 20, 2009, 12:56:45 am »
Quote from: "Laurent"
You can change the size of the string independently of the size of the font it uses.

True, but that's often ugly-looking. I prefer to use an equal-sized font for sf::Strings.

@thoniel:
Human error? Well, if one extracts a ZIP archive for example, what bad things can happen? ;)

thoniel

  • Newbie
  • *
  • Posts: 21
    • ICQ Messenger - 157157736
    • View Profile
defaultfont charactersize
« Reply #5 on: July 20, 2009, 10:05:46 am »
well yeah. would have been great if it was avoidable. but i will try in the future to embed the font into the resources.

thanks