// Test additional fonts for Tiny4kOLED
/*
Tiny4kOLED - Drivers for SSD1306 controlled dot matrix OLED/PLED 128x32 displays
Based on ssd1306xled, re-written and extended by Stephen Denne
from 2017-04-25 at https://github.com/datacute/Tiny4kOLED
*/
#include <TinyWireM.h>
#include <Tiny4kOLED.h>
// ============================================================================
// Fonts that come with Tiny4kOLED
//const DCfont *currentFont = FONT6X8;
//const DCfont *currentFont = FONT6X8P;
//const DCfont *currentFont = FONT8X16;
//const DCfont *currentFont = FONT8X16P;
//const DCfont *currentFont = FONT8X16DIGITS;
// Fonts from this TinyOLED-Fonts library
//#include "font8x16atari.h"
//const DCfont *currentFont = FONT8X16ATARI;
//#include "font11x16.h"
//const DCfont *currentFont = FONT11X16;
#include "font16x32digits.h" /// big, good
const DCfont *currentFont = FONT16X32DIGITS;
// ============================================================================
//uint8_t currentCharacter;
void setup() {
oled.begin();
oled.setRotation(0);
oled.setFont(currentFont);
oled.print(": 012345");
// if (currentFont->width == 0) {
// oled.setSpacing(1);
// } else {
// oled.setSpacing(currentFont->spacing + 1);
// }
// currentCharacter = currentFont->first;
// drawScreen();
oled.on();
// oled.switchRenderFrame();
}
// void setup() {
// oled.begin();
// oled.setFont(currentFont);
// if (currentFont->width == 0) {
// oled.setSpacing(1);
// } else {
// oled.setSpacing(currentFont->spacing + 1);
// }
// currentCharacter = currentFont->first;
// drawScreen();
// oled.on();
// oled.switchRenderFrame();
// }
void loop() {
}
// void drawScreen() {
// oled.clear();
// char c = (char)currentCharacter;
// for (uint8_t y = 0; y + currentFont->height <= 4; y += currentFont->height) {
// oled.setCursor(0, y);
// c = printLineOfText(c);
// }
// }
// char printLineOfText(char c) {
// while (oled.getCursorX() + oled.getCharacterWidth(c) <= 128) {
// oled.print(c);
// if ((uint8_t)c < currentFont->last) {
// c++;
// } else {
// c = currentFont->first;
// }
// }
// return c;
// }