Pervasive Displays Library Suite - Basic edition  5.2.6
Library for Pervasive Displays e-paper screens and EXT3 extension board
hV_Font_Terminal Class Reference

Class for font as header file. More...

#include <hV_Font_Terminal.h>

Inheritance diagram for hV_Font_Terminal:
Collaboration diagram for hV_Font_Terminal:

Protected Member Functions

void _f_begin ()
 Initialisation.
 
void _f_selectFont (uint8_t font)
 Select font. More...
 
uint8_t _f_addFont (font_s fontName)
 Use a font. More...
 
void _f_setFontSolid (bool flag=true)
 Set transparent or opaque text. More...
 
void _f_setFontSpaceX (uint8_t number=1)
 Set additional pixels between two characters, horizontal axis. More...
 
void _f_setFontSpaceY (uint8_t number=1)
 Set additional pixels between two characters, vertical axis. More...
 
uint16_t _f_characterSizeX (uint8_t character=0x00)
 Character size, x-axis. More...
 
uint16_t _f_characterSizeY ()
 Character size, y-axis. More...
 
uint16_t _f_stringSizeX (String text)
 String size, x-axis. More...
 
uint8_t _f_stringLengthToFitX (String text, uint16_t pixels)
 Number of characters to fit a size, x-axis. More...
 
uint8_t _f_fontMax ()
 Number of fonts. More...
 
uint8_t _f_getFontKind ()
 Get selected font details. More...
 
uint8_t _f_getFontMaxWidth ()
 Get selected font details. More...
 
uint8_t _f_getCharacter (uint8_t character, uint16_t index)
 Get definition for line of character. More...
 

Protected Attributes

Variables for font management
font_s _f_font
 font
 
uint8_t _f_fontNumber
 number of fonts available, 0.._fontNumber-1
 
uint8_t _f_fontSize
 actual font selected
 
uint8_t _f_fontSpaceX
 pixels between two characters, horizontal axis
 
uint8_t _f_fontSpaceY
 pixels between two characters, vertical axis
 
bool _f_fontSolid
 font
 

Detailed Description

Class for font as header file.

Member Function Documentation

◆ _f_addFont()

uint8_t hV_Font_Terminal::_f_addFont ( font_s  fontName)
protected

Use a font.

Parameters
fontNamename of the font
Returns
number of the font, 0 otherwise
Warning
Definition for this method is compulsory.
Note
Previously setFontSize()
More: Fonts

◆ _f_characterSizeX()

uint16_t hV_Font_Terminal::_f_characterSizeX ( uint8_t  character = 0x00)
protected

Character size, x-axis.

Parameters
charactercharacter to evaluate, default=0=font general size
Returns
horizontal size of character for current font, in pixels
Note
With setSpaceX included
In variable font, each character has a specific size. The general size is indicative.
Previously fontSizeX()
More: Fonts

◆ _f_characterSizeY()

uint16_t hV_Font_Terminal::_f_characterSizeY ( )
protected

Character size, y-axis.

Returns
vertical size for current font, in pixels
Note
Previously fontSizeY()
More: Fonts

◆ _f_fontMax()

uint8_t hV_Font_Terminal::_f_fontMax ( )
protected

Number of fonts.

Returns
number of fonts available
Note
First font is numbered 0, second 1, ...
The latest font is numbered fontMax()-1

◆ _f_getCharacter()

uint8_t hV_Font_Terminal::_f_getCharacter ( uint8_t  character,
uint16_t  index 
)
protected

Get definition for line of character.

Parameters
charactercharacter 32~255
indexcolumn index
Returns
definition for line of character

◆ _f_getFontKind()

uint8_t hV_Font_Terminal::_f_getFontKind ( )
protected

Get selected font details.

Returns
font description

◆ _f_getFontMaxWidth()

uint8_t hV_Font_Terminal::_f_getFontMaxWidth ( )
protected

Get selected font details.

Returns
maximum width in pixels from *width array

◆ _f_selectFont()

void hV_Font_Terminal::_f_selectFont ( uint8_t  font)
protected

Select font.

Parameters
fontdefault = 0 = small, 1 = large
Warning
Definition for this method is compulsory.
Note
Previously _setFontSize()

◆ _f_setFontSolid()

void hV_Font_Terminal::_f_setFontSolid ( bool  flag = true)
protected

Set transparent or opaque text.

Parameters
flagdefault = 1 = opaque = solid, false = transparent
Warning
Definition for this method is compulsory.

◆ _f_setFontSpaceX()

void hV_Font_Terminal::_f_setFontSpaceX ( uint8_t  number = 1)
protected

Set additional pixels between two characters, horizontal axis.

Parameters
numberof spaces default = 1 pixel
Warning
Definition for this method is compulsory.

◆ _f_setFontSpaceY()

void hV_Font_Terminal::_f_setFontSpaceY ( uint8_t  number = 1)
protected

Set additional pixels between two characters, vertical axis.

Parameters
numberof spaces default = 1 pixel
Warning
Definition for this method is compulsory.

◆ _f_stringLengthToFitX()

uint8_t hV_Font_Terminal::_f_stringLengthToFitX ( String  text,
uint16_t  pixels 
)
protected

Number of characters to fit a size, x-axis.

Parameters
textstring to evaluate
pixelsnumber of pixels to fit in
Returns
number of characters to be displayed inside the pixels
More: Fonts

◆ _f_stringSizeX()

uint16_t hV_Font_Terminal::_f_stringSizeX ( String  text)
protected

String size, x-axis.

Parameters
textstring to evaluate
Returns
horizontal size of the string for current font, in pixels
More: Fonts

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