Pervasive Displays Library Suite - Basic edition 8.0.1
Library for Pervasive Displays e-paper screens and EXT3 extension board
Loading...
Searching...
No Matches
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.
 
uint8_t f_addFont (font_s fontName)
 Use a font.
 
void f_setFontSolid (bool flag=true)
 Set transparent or opaque text.
 
void f_setFontSpaceX (uint8_t number=1)
 Set additional pixels between two characters, horizontal axis.
 
void f_setFontSpaceY (uint8_t number=1)
 Set additional pixels between two characters, vertical axis.
 
uint16_t f_characterSizeX (uint8_t character=0x00)
 Character size, x-axis.
 
uint16_t f_characterSizeY ()
 Character size, y-axis.
 
uint16_t f_stringSizeX (String text)
 String size, x-axis.
 
uint8_t f_stringLengthToFitX (String text, uint16_t pixels)
 Number of characters to fit a size, x-axis.
 
uint8_t f_fontMax ()
 Number of fonts.
 
uint8_t f_getFontKind ()
 Get selected font details.
 
uint8_t f_getFontMaxWidth ()
 Get selected font details.
 
uint8_t f_getCharacter (uint8_t character, uint16_t index)
 Get definition for line of character.
 

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: