You are not logged in.
A few days ago I wanted to build and install SFML on my fresh Arch Linux, so I downloaded the source from the github page, installed a few dependencies and built it with Cmake. I installed the library at /usr/local.
After I compiled a simple program using the libary, I noticed some strange behavior; if I wanted to draw text, it wasn't placed in the position I defined. The same problem occurred under Linux Mint 17, but on that system I was using the libsfml-dev package, and didn't compile it from source.
Thinking that the problem relied in the SFML library, I posted a topic in the SFML Forums. It turned out that the problem wasn't caused by SFML, but by Linux. A strange fact is that the problem didn't occurr to other users in the SFML forums. After I reinstalled my Mint 17, and avoided to install libsfml-dev, the problem didn't occurr and I thought that it was the fault of the libsfml-dev package.
So when I installed Arch Linux a few days ago, I didn't install SFML from the AUR, but downloaded and built SFML from Source instead. The strange thing is, that the problem now occurrs on Arch Linux, although it's freshly installed, and I built SFML from source. I tried to uninstall the library manually, and Install SFML from the AUR with yaourt, in the hope that this would fix my issue, but it didn't, so I uninstalled the SFML AUR package with the command yaourt -Rs sfml .(That command should have removed the package completely, shouldn't it?)
Does somebody have an idea what I could try in order to solve my problem?
Offline
... yaourt -Rs sfml .(That command should have removed the package completely, shouldn't it?)
There is not package in the aur called sfml. There is sfml1.6 or sfml-git, or a few other variants, but no 'sfml', so that command should not have done anything.
Does somebody have an idea what I could try in order to solve my problem?
First you could actually describe the problem. All you've said is that something is drawn at the wrong position.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I'm sorry, I meant the sfml package from the community repositories, not from the AUR.
Here's the problem:
If I compile the following C++ code, using the facile sans font :
#include <SFML/Graphics.hpp>
#include <iostream>
using namespace std;
int main()
{
sf::RenderWindow window(sf::VideoMode(500, 500), "Example");
sf::Font font;
font.loadFromFile("Facile Sans.ttf");
sf::Text text;
text.setFont(font);
text.setPosition(0, 0); // (0, -20) looks good
text.setCharacterSize(84);
text.setString("Text");
text.setColor(sf::Color::Black);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear(sf::Color::White);
window.draw(text);
window.display();
}
return 0;
}
The output looks like this on linux:
If I compile the same code on windows, it looks like this:
It seems like that, for some reason, some space is left on top of the text, so that characters like "ê" can be displayed correctly. The weird thing is, that this problem didn't occurr to the other users in the SFML forums, whether they were using fedora or arch. Also, it worked for me, after I reinstalled Linux Mint 17 and built SFML from source directly, without installing the libsfml-dev package. Now this problem occurrs on my freshly installed arch linux, although I built SFML from source directly. In order to fix my issue, I tried to uninstall SFML and install the sfml package from the community repositories instead, with no luck; so I uninstalled the sfml package with yaourt -Rs sfml or pacman -Rs sfml (I don't remember which command I used).
Offline
Nevermind, it seems like the problem is fixed. With the latest SFML source from GitHub compiled under Win7 I get the same results as on Linux.
Offline