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

Standard Deja Vu Sans font for 7-bit ASCII characters between 32 and 127. More...

#include <sg_8x8_DejaVuSans.hpp>

Inheritance diagram for SG::Font::DejaVuSans:
Collaboration diagram for SG::Font::DejaVuSans:

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

 DejaVuSans (void)
 Constructor. More...
 
virtual ~DejaVuSans (void)
 Destructor. More...
 
virtual std::string get_name (void) const
 Get the font name. For Deja Vu Sans, this will always return Deja Vu Sans. More...
 
virtual Fontmap get_fontmap (void) const
 Get the actual font bitmap. 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 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

Standard Deja Vu Sans font for 7-bit ASCII characters between 32 and 127.

The size of 8x8 includes vertical and horizontal blank space needed between characters. For Deja Vu Sans, this means a blank row on the bottom, and a blank column on the left. Without the blank space, the actual characters are 7x7 (or smaller and padded).

DejaVuSansMono_8x8.png

Member Typedef Documentation

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

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

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

Map of every character in this font.

Constructor & Destructor Documentation

SG::Font::DejaVuSans::DejaVuSans ( void  )

Constructor.

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

Destructor.

Member Function Documentation

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

Get a bitmap to use for the given ASCII character.

References SG::Font::Monospace::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
virtualinherited
Exceptions
std::invalid_argumentif the character isn't available in the given font.

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

Here is the call graph for this function:

SG::Font::DejaVuSans::Fontmap SG::Font::DejaVuSans::get_fontmap ( void  ) const
virtual

Get the actual font bitmap.

Implements SG::Font::Monospace.

Referenced by get_name().

Here is the caller graph for this function:

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

Get the height of each character.

References SG::Font::Monospace::get_fontmap(), and SG::Font::Monospace::get_name().

Here is the call graph for this function:

virtual std::string SG::Font::DejaVuSans::get_name ( void  ) const
inlinevirtual

Get the font name. For Deja Vu Sans, this will always return Deja Vu Sans.

Implements SG::Font::Monospace.

References get_fontmap().

Here is the call graph for this function:

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

Get the width of each character.


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