v.0.1.0 fonts as vectors

This commit is contained in:
tiijay
2025-11-07 14:19:01 +01:00
parent f0614c9a4a
commit b3d9b6bb6c
12 changed files with 426 additions and 447 deletions

11
lib/Utils/src/fonts.cpp Normal file
View File

@@ -0,0 +1,11 @@
#include "fonts.hpp"
const std::vector<uint8_t> &getFontChar(char c, const std::map<uint8_t, std::vector<uint8_t>> &font)
{
auto it = font.find(c);
if (it != font.end())
{
return it->second;
}
return font.at(' '); // Fallback to space
}

10
lib/Utils/src/fonts.hpp Normal file
View File

@@ -0,0 +1,10 @@
#ifndef FONTS_HPP
#define FONTS_HPP
#include <vector>
#include <map>
#include <stdint.h>
const std::vector<uint8_t> &getFontChar(char c, const std::map<uint8_t, std::vector<uint8_t>> &font);
#endif