OneBitDisplay icon indicating copy to clipboard operation
OneBitDisplay copied to clipboard

How to use custom fonts?

Open AlessandroFano opened this issue 9 months ago • 0 comments

Hello, thankyou so much for this library. As per the README file, I am trying to use a Font from AdafruitGFX, but I am not sure what is the correct procedure to do so.

      GFXfont myFont = FreeMonoBoldOblique12pt7b;
      obdSetCustomFont(&obd, &myFont, 1);
      obdWriteString(&obd, 0, 0, 0, (char *)"FONT_6x8" , FONT_6x8, OBD_BLACK, 1);
      obdWriteStringCustom(&obd, &myFont, 0, 9, (char *)"CUSTOM_FONT", OBD_BLACK);

With these instructions only the line "FONT_6x8" is shown in the display. Can you help me out here?

AlessandroFano avatar May 07 '24 19:05 AlessandroFano