Colobot
Public Member Functions | List of all members
CFontLoader Class Reference

Class for loading config file. More...

#include <src/common/font_loader.h>

Public Member Functions

bool Init ()
 
std::string GetFont (Gfx::FontType type)
 
std::string GetDefaultFont (Gfx::FontType type) const
 
std::string GetFontType (Gfx::FontType type) const
 

Detailed Description

Class for loading config file.

Member Function Documentation

◆ Init()

bool CFontLoader::Init ( )

Loads fonts.ini

Returns
return true on success

◆ GetFont()

std::string CFontLoader::GetFont ( Gfx::FontType  type)

Reads given font from file

Returns
return path to font file

◆ GetDefaultFont()

std::string CFontLoader::GetDefaultFont ( Gfx::FontType  type) const

Const type method to read filenames of fonts from defaultFont map used as a fallback if it wasn't possible to read font from fonts.ini

Returns
return filename of default path

◆ GetFontType()

std::string CFontLoader::GetFontType ( Gfx::FontType  type) const

Const type method converting Gfx::FontType to string

Returns
return id of font used in fonts.ini file

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