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

Author Topic: Font doesn't render wstring characters. Need some help...  (Read 1378 times)

0 Members and 2 Guests are viewing this topic.

dydya-stepa

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Font doesn't render wstring characters. Need some help...
« on: August 02, 2011, 08:26:20 pm »
Created a font and a string like this:

font.LoadFromFile("arial.ttf");

text.SetFont(font);
text.SetText(myText);
text.SetSize(12.0f);
text.SetPosition(x, y);

where myText is an std::wstring.

It renders only english characters.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Font doesn't render wstring characters. Need some help...
« Reply #1 on: August 03, 2011, 08:03:15 am »
When you load the font, you have a 3rd (optional) parameter which defines the set of characters that it will be able to render. By default, the character set includes all the printable characters of the Latin-1 encoding, but you can define your own one if it's not enough.
Laurent Gomila - SFML developer