Helper class for Text.
More...
#include <TextHelper.hpp>
|
| static int | measureText (const std::string &text, int fontSize) |
| | Measure string width for default font. More...
|
| |
| static Vector2f | measureText (const raylib::text::RlFont &font, const std::string &text) |
| | Measure string width for custom font. More...
|
| |
| static Vector2f | measureText (const raylib::text::RlFont &font, const std::string &text, float fontSize, float spacing=1) |
| | Measure string width for custom font. More...
|
| |
| static int | getGlyphIndex (const raylib::text::RlFont &font, int codepoint) |
| | Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found. More...
|
| |
| static GlyphInfo | getGlyphInfo (const raylib::text::RlFont &font, int codepoint) |
| | Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found. More...
|
| |
| static Rectangle | getGlyphAtlasRec (const raylib::text::RlFont &font, int codepoint) |
| | Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found. More...
|
| |
◆ getGlyphAtlasRec()
| Rectangle raylib::helper::TextHelper::getGlyphAtlasRec |
( |
const raylib::text::RlFont & |
font, |
|
|
int |
codepoint |
|
) |
| |
|
static |
Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found.
- Parameters
-
| font | the font to use |
| codepoint | the codepoint to get the rectangle for |
- Returns
- the rectangle of the codepoint
◆ getGlyphIndex()
Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found.
- Parameters
-
| font | the font to use |
| codepoint | the codepoint to get the index for |
- Returns
- the index of the codepoint
◆ getGlyphInfo()
| GlyphInfo raylib::helper::TextHelper::getGlyphInfo |
( |
const raylib::text::RlFont & |
font, |
|
|
int |
codepoint |
|
) |
| |
|
static |
Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found.
- Parameters
-
| font | the font to use |
| codepoint | the codepoint to get the info for |
- Returns
- the info of the codepoint
◆ measureText() [1/3]
Measure string width for custom font.
- Parameters
-
| font | the font to use |
| text | the text to measure |
- Returns
- the width of the text
◆ measureText() [2/3]
| Vector2f raylib::helper::TextHelper::measureText |
( |
const raylib::text::RlFont & |
font, |
|
|
const std::string & |
text, |
|
|
float |
fontSize, |
|
|
float |
spacing = 1 |
|
) |
| |
|
static |
Measure string width for custom font.
- Parameters
-
| font | the font to use |
| text | the text to measure |
| fontSize | the font size |
| spacing | the spacing between characters |
- Returns
- the width of the text
◆ measureText() [3/3]
| int raylib::helper::TextHelper::measureText |
( |
const std::string & |
text, |
|
|
int |
fontSize |
|
) |
| |
|
static |
Measure string width for default font.
- Parameters
-
| text | the text to measure |
| fontSize | the font size |
- Returns
- the width of the text
The documentation for this class was generated from the following files: