Rpi-hw  0.7.2
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
rpihw::font::freetype Class Reference

TrueType font. More...

#include <freetype.hpp>

+ Inheritance diagram for rpihw::font::freetype:

Public Member Functions

 freetype (const std::string &path, uint8_t height, RenderMode mode=font::RENDER_DEFAULT, Encoding encoding=ENCODING_NONE)
 Constructor method. More...
 
virtual ~freetype ()
 Destructor method.
 
virtual const std::string & getPath () const
 Returns the path to the font.
 
virtual void setSize (uint8_t height)
 Sets the font size. More...
 
virtual uint8_t getWidth (uint32_t charcode) const
 Returns the width of a character. More...
 
virtual uint8_t getHeight () const
 Returns the height of the font.
 
virtual void data (uint32_t charcode, glyph &glyph) const
 Returns the data of the character font. More...
 
void buildFace (FTC_FaceID face_id, FT_Face *face)
 Builds the fresh new font object (don't use directly).
 

Protected Member Functions

void getSBitChar (uint32_t charcode, FTC_SBit &sbit) const
 Gets the bitmap of the character. More...
 

Protected Attributes

std::string m_path
 Path to the font.
 
FT_Library m_library
 The FreeType library instance.
 
FTC_Manager m_manager
 The cache manager.
 
FTC_ImageType m_image_type
 Type of images in the glyph cache.
 
FTC_CMapCache m_cmap_cache
 Charmap cache.
 
FTC_SBitCache m_sbit_cache
 Small bitmap cache.
 
Encoding m_encoding
 The character set used by the font.
 

Detailed Description

TrueType font.

Examples:
display/pcd8544.cpp.

Definition at line 77 of file freetype.hpp.

Constructor & Destructor Documentation

rpihw::font::freetype::freetype ( const std::string &  path,
uint8_t  height,
RenderMode  mode = font::RENDER_DEFAULT,
Encoding  encoding = ENCODING_NONE 
)

Constructor method.

Parameters
[in]pathThe path to the font.
[in]heightThe height of the font.
[in]modeThe fond rendering mode.
[in]encodingThe character set used by the font.

Member Function Documentation

virtual void rpihw::font::freetype::data ( uint32_t  charcode,
glyph glyph 
) const
virtual

Returns the data of the character font.

Parameters
[in]charcodeThe character code.
[out]glyphThe glyph of the character.

Implements rpihw::font::base.

void rpihw::font::freetype::getSBitChar ( uint32_t  charcode,
FTC_SBit &  sbit 
) const
protected

Gets the bitmap of the character.

Parameters
[in]charcodeThe character code.
[out]sbitThe handle to the bitmap.
virtual uint8_t rpihw::font::freetype::getWidth ( uint32_t  charcode) const
virtual

Returns the width of a character.

Parameters
[in]charcodeThe character code.

Implements rpihw::font::base.

void rpihw::font::freetype::setSize ( uint8_t  height)
inlinevirtual

Sets the font size.

Parameters
[in]heightThe height of the font.

Implements rpihw::font::base.

Definition at line 41 of file freetype-inl.hpp.


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