Seeed Grove ++  v0.0.1-2019
Linux C++ Library For Seeed Grove Devices
SG::Font::Monospace Class Referenceabstract

Very simple 8x8 monospace font, typically for 7-bit ASCII characters between 0x20 and 0x7f. More...

#include <sg_Monospace.hpp>

Inheritance diagram for SG::Font::Monospace:

Public Types

typedef std::vector< bool > Bitmap
 Bitmap of a single character, showing which pixels to turn on/off. More...
 
typedef std::map< char, BitmapFontmap
 Map of every character in this font. More...
 

Public Member Functions

 Monospace (void)
 Constructor. More...
 
virtual ~Monospace (void)
 Destructor. More...
 
virtual size_t get_width (void) const
 Get the width of each character. More...
 
virtual size_t get_height (void) const
 Get the height of each character. More...
 
virtual std::string get_name (void) const =0
 Get the font name. More...
 
virtual Fontmap get_fontmap (void) const =0
 Get the actual font bitmap. More...
 
virtual Bitmap get (char c) const
 Get a bitmap to use for the given ASCII character. More...
 
virtual Bitmap get (char c, const Fontmap &font_map) const
 

Detailed Description

Very simple 8x8 monospace font, typically for 7-bit ASCII characters between 0x20 and 0x7f.

See also
SG::Font::EType
SG::Font::get()

Member Typedef Documentation

typedef std::vector<bool> SG::Font::Monospace::Bitmap

Bitmap of a single character, showing which pixels to turn on/off.

typedef std::map<char, Bitmap> SG::Font::Monospace::Fontmap

Map of every character in this font.

Constructor & Destructor Documentation

SG::Font::Monospace::Monospace ( void  )

Constructor.

SG::Font::Monospace::~Monospace ( void  )
virtual

Destructor.

Member Function Documentation

virtual Bitmap SG::Font::Monospace::get ( char  c) const
inlinevirtual

Get a bitmap to use for the given ASCII character.

References get_fontmap().

Here is the call graph for this function:

SG::Font::Monospace::Bitmap SG::Font::Monospace::get ( char  c,
const Fontmap font_map 
) const
virtual
Exceptions
std::invalid_argumentif the character isn't available in the given font.

References get_name(), and SG::BeagleBone::Detect::to_string().

Here is the call graph for this function:

virtual Fontmap SG::Font::Monospace::get_fontmap ( void  ) const
pure virtual

Get the actual font bitmap.

Implemented in SG::Font::CapRouge, SG::Font::CourierNew, SG::Font::DejaVuSans, and SG::Font::UbuntuMono.

Referenced by get(), and get_height().

Here is the caller graph for this function:

virtual size_t SG::Font::Monospace::get_height ( void  ) const
inlinevirtual

Get the height of each character.

References get_fontmap(), and get_name().

Here is the call graph for this function:

virtual std::string SG::Font::Monospace::get_name ( void  ) const
pure virtual

Get the font name.

Implemented in SG::Font::CapRouge, SG::Font::CourierNew, SG::Font::DejaVuSans, and SG::Font::UbuntuMono.

Referenced by get(), and get_height().

Here is the caller graph for this function:

virtual size_t SG::Font::Monospace::get_width ( void  ) const
inlinevirtual

Get the width of each character.


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