JugiMap Framework
FontsLibrary Class Reference

The FontsLibrary class defines storage for Font objects. More...

#include <jmFont.h>

Public Member Functions

int Add (Font *_font, const std::string &_name)
 Add the given font *_font* with identification name *_name* to this library. The function returns the index of the added font in the library. More...
 
FontFind (const std::string &_name)
 Find and returns a font with the given *_name*. More...
 
FontAt (int _index)
 Returns a font at the given *_index*. More...
 
int GetSize ()
 Returns the number of stored fonts. More...
 

Detailed Description

The FontsLibrary class defines storage for Font objects.

Member Function Documentation

◆ Add()

int Add ( Font _font,
const std::string &  _name 
)
inline

Add the given font *_font* with identification name *_name* to this library. The function returns the index of the added font in the library.

◆ Find()

Font * Find ( const std::string &  _name)

Find and returns a font with the given *_name*.

If the font is not found the function returns the first font in the library, or nullptr if library is empty.

◆ At()

Font * At ( int  _index)

Returns a font at the given *_index*.

If the index is out of storage bounds the function returns the first font in the library, or nullptr if library is empty.

◆ GetSize()

int GetSize ( )
inline

Returns the number of stored fonts.


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