Loading...
Searching...
No Matches
Text.hpp
Go to the documentation of this file.
7// In no event will the authors be held liable for any damages arising from the use of this software.
495 [[deprecated("Use getShapedGlyphs() instead")]] [[nodiscard]] Vector2f findCharacterPos(std::size_t index) const;
707 void(const ShapedGlyph& shapedGlyph, std::uint32_t& style, Color& fillColor, Color& outlineColor, float& outlineThickness)>;
Abstract base class for objects that can be drawn to a render target.
Definition Drawable.hpp:44
Base class for all render targets (window, texture, ...).
Definition RenderTarget.hpp:63
Utility string class that automatically handles conversions between types and encodings.
Definition String.hpp:91
LineAlignment getLineAlignment() const
Get the line alignment for a multi-line text.
Text(const Font &font, String string="", unsigned int characterSize=30)
Construct the text from a string, font and size.
VertexArray & getOutlineVertexData() const
Get a reference to the outline vertex data of this text.
Vector2f findCharacterPos(std::size_t index) const
Return the position of the index-th character.
FloatRect getLocalBounds() const
Get the local bounding rectangle of the entity.
ClusterGrouping getClusterGrouping() const
Return the cluster grouping algorithm in use.
void setLineAlignment(LineAlignment lineAlignment)
Set the line alignment for a multi-line text.
void setGlyphPreProcessor(GlyphPreProcessor glyphPreProcessor)
Set the glyph pre-processor to be called per glyph.
const std::vector< ShapedGlyph > & getShapedGlyphs() const
Return a list of shaped glyphs that make up the text.
void setClusterGrouping(ClusterGrouping clusterGrouping)
Set the cluster grouping algorithm to use.
void setOutlineThickness(float thickness)
Set the thickness of the text's outline.
VertexArray & getVertexData() const
Get a reference to the vertex data of this text.
FloatRect getGlobalBounds() const
Get the global bounding rectangle of the entity.
Text(const Font &&font, String string="", unsigned int characterSize=30)=delete
Disallow construction from a temporary font.
void setTextOrientation(TextOrientation textOrientation)
Set the text orientation.
float getOutlineThickness() const
Get the outline thickness of the text.
std::function< void(const ShapedGlyph &shapedGlyph, std::uint32_t &style, Color &fillColor, Color &outlineColor, float &outlineThickness)> GlyphPreProcessor
Callable that is provided with glyph data for pre-processing.
Definition Text.hpp:706
Definition AudioResource.hpp:36
std::size_t vertexOffset
Starting offset of the vertex data belonging to this glyph.
Definition Text.hpp:135