Designed specifically for microcontrollers with tight resource constraints, U8x8 fonts trade some graphic flexibility for significantly reduced memory demands and faster performance. This makes them an invaluable tool for makers, hobbyists, and embedded developers who need crisp text output on devices like the ubiquitous , SH1106 , and other common display controllers.
Unlike standard graphics libraries that look at a screen as individual pixels, U8x8 views the screen as a matrix of tiles. Each tile is exactly .
: Draws a string at the specified text column/row. drawGlyph(x, y, code) : Draws a single character.
In the world of embedded systems and microcontroller projects, the visual interface can often be the most resource-intensive feature. When working with small monochrome displays, the choice of font system can be the difference between a project that fits neatly into memory and one that exceeds its constraints. This is where enter the picture—a specialized, lightweight font system designed for text-only character displays on memory-constrained devices. u8x8 fonts
Unlike the standard U8g2 interface, which allows for pixel-perfect positioning and complex graphics, the U8x8 interface operates on an 8x8 pixel grid. This means:
U8x8 is one-half of the U8g2 graphics library developed by Oliver Kraus. The library, which supports over 70 different display controllers and more than 700 fonts, provides two distinct APIs to serve different use cases: U8g2 and U8x8. The U8x8 component was designed with a specific philosophy: it is a that works exclusively with fonts that fit into an 8×8 pixel grid. Unlike its counterpart, the full U8g2 library, U8x8 writes characters directly to the display without requiring any graphics buffer in the microcontroller‘s RAM. This direct-to-display approach is the key to its remarkable memory efficiency.
Fonts in this library use a specific naming convention (prefixed with u8x8_ ) to distinguish them from standard U8g2 fonts. Common categories include: Each tile is exactly
(Text, custom character tiles, and basic inverted blocks only) Best Suited For Rich user interfaces, animations, graphs, and logos
: Modeled after vintage Amstrad computers. Excellent for retro gaming or tech-styled diagnostic tools. 2. High-Readability Minimalists
| Suffix | Meaning | Description | |---|---|---| | _tf | Full | All characters from 32 to 255 | | _tr | Reduced | Only characters from 32 to 127 (basic ASCII) | | _te | Extended | European character set | | _t_all | All | All available characters | | _t_cyrillic | Cyrillic | Cyrillic character set | | _t_hebrew | Hebrew | Hebrew character set | | _t_symbols | Symbols | Symbol characters | | _mf , _mr , etc. | Monospace | Same as above but monospaced | In the world of embedded systems and microcontroller
For U8x8, the most relevant fonts are those marked specifically for 8x8 mode. These are documented in the official U8g2 wiki under the fntlist8x8 section. Some of the most popular choices include:
Contains only uppercase characters (ASCII 32 to 95), saving even more flash memory.
Memory-constrained microcontrollers, such as those with only 2 KB of RAM, can still run U8x8 effectively, whereas the full U8g2 library might be impossible to use. One developer reported their memory usage dropped from 96% to just 37% when switching from U8g2 to U8x8.
: Contains only numbers and the basic symbols required for math, dates, and times (e.g., . , : , - , , ). This uses the least amount of flash memory.
A highly clean, minimalist font that strips away decorative serifs to ensure high readability on tiny 0.96-inch OLED screens. 2. Ultra-Compact & Numeric Fonts