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

Author Topic: Add "setSmooth" option to font or font texture  (Read 3086 times)

0 Members and 1 Guest are viewing this topic.

ZeroZ30o

  • Newbie
  • *
  • Posts: 47
    • View Profile
Add "setSmooth" option to font or font texture
« on: December 30, 2017, 03:29:45 pm »
https://www.sfml-dev.org/documentation/2.4.2/classsf_1_1Font.php

To achieve "pixel-art" fonts, the texture needs to not be smoothed out -however, by default, it is.

Currently I'm doing:
sf::Texture& texture = const_cast<sf::Texture&>(font.getTexture(size));
texture.setSmooth(false);

But it would be better to have "setSmooth(bool)" on the font or "setSmooth(bool, size)" to only un-smooth a particular size.

Phanoo

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Add "setSmooth" option to font or font texture
« Reply #1 on: January 03, 2018, 03:38:06 pm »
Seems our needs are closely related ! => https://en.sfml-dev.org/forums/index.php?topic=23017.0

You can do it currently, by recompiling sfml and freetype. But yeah, i'd be a nice feature