9 #ifndef RAMSES_TEXT_IFONTINSTANCE_H
10 #define RAMSES_TEXT_IFONTINSTANCE_H
15 #include <unordered_set>
#define RAMSES_API
Definition: APIExport.h:35
Interface for font instance that can be used to query glyph metadata and bitmaps.
Definition: IFontInstance.h:23
virtual int getAscender() const =0
Get the line ascender of the font instance (see Freetype2 docs)
virtual GlyphData loadGlyphBitmapData(GlyphId glyphId, uint32_t &sizeX, uint32_t &sizeY)=0
Load the glyph data for a specific glyph id.
virtual bool supportsCharacter(char32_t character) const =0
Check if font instance supports a char using it's UTF32 char code and cache the result.
virtual int getDescender() const =0
Get the line descender of the font instance (see Freetype2 docs)
virtual int getHeight() const =0
Get the line height of the font instance.
virtual void loadAndAppendGlyphMetrics(std::u32string::const_iterator charsBegin, std::u32string::const_iterator charsEnd, GlyphMetricsVector &positionedGlyphs)=0
Load the glyphs metrics for all characters in a string and appends them to the provided vector of GLY...
virtual ~IFontInstance()=default
Empty destructor.
virtual std::unordered_set< unsigned long > getAllSupportedCharacters()=0
Get all characters that are supported (mapped to a glyph) by IFontInstance.
The RAMSES namespace contains all client side objects and functions used to implement RAMSES applicat...
Definition: AnimatedProperty.h:15
std::vector< uint8_t > GlyphData
Stores 2-dimensional glyph pixel data as a flat memory array.
Definition: Glyph.h:23
std::vector< GlyphMetrics > GlyphMetricsVector
Vector of GlyphMetrics elements.
Definition: GlyphMetrics.h:42