MaxMatrix
Drive chained 8x8 LED dot matrix modules with MAX7219.
Loading...
Searching...
No Matches
Font.h File Reference

The font of the MaxMatrix library. More...

#include "Arduino.h"
#include "MaxMatrixAttributes.h"
#include "MaxMatrixError.h"
#include "MaxMatrixStandardTypes.h"
#include "Utility/array.h"
#include "Utility/span.h"

Go to the source code of this file.

Classes

struct  max_matrix::Sprite
 A sprite of your own: its width, its height and up to five columns. More...
struct  max_matrix::Glyph
 A char of a font, as it lies in flash: where its columns are, and how many. More...
struct  max_matrix::DecodedChar
 A char of a text, as Font::DecodeChar() reads it. More...
class  max_matrix::Font
 The format of a font, and the way from a char of a string to its glyph. More...

Functions

constexpr bool max_matrix::internal::IsEndOfText (span< char const > text, size_t position)
 Returns whether a text has ended at position: at its terminating null character, or at the end of its span, whichever comes first.

Variables

constexpr uint8_t max_matrix::kSpriteMaxWidth {5}
constexpr uint16_t max_matrix::kDefaultFontSize {614}
array< uint8_t, kDefaultFontSize > const max_matrix::kDefaultFont
 The font MaxMatrix starts with: ASCII from the space to the tilde, the German umlauts, the sharp s and the degree sign, 8 rows high and up to 5 columns wide.

Detailed Description

The font of the MaxMatrix library.

A sprite per char, and the way from a char of a string to its sprite. Knows nothing of the matrix.

Function Documentation

◆ IsEndOfText()

bool max_matrix::internal::IsEndOfText ( span< char const > text,
size_t position )
constexpr

Returns whether a text has ended at position: at its terminating null character, or at the end of its span, whichever comes first.

Parameters
[in]textThe text.
[in]positionThe position, from 0.

Variable Documentation

◆ kDefaultFont

array<uint8_t, kDefaultFontSize> const max_matrix::kDefaultFont
extern

The font MaxMatrix starts with: ASCII from the space to the tilde, the German umlauts, the sharp s and the degree sign, 8 rows high and up to 5 columns wide.

In the format of Font, which Matrix::SetFont() takes. 614 bytes of flash.

◆ kDefaultFontSize

uint16_t max_matrix::kDefaultFontSize {614}
constexpr

The bytes of kDefaultFont.

◆ kSpriteMaxWidth

uint8_t max_matrix::kSpriteMaxWidth {5}
constexpr

The most columns a Sprite has.