Open 3D Engine AtomLyIntegration Gem API Reference  24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::FontRenderer Class Reference

Public Member Functions

int LoadFromFile (const AZStd::string &fileName)
 
int LoadFromMemory (unsigned char *buffer, int bufferSize)
 
int Release ()
 
int SetGlyphBitmapSize (int width, int height, float sizeRatio)
 
int GetGlyphBitmapSize (int *width, int *height)
 
int SetSizeRatio (float sizeRatio)
 
float GetSizeRatio ()
 
int SetEncoding (FT_Encoding encoding)
 
FT_Encoding GetEncoding ()
 
int GetGlyph (GlyphBitmap *glyphBitmap, int *horizontalAdvance, uint8_t *glyphWidth, uint8_t *glyphHeight, int32_t &m_characterOffsetX, int32_t &m_characterOffsetY, int iX, int iY, int characterCode, const FFont::FontHintParams &glyphFlags=FFont::FontHintParams())
 
int GetGlyphScaled (GlyphBitmap *glyphBitmap, int *glyphWidth, int *glyphHeight, int iX, int iY, float scaleX, float scaleY, int characterCode)
 
bool GetMonospaced () const
 
Vec2 GetKerning (uint32_t leftGlyph, uint32_t rightGlyph)
 
float GetAscenderToHeightRatio ()
 

Member Function Documentation

◆ GetGlyph()

int AZ::FontRenderer::GetGlyph ( GlyphBitmap glyphBitmap,
int *  horizontalAdvance,
uint8_t *  glyphWidth,
uint8_t *  glyphHeight,
int32_t &  m_characterOffsetX,
int32_t &  m_characterOffsetY,
int  iX,
int  iY,
int  characterCode,
const FFont::FontHintParams glyphFlags = FFont::FontHintParams() 
)

Populates the given glyphBitmap's buffer from the FreeType bitmap buffer

Parameters
characterCodeUsed as a character index to retrieve the FreeType glyph and it's associated bitmap buffer for the character
glyphBitmapThe FreeType glyph buffer is essentially copied into this GlyphBitmap buffer

The documentation for this class was generated from the following file: