public

Inheritance Graph

graph BT
	BitmapFont
	BitmapFont --> AbstractFont
	click BitmapFont "classGUI_1_1BitmapFont"
	click AbstractFont "classGUI_1_1AbstractFont"

Description

Classes

   
struct GUI::BitmapFont::Glyph

Public Types

   
   
typedef std::unordered_map< uint32_t, Glyph > typefaceMap_t

Public Static Functions

   
   
Util::Reference < BitmapFont > createFont(const Util::FileName & fontFile, uint32_t fontSize, const std::string & charMap_utf8)

Public Functions

   
   
  BitmapFont( Util::Reference < ImageData > bitmap, int lineHeight)
   
  ~BitmapFont()
   
void addGlyph(uint32_t characterCode, uint32_t width, uint32_t height, const Geometry::Vec2i & textureOffset, const Geometry::Vec2i & screenOffset, int xAdvance)
   
const Glyph & getGlyph(uint32_t characterCode) const
   
const Util::Reference < Util::Bitmap > getBitmap() const
   
void setKerning(uint32_t first, uint32_t second, int16_t amount)
   
void setTabWidth(uint32_t s)
   
void enable()
   
void disable()
   
void renderText(const Geometry::Vec2 & pos, const std::string & text, const Util::Color4ub & color)
   
Geometry::Vec2 getRenderedTextSize(const std::string & text)

Documentation

typedef
GUI::BitmapFont::typefaceMap_t

public
 
 
typedef std::unordered_map< uint32_t, Glyph > typefaceMap_t

Defined in GUI/Base/Fonts/BitmapFont.h:72


function
GUI::BitmapFont::createFont

public static
     
     
Util::Reference < BitmapFont > createFont( const Util::FileName & fontFile,
  uint32_t fontSize,
  const std::string & charMap_utf8
)    

Load a .ttf or .otf file. Returns a BitmapFont or throws an exception.

Defined in GUI/Base/Fonts/BitmapFont.h:35


function
GUI::BitmapFont::BitmapFont

public
     
     
BitmapFont( Util::Reference < ImageData > bitmap,
  int lineHeight
)    

Defined in GUI/Base/Fonts/BitmapFont.h:74


function
GUI::BitmapFont::~BitmapFont

public virtual
   
   
~BitmapFont( )

Defined in GUI/Base/Fonts/BitmapFont.h:75


function
GUI::BitmapFont::addGlyph

public
     
     
void addGlyph( uint32_t characterCode,
  uint32_t width,
  uint32_t height,
  const Geometry::Vec2i & textureOffset,
  const Geometry::Vec2i & screenOffset,
  int xAdvance
)    

Defined in GUI/Base/Fonts/BitmapFont.h:77


function
GUI::BitmapFont::getGlyph

public const inline
     
     
const Glyph & getGlyph( uint32_t characterCode ) const

Defined in GUI/Base/Fonts/BitmapFont.h:79


function
GUI::BitmapFont::getBitmap

public const inline
   
   
const Util::Reference < Util::Bitmap > getBitmap( ) const

Defined in GUI/Base/Fonts/BitmapFont.h:84


function
GUI::BitmapFont::setKerning

public inline
     
     
void setKerning( uint32_t first,
  uint32_t second,
  int16_t amount
)    

Defined in GUI/Base/Fonts/BitmapFont.h:87


function
GUI::BitmapFont::setTabWidth

public inline
     
     
void setTabWidth( uint32_t s )

Defined in GUI/Base/Fonts/BitmapFont.h:88


function
GUI::BitmapFont::enable

public virtual
   
   
void enable( )

Defined in GUI/Base/Fonts/BitmapFont.h:91


function
GUI::BitmapFont::disable

public virtual
   
   
void disable( )

Defined in GUI/Base/Fonts/BitmapFont.h:92


function
GUI::BitmapFont::renderText

public virtual
     
     
void renderText( const Geometry::Vec2 & pos,
  const std::string & text,
  const Util::Color4ub & color
)    

Defined in GUI/Base/Fonts/BitmapFont.h:93


function
GUI::BitmapFont::getRenderedTextSize

public virtual
     
     
Geometry::Vec2 getRenderedTextSize( const std::string & text )

Defined in GUI/Base/Fonts/BitmapFont.h:94