PR 1690 Add font enable / disable smoothing

Also added a check for whether the font is smoothing
This commit is contained in:
Shane Whitmire authored and Lukas Dürrenberger committed 2023-06-26 21:20:24 +02:00
1 parent 7cbcd8f9fa
commit e606b52c39
2 files changed
+49

No files matched your search

+29
View File
@@ -161,6 +161,35 @@ CSFML_GRAPHICS_API float sfFont_getUnderlineThickness(const sfFont* font, unsign
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API const sfTexture* sfFont_getTexture(sfFont* font, unsigned int characterSize);
////////////////////////////////////////////////////////////
/// \brief Enable or disable the smooth filter
///
/// When the filter is activated, the font appears smoother
/// so that pixels are less noticeable. However if you want
/// the font to look exactly the same as its source file,
/// you should disable it.
/// The smooth filter is enabled by default.
///
/// \param font Source font
/// \param smooth sfTrue to enable smoothing, sfFalse to disable it
///
/// \see isSmooth
///
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API void sfFont_setSmooth(sfFont* font, sfBool smooth);
////////////////////////////////////////////////////////////
/// \brief Tell whether the smooth filter is enabled or disabled
///
/// \param font Source font
///
/// \return sfTrue if smoothing is enabled, sfFalse if it is disabled
///
/// \see setSmooth
///
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API const sfBool sfFont_isSmooth(const sfFont* font);
////////////////////////////////////////////////////////////
/// \brief Get the font information
///