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

Author Topic: SFML Default Font is Working  (Read 3638 times)

0 Members and 2 Guests are viewing this topic.

Xander314

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
    • http://sfmlcoder.wordpress.com/
    • Email
SFML Default Font is Working
« on: June 27, 2011, 06:02:32 pm »
Peculiar title, I know ;)

Anyway, I was trying to reproduce some of the SFML font errors so I could point them out in the Fonts & Texts tutorial I am making. However, I was unable to do so.

Linking to static/dynamic and debug/release, the following code worked:
Code: [Select]

#include <SFML/Graphics.hpp>

int main()
{
sf::Text text("Hobo!");
sf::RenderWindow Window(sf::VideoMode(800, 600, 32), "Hello World!");

while (Window.IsOpened())
{
sf::Event Event;
while (Window.PollEvent(Event))
{
switch (Event.Type)
{
case sf::Event::Closed:
Window.Close();
break;
default:
break;
}
}

Window.Clear();
Window.Draw(text);
Window.Display();
}

return 0;
}


Are all the default font troubles and the related issues with dynamic linkage fixed now, or is this just an intermittent reprise?

Contadotempo

  • Full Member
  • ***
  • Posts: 167
  • Firelink Shrine
    • View Profile
SFML Default Font is Working
« Reply #1 on: June 27, 2011, 07:50:11 pm »
For those who are not inside the subject (me  :P), what should the errors be?

I've never had any problems with the default font in the past, or if I did, I didn't notice.

Haikarainen

  • Guest
SFML Default Font is Working
« Reply #2 on: July 02, 2011, 07:45:05 am »
I remember i didnt always get that error when using SFML1.6, but are you sure you are using the right version of SFML to reproduce the error(1.6) ? Check both linkage and DLL-files! Also includefiles

Xander314

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
    • http://sfmlcoder.wordpress.com/
    • Email
SFML Default Font is Working
« Reply #3 on: July 02, 2011, 08:47:04 am »
I am using 2.0, but I have definitely had the issue previously with 2.0. At least, I have had an issue which involved unexplained crashes during the construction of sf::Text using an sf::Font object and during destruction of such objects too, which persisted even without the default font. Linking statically fixed it for me then.

Maybe this was in fact a separate bug and it has now been fixed?

Quote
using SFML1.6

So the infamous default font issue is not present in 2.0? How long ago was it fixed?

Haikarainen

  • Guest
SFML Default Font is Working
« Reply #4 on: July 02, 2011, 09:49:42 am »
Quote from: "Xander314"
I am using 2.0, but I have definitely had the issue previously with 2.0. At least, I have had an issue which involved unexplained crashes during the construction of sf::Text using an sf::Font object and during destruction of such objects too, which persisted even without the default font. Linking statically fixed it for me then.

Maybe this was in fact a separate bug and it has now been fixed?

Quote
using SFML1.6

So the infamous default font issue is not present in 2.0? How long ago was it fixed?


Cant remember, but it's likely that sfml2 was available before the bug had been fixed. I use sf::Text's alot and havent had an issue with it since i transferred to SFML2(wich was pretty recently)

Xander314

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
    • http://sfmlcoder.wordpress.com/
    • Email
SFML Default Font is Working
« Reply #5 on: July 02, 2011, 11:32:26 am »
Excellent. That means I can almost leave it out of my SFML fonts and text tutorial (I'll just say if it you get the error then upgrade lol).