MOS
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
mos::gfx::Font Class Referencefinal

Bitmap font. More...

#include <font.hpp>

Public Types

using Char_map = std::map< unsigned int, Character >
 
using Char_pair = std::pair< unsigned int, Character >
 

Public Member Functions

 Font (Char_map characters, const Shared_texture_2D &texture, float height, float base)
 
auto height () const -> float
 Height. More...
 
auto base () const -> float
 Base line. More...
 

Static Public Member Functions

static auto load (const std::string &path) -> Font
 

Public Attributes

Shared_texture_2D texture
 Texture with characters. More...
 
Char_map characters
 Characters supported. More...
 

Detailed Description

Bitmap font.

Constructor & Destructor Documentation

◆ Font()

mos::gfx::Font::Font ( Char_map  characters,
const Shared_texture_2D &  texture,
float  height,
float  base 
)
Parameters
charactersChars supported.
textureImage with glyphs.

Member Function Documentation

◆ base()

auto mos::gfx::Font::base ( ) const -> float

Base line.

◆ height()

auto mos::gfx::Font::height ( ) const -> float

Height.

Member Data Documentation

◆ characters

Char_map mos::gfx::Font::characters

Characters supported.

◆ texture

Shared_texture_2D mos::gfx::Font::texture

Texture with characters.


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