v.0.1.0 fonts as vectors
This commit is contained in:
20
src/main.cpp
20
src/main.cpp
@@ -8,9 +8,21 @@ LedMatrix matrix;
|
||||
|
||||
void printCharMatrixSimple(char c)
|
||||
{
|
||||
const auto *fontData = getFontChar_5x7(c);
|
||||
const u_int8_t char_width_pixel = 5;
|
||||
matrix.drawText(58, 56, &c, CRGB::YellowGreen);
|
||||
matrix.show();
|
||||
|
||||
#ifdef USE_FONT_5x7
|
||||
const vector<uint8_t> &fontData_ = getFontChar_5x7(c);
|
||||
const u_int8_t font_height = fontHeight_5x7();
|
||||
#elifdef USE_FONT_8x8
|
||||
const vector<uint8_t> &fontData_ = getFontChar_8x8(c);
|
||||
const u_int8_t font_height = fontHeight_8x8();
|
||||
#elifdef USE_FONT_16x16
|
||||
const vector<uint16_t> &fontData_ = getFontChar_16x16(c);
|
||||
const u_int8_t font_height = fontHeight_16x16();
|
||||
#endif
|
||||
const auto *fontData = fontData_.data();
|
||||
const u_int8_t char_width_pixel = 5;
|
||||
|
||||
Serial.print("<");
|
||||
Serial.print(c);
|
||||
@@ -82,7 +94,7 @@ void setup()
|
||||
}
|
||||
|
||||
setupMatrix();
|
||||
// printCharMatrixSimple('A');
|
||||
printCharMatrixSimple('@');
|
||||
// number_to_bitarray_msb(0x11FF, 16, true);
|
||||
|
||||
// playWithBlinkLed();
|
||||
@@ -90,6 +102,6 @@ void setup()
|
||||
|
||||
void loop()
|
||||
{
|
||||
matrix.drawHorizontalScrollText(41, "scrolling...", CRGB::Wheat);
|
||||
// matrix.drawHorizontalScrollText(41, "scrolling...", CRGB::Wheat);
|
||||
delay(10);
|
||||
}
|
||||
Reference in New Issue
Block a user