hx3d  1
2D/3D Simple Game Framework
Classes | Public Member Functions | List of all members
hx3d::graphics::Font Class Reference

Font management. More...

#include <font.hpp>

Classes

struct  Data
 Internal font data. More...
 

Public Member Functions

 Font (std::string fontPath, int characterSize)
 Build a font from a path and a character size. More...
 
void createFontSize (int size)
 Generate a font in cache. More...
 
DatagetFontData (int size)
 Get internal font data from a size. More...
 
unsigned int getDefaultSize () const
 Get the default font size. More...
 
const Ptr< Shader > & getShader ()
 Get the font shader. More...
 

Detailed Description

Font management.

Definition at line 39 of file font.hpp.

Constructor & Destructor Documentation

hx3d::graphics::Font::Font ( std::string  fontPath,
int  characterSize 
)

Build a font from a path and a character size.

Parameters
fontPathPath to font
characterSizeCharacter size

Definition at line 36 of file font.cpp.

Member Function Documentation

void hx3d::graphics::Font::createFontSize ( int  size)

Generate a font in cache.

Parameters
sizeFont size

Definition at line 48 of file font.cpp.

unsigned int hx3d::graphics::Font::getDefaultSize ( ) const

Get the default font size.

Returns
Default font size

Definition at line 69 of file font.cpp.

Font::Data & hx3d::graphics::Font::getFontData ( int  size)

Get internal font data from a size.

If it does not exists, creates it with createFontSize.

Parameters
sizeFont size
Returns
Internal font data

Definition at line 61 of file font.cpp.

const Ptr< Shader > & hx3d::graphics::Font::getShader ( )

Get the font shader.

Returns
Shader (Ptr)

Definition at line 73 of file font.cpp.


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