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

Author Topic: Big character size  (Read 2237 times)

0 Members and 1 Guest are viewing this topic.

texus

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • TGUI
    • Email
Big character size
« on: April 05, 2012, 01:09:48 pm »
Is there any reason why a big character size would't work?
I gave a text a size of 400 (accidentally) and the program stopped on the assert in Texture::update.
TGUI: C++ SFML GUI

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Big character size
« Reply #1 on: April 05, 2012, 02:18:15 pm »
Minimal code and exact error message/line please :)
Laurent Gomila - SFML developer

texus

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • TGUI
    • Email
Re: Big character size
« Reply #2 on: April 05, 2012, 02:23:19 pm »
#include <SFML/Graphics.hpp>

int main (int argc, const char * argv[])
{
    sf::Text text("Test");
    text.setCharacterSize(400);

    return 0;
}

The error is this:
Assertion failed: (y + height <= m_size.y), function update, file /Users/me/Documents/SFML2/src/SFML/Graphics/Texture.cpp, line 316.
TGUI: C++ SFML GUI

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Big character size
« Reply #3 on: April 05, 2012, 02:27:22 pm »
Thanks.

It seems like you're using an old graphics card (integrated Intel?), which has a limit of 512x512 for textures. Therefore, SFML cannot put all the characters that you're trying to display in a single texture, which is not supported due to the way glyphs are rendered.
Laurent Gomila - SFML developer

texus

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • TGUI
    • Email
Re: Big character size
« Reply #4 on: April 05, 2012, 02:37:04 pm »
It seems like you're using an old graphics card (integrated Intel?), which has a limit of 512x512 for textures.
Actually I have a Radeon HD 5500 series, but I guess it has something to do with my Mac OS X.

Anyway, it's good to know it is caused by my computer and that I don't have to put a limit on the text size in my program.
Thanks for your help.

TGUI: C++ SFML GUI

 

anything