U8x8 Fonts -
The easiest method for most hobbyists:
Because every character is exactly 8 pixels wide, the display controller knows exactly where to place the next character without complex calculations. This simplicity is the magic of u8x8.
U8x8 fonts are defined within an 8x8 pixel tile, ensuring high readability on tiny screens while maintaining a strictly monospaced layout. Tile-Based Rendering: u8x8 fonts
U8x8 fonts always start with the prefix u8x8_ to distinguish them from U8g2 fonts. You can find a complete gallery of available options on the official U8x8 Font List .
: A classic retro-computing font.
Notice the key differences from standard U8g2:
With powerful microcontrollers like the ESP32-S3 and RP2040 costing only a few dollars, one might ask: Why bother with the limitations of 8x8 fonts? The easiest method for most hobbyists: Because every
Here are three archetypal projects where u8x8 fonts are the perfect choice:
#include #include // Example for a standard 128x64 I2C OLED U8X8_SSD1306_128X64_NONAME_HW_I2C u8x8(U8X8_PIN_NONE); void setup() u8x8.begin(); // Set the font before drawing u8x8.setFont(u8x8_font_chroma48medium8_r); void loop() u8x8.setCursor(0, 0); // Position at Column 0, Row 0 u8x8.print("Hello World!"); Use code with caution. Tile-Based Rendering: U8x8 fonts always start with the
For full control, you can write your own font array. Let's create a custom "degree" symbol (°) for a temperature display:
Later that night, Marco sent an email: “The icons look… charming. In a retro way. Let’s go with it.”