Lums
Public Types | Public Member Functions | List of all members
lm::Font Class Reference

A class describing a font. More...

#include <Font.hpp>

Public Types

enum  { glyphCount = 128 }
 

Public Member Functions

 Font ()
 
const Texturetexture () const
 
const Glyphglyph (int i) const
 
void setPath (const std::string &path, bool resource=true)
 
void setSize (float size)
 
void load ()
 
void unload ()
 
 ~Font ()
 

Detailed Description

A class describing a font.

Member Enumeration Documentation

anonymous enum

The number of glyphs in a font

Constructor & Destructor Documentation

lm::Font::Font ( )

Construct an empty font

lm::Font::~Font ( )

Font dtor

Member Function Documentation

const Glyph& lm::Font::glyph ( int  i) const
inline

Extract a glyph from the font

Parameters
iThe glyph index
Returns
A reference to the glyph
void lm::Font::load ( )

Load the font

void lm::Font::setPath ( const std::string &  path,
bool  resource = true 
)

Set the load path for the font

Parameters
pathThe load path
resourceIf true, the path is relative to the resource path
void lm::Font::setSize ( float  size)

Set the font size in points size The size

const Texture& lm::Font::texture ( ) const
inline

Get the texture associated with the font.

Returns
A reference to the texture
void lm::Font::unload ( )

Unload the font


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