Implemented letter spacing in sf::Text.
This commit is contained in:
parent
e31b925234
commit
9e2f2eb27f
2 changed files with 50 additions and 4 deletions
|
@ -144,6 +144,21 @@ public:
|
|||
////////////////////////////////////////////////////////////
|
||||
void setCharacterSize(unsigned int size);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the additional letter spacing offset
|
||||
///
|
||||
/// The spacing between letters is defined by the font.
|
||||
/// This method enables you to set an additional spacing
|
||||
/// between letters. By default the additional letter
|
||||
/// spacing offset is 0.
|
||||
///
|
||||
/// \param spacing New additional letter spacing offset, in pixel
|
||||
///
|
||||
/// \see getLetterSpacing
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
void setLetterSpacing(float spacing);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the text's style
|
||||
///
|
||||
|
@ -260,6 +275,16 @@ public:
|
|||
////////////////////////////////////////////////////////////
|
||||
unsigned int getCharacterSize() const;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the size of the additional letter spacing offset
|
||||
///
|
||||
/// \return Size of the additional letter spacing offset, in pixel
|
||||
///
|
||||
/// \see setLetterSpacing
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
float getLetterSpacing() const;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the text's style
|
||||
///
|
||||
|
@ -385,6 +410,7 @@ private:
|
|||
String m_string; ///< String to display
|
||||
const Font* m_font; ///< Font used to display the string
|
||||
unsigned int m_characterSize; ///< Base size of characters, in pixels
|
||||
float m_letterSpacing; ///< Additional spacing offset between letters, in pixel
|
||||
Uint32 m_style; ///< Text style (see Style enum)
|
||||
Color m_fillColor; ///< Text fill color
|
||||
Color m_outlineColor; ///< Text outline color
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue