File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -756,6 +756,10 @@ void OLEDDisplay::setFont(const uint8_t *fontData) {
756756 setLogBuffer ();
757757}
758758
759+ void OLEDDisplay::setFont (const char *fontData) {
760+ setFont (static_cast <const uint8_t *>(reinterpret_cast <const void *>(fontData)));
761+ }
762+
759763void OLEDDisplay::displayOn (void ) {
760764 sendCommand (DISPLAYON);
761765}
Original file line number Diff line number Diff line change @@ -271,6 +271,9 @@ class OLEDDisplay : public Stream {
271271 // ArialMT_Plain_10, ArialMT_Plain_16, ArialMT_Plain_24
272272 void setFont (const uint8_t *fontData);
273273
274+ // Set the current font when supplied as a char* instead of a uint8_t*
275+ void setFont (const char *fontData);
276+
274277 // Set the function that will convert utf-8 to font table index
275278 void setFontTableLookupFunction (FontTableLookupFunction function);
276279
You can’t perform that action at this time.
0 commit comments