Hey everybody!
First of all I must say I really enjoy working with sfml.
I want to create a program that read hebrew and arabic text from files (.txt files). The problem is that I can't hold the text in any string: not std::string, not std::wstring and not sf::String.
here is the minimal code:
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(500, 500), "SFML");
sf::Font font;
font.loadFromFile("ARIALN.ttf");
sf::Text text;
text.setFont(font);
text.setPosition(200.0f, 200.0f);
text.setString("שלום");
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(text);
window.display();
}
return 0;
}
It displays "uiai" with weird sign above each char.
The font I chose supports hebrew letters.
What should I do to fix it?
Thanks.
edit: I noticed that here it changes my hebrew letters to שלום
There should be the word "שלום" instead.