SSD1306 adding new fonts

Hi, I am messing with a ESP8266+OLED combined board and decided to convert a new font. I used the "http://oleddisplay.squix.ch" converter to make a file name timerFont12.txt

In the 1.8.9. IDE I started a new sketch and created a tab "timerFont12.h" and pasted the contents into that Tab.

const char timerFont12[] PROGMEM = {
...

Then in the sketch

#include "timerFont12.h"
#include "SSD1306Wire.h"
  SSD1306Wire oled(0x3c,1,2);

void setup() {
  oled.init();
  oled.setFont(timerFont12);

But I get an error,
invalid conversion from 'const char* to 'const uint8_t* {aka const unsigned ...

How do I use this new font? I have searched everywhere for how to use this newly created font but nothing seems to work.

Try changing the type of the font to const uint8_t[] PROGMEM.

const uint8_t timerFont12[] PROGMEM = {
...

Pieter

1 Like

PieterP:
Try changing the type of the font to const uint8_t[] PROGMEM.

DUH!! Slapping my forehead, so simple, thank you. :smiley: