You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
564 B
18 lines
564 B
#include "monoformat_fontreader.hpp"
|
|
|
|
namespace monoformat {
|
|
|
|
#include "u8g2_font_NokiaSmallPlain_tf.inc.cpp"
|
|
#include "u8g2_font_5x7_mf.inc.cpp"
|
|
|
|
std::span<std::byte const> findEmbeddedFont(std::size_t fontIndex) {
|
|
if (fontIndex == 0) {
|
|
return std::as_bytes(std::span{u8g2_font_NokiaSmallPlain_tf_u8g2font, u8g2_font_NokiaSmallPlain_tf_u8g2font_len});
|
|
} else if (fontIndex == 1) {
|
|
return std::as_bytes(std::span{u8g2_font_5x7_mf_u8g2font, u8g2_font_5x7_mf_u8g2font_len});
|
|
} else {
|
|
return {};
|
|
}
|
|
}
|
|
|
|
} // namespace monoformat
|
|
|