Interface for font instance that can be used to query glyph metadata and bitmaps.
More...
#include <IFontInstance.h>
Interface for font instance that can be used to query glyph metadata and bitmaps.
◆ ~IFontInstance()
virtual ramses::IFontInstance::~IFontInstance |
( |
| ) |
|
|
virtualdefault |
◆ getAllSupportedCharacters()
virtual std::unordered_set<unsigned long> ramses::IFontInstance::getAllSupportedCharacters |
( |
| ) |
|
|
pure virtual |
Get all characters that are supported (mapped to a glyph) by IFontInstance.
- Returns
- set with all supported UTF32 char codes
◆ getAscender()
virtual int ramses::IFontInstance::getAscender |
( |
| ) |
const |
|
pure virtual |
Get the line ascender of the font instance (see Freetype2 docs)
- Returns
- Line ascender (in rasterized texels of glyphs)
◆ getDescender()
virtual int ramses::IFontInstance::getDescender |
( |
| ) |
const |
|
pure virtual |
Get the line descender of the font instance (see Freetype2 docs)
- Returns
- Line descender (in rasterized texels of glyphs)
◆ getHeight()
virtual int ramses::IFontInstance::getHeight |
( |
| ) |
const |
|
pure virtual |
Get the line height of the font instance.
- Returns
- Line height (in rasterized texels of glyphs)
◆ loadAndAppendGlyphMetrics()
virtual void ramses::IFontInstance::loadAndAppendGlyphMetrics |
( |
std::u32string::const_iterator |
charsBegin, |
|
|
std::u32string::const_iterator |
charsEnd, |
|
|
GlyphMetricsVector & |
positionedGlyphs |
|
) |
| |
|
pure virtual |
Load the glyphs metrics for all characters in a string and appends them to the provided vector of GLYPHS.
- Parameters
-
[in] | charsBegin | Iterator for the beginning of characters from UTF32 string that should be loaded |
[in] | charsEnd | Iterator for the end of characters from UTF32 string that should be loaded |
[out] | positionedGlyphs | Vector of glyphs to which newly loaded glyph metrics are appended |
◆ loadGlyphBitmapData()
virtual GlyphData ramses::IFontInstance::loadGlyphBitmapData |
( |
GlyphId |
glyphId, |
|
|
uint32_t & |
sizeX, |
|
|
uint32_t & |
sizeY |
|
) |
| |
|
pure virtual |
Load the glyph data for a specific glyph id.
- Parameters
-
[in] | glyphId | Id of glyph for which to load data |
[out] | sizeX | Width of glyph data |
[out] | sizeY | Height of glyph data |
- Returns
- The glyph data if glyphId is found, or empty glyph data otherwise
◆ supportsCharacter()
virtual bool ramses::IFontInstance::supportsCharacter |
( |
char32_t |
character | ) |
const |
|
pure virtual |
Check if font instance supports a char using it's UTF32 char code and cache the result.
- Parameters
-
[in] | character | The UTF32 char code of the character |
- Returns
- True if the character is supported, false otherwise
The documentation for this class was generated from the following file:
- /home/runner/work/ramses/ramses/client/ramses-client/ramses-text-api/include/ramses-text-api/IFontInstance.h