SFML community forums

Help => Graphics => Topic started by: RomeEmperor on May 14, 2022, 04:32:00 pm

Title: Render sf::Text in HD quality using sf::View
Post by: RomeEmperor on May 14, 2022, 04:32:00 pm
Hey!
I'm developing a co-op game and i need to draw nicknames with good quality of sf::Text. It's could be easier if the sf::View size was 1920x1080, but in my game it is 300x300.
I made a test project (https://github.com/JusticeShurup/ViewAndTextTest)

main.cpp
(click to show/hide)

result:
(click to show/hide)

As you can see the quality leaves much to be desired.

We can resize current sf::View to 1920x1080 and after resize to 300x300.
code:
(click to show/hide)
result
(click to show/hide)

Everything would be fine if not for one problem. This nickname moves, when you move camera and i don't know why.
(click to show/hide)
This happens without assigning a position to a nick. I can assign a position to a nickname, but that won't solve the other problem, which is that I won't be able to add other players' nicknames, as they will be in the wrong places.

Is it possible to display text in HD quality and still have it's actual size?

Title: Re: Render sf::Text in HD quality using sf::View
Post by: eXpl0it3r on August 04, 2022, 12:11:53 am
Sorry for the late reply :-\
Unfortunately, I can't see the images (anymore).

For text rendering there are a few important things to consider.