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

Standard Courier New font for 7-bit ASCII characters between 32 and 127. More...

#include <sg_8x8_CourierNew.hpp>

Inheritance diagram for SG::Font::CourierNew:
Collaboration diagram for SG::Font::CourierNew:

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

 CourierNew (void)
 Constructor. More...
 
virtual ~CourierNew (void)
 Destructor. More...
 
virtual std::string get_name (void) const
 Get the font name. For Courier New, this will always return Courier New. 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 Courier New font for 7-bit ASCII characters between 32 and 127.

The size of 8x8 includes vertical and horizontal blank space needed between characters. For Courier New, 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).

CourierNew_8x8.png

Member Typedef Documentation

◆ Bitmap

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

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

◆ Fontmap

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

Map of every character in this font.

Constructor & Destructor Documentation

◆ CourierNew()

SG::Font::CourierNew::CourierNew ( void  )

Constructor.

◆ ~CourierNew()

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

Destructor.

Member Function Documentation

◆ get() [1/2]

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:

◆ get() [2/2]

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:

◆ get_fontmap()

SG::Font::CourierNew::Fontmap SG::Font::CourierNew::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:

◆ get_height()

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:

◆ get_name()

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

Get the font name. For Courier New, this will always return Courier New.

Implements SG::Font::Monospace.

References get_fontmap().

Here is the call graph for this function:

◆ get_width()

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: