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

Author Topic: ["resolved"]blurred sf::string?  (Read 2859 times)

0 Members and 1 Guest are viewing this topic.

Manux

  • Newbie
  • *
  • Posts: 23
    • View Profile
["resolved"]blurred sf::string?
« on: February 08, 2010, 12:27:24 am »
Hello,

I'm loading a font at the same size which I am drawing it, but it's still blurred like it is scaled from a larger font...

any thoughts?

edit(my bad):
Windows XP, SFML 1.5,
Code: [Select]

// loading the font
font13.LoadFromFile("data/font.ttf",13);
// using the font
m_string = new sf::String("",GuiMan.font13,13);
// drawing the font
App.Draw(*m_string);

my usage is quite normal... I only use SetText and SetPosition, the position being a float vector, and putting it to ints will only blur even more...
also, it doesnt happen with every string, it will happen with "ahoy" but not with "ahoyho", and it happens with different fonts.

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
["resolved"]blurred sf::string?
« Reply #1 on: February 08, 2010, 03:48:57 am »
OS, SFML Version, and Code you are using please.
I use the latest build of SFML2

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
["resolved"]blurred sf::string?
« Reply #2 on: February 08, 2010, 08:19:50 am »
And screenshots, please :)
Laurent Gomila - SFML developer

Manux

  • Newbie
  • *
  • Posts: 23
    • View Profile
["resolved"]blurred sf::string?
« Reply #3 on: February 08, 2010, 03:20:01 pm »
Oh well, found it myself, I thought I had commented out a part of the code when I didnt.

I was using SetCenter with floats, at some point when the size of the string was an odd number(41), it's half was something(20) + .5, and that little .5 blurred the text away.

I thought that by default text wouldnt use float precision, how fool of me  :lol: