Make glyph a struct

This glyph class should most definetely be a struct. There aren't any
functions into it. This PR is more of a philosophy question than
anything else. I think we should make an argument for and against here
too.
This commit is contained in:
Shane Whitmire 2023-06-25 15:52:49 -05:00 committed by Lukas Dürrenberger
parent a8e901e754
commit b391be2316

View File

@ -38,12 +38,8 @@ namespace sf
/// \brief Structure describing a glyph /// \brief Structure describing a glyph
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_GRAPHICS_API Glyph struct SFML_GRAPHICS_API Glyph
{ {
public:
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
float advance{}; //!< Offset to move horizontally to the next character float advance{}; //!< Offset to move horizontally to the next character
int lsbDelta{}; //!< Left offset after forced autohint. Internally used by getKerning() int lsbDelta{}; //!< Left offset after forced autohint. Internally used by getKerning()
int rsbDelta{}; //!< Right offset after forced autohint. Internally used by getKerning() int rsbDelta{}; //!< Right offset after forced autohint. Internally used by getKerning()
@ -55,7 +51,7 @@ public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \class sf::Glyph /// \struct sf::Glyph
/// \ingroup graphics /// \ingroup graphics
/// ///
/// A glyph is the visual representation of a character. /// A glyph is the visual representation of a character.