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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Twenty

Pages: [1]
1
Graphics / How do I disable font smoothing?
« on: May 02, 2024, 10:31:17 pm »
Hi, I know that there's been one hundred thousand posts about this issue before, but I couldn't find anything helpful, so I'm writting my post.

The issue is well known: if you try to use small (pixel) fonts, SFML tries to smooth characters. Which looks ugly when it comes to pixel games. How do I disable font smoothing?

I tried to find the solution myself, but nothing worked.

The first way was modifying Font.cpp and changing FT_RENDER_MODE_NORMAL to FT_RENDER_MODE_MONO. It didn't work because I couldn't find Font.cpp. I mean, I know it's kind of weird, Font.cpp must be somewhere in the SFML folder, but I can't find it whatsoever! cpp's are usually stored in the folder called src, but I didn't find even that. I thought something happened to my folder and I downloaded the archive from this site, but even it didn't contained Font.cpp

The second option was using sf::Font::setSmooth(bool).
But my compliler said it wasn't an option:

Pages: [1]