Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion firmware/include/fonts/BrailleFont.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class BrailleFont final : public FontModule
{
private:
const std::vector<Symbol> ascii = {
inline static const std::vector<Symbol> ascii = {
{
// 0x20, SPACE
{},
Expand Down
4 changes: 2 additions & 2 deletions firmware/include/fonts/LargeFont.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class LargeFont final : public FontModule
{
private:
const std::vector<Symbol> ascii = {
inline static const std::vector<Symbol> ascii = {
{
// 0x20, SPACE
{},
Expand Down Expand Up @@ -123,7 +123,7 @@ class LargeFont final : public FontModule
},
};

const std::vector<SymbolExtended> unicode = {
inline static const std::vector<SymbolExtended> unicode = {
{
0x3C0, // π GREEK SMALL LETTER PI
{
Expand Down
6 changes: 3 additions & 3 deletions firmware/include/fonts/MediumBoldFont.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class MediumBoldFont final : public FontModule
{
private:
const std::vector<Symbol> ascii = {
inline static const std::vector<Symbol> ascii = {
{
// 0x20, SPACE
{},
Expand Down Expand Up @@ -75,7 +75,7 @@ class MediumBoldFont final : public FontModule
0b011110,
0b111111,
0b000011,
0b011111,
0b001111,
0b000011,
0b111111,
0b011110,
Expand Down Expand Up @@ -106,7 +106,7 @@ class MediumBoldFont final : public FontModule
0b111110,
0b000011,
0b111111,
0b111110,
0b011110,
},
0,
0,
Expand Down
2 changes: 1 addition & 1 deletion firmware/include/fonts/MediumFont.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class MediumFont final : public FontModule
{
private:
const std::vector<Symbol> ascii = {
inline static const std::vector<Symbol> ascii = {
{
// 0x20, SPACE
{},
Expand Down
269 changes: 269 additions & 0 deletions firmware/include/fonts/MediumRegularFont.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,269 @@
#pragma once

#include "modules/FontModule.h"

class MediumRegularFont final : public FontModule
{
private:
inline static const std::vector<Symbol> ascii = {
{
// 0x20, SPACE
{},
6,
0,
},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{
// 0x30, 0
{
0b011110,
0b110011,
0b110011,
0b110011,
0b110011,
0b110011,
0b011110,
},
0,
0,
},
{
// 0x31, 1
{
0b0011,
0b0111,
0b1111,
0b0011,
0b0011,
0b0011,
0b0011,
},
0,
0,
},
{
// 0x32, 2
{
0b011110,
0b110011,
0b000011,
0b001110,
0b011000,
0b110000,
0b111111,
},
0,
0,
},
{
// 0x33, 3
{
0b011110,
0b110011,
0b000011,
0b001110,
0b000011,
0b110011,
0b011110,
},
0,
0,
},
{
// 0x34, 4
{
0b110011,
0b110011,
0b110011,
0b011111,
0b000011,
0b000011,
0b000011,
},
0,
0,
},
{
// 0x35, 5
{
0b111111,
0b110000,
0b110000,
0b111110,
0b000011,
0b110011,
0b011110,
},
0,
0,
},
{
// 0x36, 6
{
0b011110,
0b110011,
0b110000,
0b111110,
0b110011,
0b110011,
0b011110,
},
0,
0,
},
{
// 0x37, 7
{
0b111111,
0b000011,
0b000110,
0b001100,
0b001100,
0b001100,
0b001100,
},
0,
0,
},
{
// 0x38, 8
{
0b011110,
0b110011,
0b110011,
0b011110,
0b110011,
0b110011,
0b011110,
},
0,
0,
},
{
// 0x39, 9
{
0b011110,
0b110011,
0b110011,
0b011111,
0b000011,
0b110011,
0b011110,
},
0,
0,
},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{
// 0x49, I
{
0b111111,
0b001100,
0b001100,
0b001100,
0b001100,
0b001100,
0b111111,
},
0,
0,
},
{},
{},
{},
{},
{},
{
// 0x4F, O
{
0b011110,
0b111111,
0b110011,
0b110011,
0b110011,
0b111111,
0b011110,
},
0,
0,
},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{
// 0x6F, o
{
0b01110,
0b11111,
0b11011,
0b11111,
0b01110,
},
0,
0,
},
};

public:
explicit MediumRegularFont();

[[nodiscard]] Symbol getChar(uint32_t character) const override;
};

extern MediumRegularFont *FontMediumRegular;
4 changes: 2 additions & 2 deletions firmware/include/fonts/MicroFont.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class MicroFont final : public FontModule
{
private:
const std::vector<Symbol> ascii = {
inline static const std::vector<Symbol> ascii = {
{
// 0x20, SPACE
{},
Expand Down Expand Up @@ -630,7 +630,7 @@ class MicroFont final : public FontModule
},
};

const std::vector<SymbolExtended> unicode = {
inline static const std::vector<SymbolExtended> unicode = {
{
0xB0, // ° DEGREE SIGN
{
Expand Down
4 changes: 2 additions & 2 deletions firmware/include/fonts/MiniFont.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class MiniFont final : public FontModule
{
private:
const std::vector<Symbol> ascii = {
inline static const std::vector<Symbol> ascii = {
{
// 0x20, SPACE
{},
Expand Down Expand Up @@ -842,7 +842,7 @@ class MiniFont final : public FontModule
},
};

const std::vector<SymbolExtended> unicode = {
inline static const std::vector<SymbolExtended> unicode = {
{
0xB0, // ° DEGREE SIGN
{
Expand Down
4 changes: 2 additions & 2 deletions firmware/include/fonts/SmallFont.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class SmallFont final : public FontModule
{
private:
const std::vector<Symbol> ascii = {
inline static const std::vector<Symbol> ascii = {
{
// 0x20, SPACE
{},
Expand Down Expand Up @@ -1230,7 +1230,7 @@ class SmallFont final : public FontModule
},
};

const std::vector<SymbolExtended> unicode = {
inline static const std::vector<SymbolExtended> unicode = {
{
0xB0, // ° DEGREE SIGN
{
Expand Down
Loading
Loading