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

Author Topic: How do I get text to look good? It's always blurry  (Read 12408 times)

0 Members and 1 Guest are viewing this topic.

MarthKoopa

  • Guest
How do I get text to look good? It's always blurry
« on: July 29, 2013, 08:41:36 am »
Tried all kinds of different fonts, font sizes, locations, and even versions up to 2.1... but font never looks good.

Is there something I'm missing?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: How do I get text to look good? It's always blurry
« Reply #1 on: July 29, 2013, 09:43:17 am »
Can you show your code, as well as a screenshot of the blurry text?
Laurent Gomila - SFML developer

cpolymeris

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Email
Re: How do I get text to look good? It's always blurry
« Reply #2 on: July 29, 2013, 11:56:30 am »
Tried all kinds of different fonts, font sizes, locations, and even versions up to 2.1... but font never looks good.

Is there something I'm missing?

It happened to me when I started using SFML: I tried using a [-1, 1] view, and loading e.g. 0.5 size fonts. Make sure to load large fonts (30 "pt" at least) and scale them down if necessary. That's because fonts are textures, not vector-based.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: How do I get text to look good? It's always blurry
« Reply #3 on: July 29, 2013, 10:30:23 pm »
Ok, it seems to be related to issue #228.
« Last Edit: August 07, 2013, 07:58:09 am by Laurent »
Laurent Gomila - SFML developer

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: How do I get text to look good? It's always blurry
« Reply #4 on: August 07, 2013, 02:35:28 pm »
Have been trying this but it's not making them much better.  Still not displaying clearly.

Be sure when you scale down that your texture has smoothing set to true.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Jebbs

  • Sr. Member
  • ****
  • Posts: 358
  • DSFML Developer
    • View Profile
    • Email
Re: How do I get text to look good? It's always blurry
« Reply #5 on: August 08, 2013, 06:34:05 am »
I'm not seeing an option for setting a smooth option on text or fonts?

You apply it to the texture instance your text is using, not to the font or text themselves.

http://www.sfml-dev.org/documentation/2.0/classsf_1_1Texture.php#a0c3bd6825b9a99714f10d44179d74324
DSFML - SFML for the D Programming Language.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: How do I get text to look good? It's always blurry
« Reply #6 on: August 08, 2013, 08:05:04 am »
Forget about the smooth option, it is not applicable to fonts/texts.

All you have to know is in #228.
Laurent Gomila - SFML developer