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

Author Topic: Text blur - problem  (Read 2937 times)

0 Members and 1 Guest are viewing this topic.

Redee

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
Text blur - problem
« on: January 21, 2018, 10:38:00 am »
Texture is ok after resized window, but Text no.
How to contrast edges of Text after resize window and stay at same sf::View to window ?





Hmmmm some partical solution to solve - its set x2 bigger Char size and set 0.5f, 0.5f scale.
But some random cut edges >>



Looks like Text only one way to correct display - View to Window 1 to 1 and Text Scale (1, 1);
Or Render text from own Texture.

Or we can draw to RenderTexture, then to Image, then get need pixels and correct all which not equal Color(0,0,0,0) to One color pixel, then draw point to need coordinate to RenderTexture.

Very bad solution because too much pixels at loop need check.
For example if preRender to 32 x 32 area = 1024 iterations. Its for One character.

Very best solution is direct Render Text at One color, but in SFML not have this functionality.
Like in Photoshop - Anti-Aliasing: None >>

« Last Edit: January 22, 2018, 09:53:43 am by Redee »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Text blur - problem
« Reply #1 on: January 21, 2018, 06:09:41 pm »
Please use the edit function on your post instead of writing 6 different posts.

When rendering text what you do is convert vector information to pixel information, as such when you zoom in you'll obviously end up with text that doesn't look very good.
It's best to render text with the correct size and unzoomed view, as you mentioned already. You can use multiple views.

Additionally, make sure your text is rendered at integer positions, otherwise OpenGL might have to interpolate and you end up with blurry text.

Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Redee

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
Re: Text blur - problem
« Reply #2 on: January 21, 2018, 11:17:42 pm »
Thank You - will try to do this.
Yeeeeeee - its helped me!
Some magic with proportions and save sizes and View.
« Last Edit: January 23, 2018, 10:41:47 am by Redee »

 

anything