SFML community forums

Help => Graphics => Topic started by: Manux on February 08, 2010, 12:27:24 am

Title: ["resolved"]blurred sf::string?
Post by: Manux 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.
Title: ["resolved"]blurred sf::string?
Post by: OniLinkPlus on February 08, 2010, 03:48:57 am
OS, SFML Version, and Code you are using please.
Title: ["resolved"]blurred sf::string?
Post by: Laurent on February 08, 2010, 08:19:50 am
And screenshots, please :)
Title: ["resolved"]blurred sf::string?
Post by: Manux 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: