SSD1306 OLED display driver  1.7.6
This library is developed to control SSD1306/SSD1331/SSD1351/IL9163/PCD8554 RGB i2c/spi LED displays
Macros | Functions | Variables
FONTS: Supported LCD fonts

Macros

#define SSD1306_MORE_CHARS_REQUIRED   0xffff
 

Functions

void ssd1306_setCursor (lcdint_t x, lcdint_t y)
 Sets cursor position for text mode print functions. More...
 
void ssd1306_setFixedFont (const uint8_t *progmemFont)
 
void ssd1306_setSecondaryFont (const uint8_t *progmemUnicode)
 
void ssd1306_setFont6x8 (const uint8_t *progmemFont) __attribute__((deprecated))
 
void ssd1306_getCharBitmap (char ch, SCharInfo *info)
 returns char data for currently set (active) font. More...
 
void ssd1306_enableUtf8Mode ()
 
void ssd1306_enableAsciiMode ()
 

Variables

const PROGMEM uint8_t ssd1306xled_font6x8 []
 
const PROGMEM uint8_t ssd1306xled_font6x8_German []
 
const PROGMEM uint8_t ssd1306xled_font6x8_AB []
 
const PROGMEM uint8_t ssd1306xled_font5x7 []
 
const PROGMEM uint8_t ssd1306xled_font5x7_AB []
 
const PROGMEM uint8_t digital_font5x7_123 []
 
const PROGMEM uint8_t digital_font5x7_AB []
 
const PROGMEM uint8_t digital_font5x7 []
 
const PROGMEM uint8_t courier_new_font11x16_digits []
 
const PROGMEM uint8_t comic_sans_font24x32_123 []
 

Detailed Description

Macro Definition Documentation

#define SSD1306_MORE_CHARS_REQUIRED   0xffff

Flag means that more chars are required to decode utf-8

Definition at line 44 of file ssd1306_fonts.h.

Function Documentation

void ssd1306_enableAsciiMode ( )

Enables ascii mode for all text-functions. No any decoding will be performed

Definition at line 188 of file ssd1306_generic.c.

void ssd1306_enableUtf8Mode ( )

Enables utf8 support for all text-functions.

Note
Unicode-16 only supported in text decoding functions.

Definition at line 181 of file ssd1306_generic.c.

void ssd1306_getCharBitmap ( char  ch,
SCharInfo info 
)

returns char data for currently set (active) font.

Function returns char data for currently set font: pointer to progmem data for specified char, and width, height of the char. You can use these data to draw char manually using ssd1306_drawBitmap(), ssd1306_drawMonoBitmap8() or NanoCanvasOps::drawBitmap1().

Parameters
chchar to read from set font
infopointer to SCharInfo structure to fill with char data
See also
ssd1306_setFixedFont

Definition at line 85 of file ssd1306_generic.c.

void ssd1306_setCursor ( lcdint_t  x,
lcdint_t  y 
)

Sets cursor position for text mode print functions.

Sets cursor position for text mode print functions.

Parameters
xxpos in pixels
yypos in pixels

Definition at line 56 of file ssd1306_generic.c.

void ssd1306_setFixedFont ( const uint8_t *  progmemFont)

Function allows to set another fixed font for the library. By default, the font supports only first 128 - 32 ascii chars. First 32 chars of ascii table are non-printable, and removed from the font table to reduce flash memory consumption. Default font doesn't support russian characters. Using this function you can implement your own fonts. First font char must be started with <space> image. Font data should be in the following format: | 0x00 | 0xWW | 0xHH | 0xAA | FONT DATA |, where 0xWW - width in pixels, 0xHH - height in pixels, 0xAA - ascii offset (0x20).
For fixed font 6x8 each char is presented by 6 bytes:
COL0, COL1, COL2, COL3, COL4, COL5.
For fixed font 4x16 each char is presented by 4x16/8 = 8 bytes:
ROW0: COL0, COL1, COL2, COL3,
ROW1: COL0, COL1, COL2, COL3

Parameters
progmemFont- font to setup located in Flash area

Definition at line 62 of file ssd1306_generic.c.

void ssd1306_setFont6x8 ( const uint8_t *  progmemFont)

Function allows to set another font for the library. By default, the font supports only first 128 - 32 ascii chars. First 32 chars of ascii table are non-printable, and removed from the font table to reduce flash memory consumption. Default font doesn't support russian characters. Using this function you can implement your own fonts. First font char must be started with <space> image.

Parameters
progmemFont- font to setup located in Flash area
Deprecated:
Use ssd1306_setFixedFont() instead.

Definition at line 891 of file ssd1306_1bit.c.

void ssd1306_setSecondaryFont ( const uint8_t *  progmemUnicode)

Function allows sets secondary font for specific language. Use it if you want to use additional font to combine capabilities of ascii fonts and language specific font.

Parameters
progmemUnicodefont containing unicode table (refer to ssd1306xled_font6x8_German as example).

Definition at line 76 of file ssd1306_generic.c.

Variable Documentation

const uint8_t comic_sans_font24x32_123

Comic Sans ASCII font 24x32 with digits only (Ascii codes 32 - 64).

Warning
can be used only with ssd1306_printFixed() and ssd1306_setFixedFont() functions.

Definition at line 634 of file ssd1306_fonts.c.

const PROGMEM uint8_t courier_new_font11x16_digits[]

Standard ASCII font 11x16 with digits only (Ascii codes 32 - 64).

Warning
can be used only with ssd1306_printFixed() and ssd1306_setFixedFont() functions.

Definition at line 595 of file ssd1306_fonts.c.

const uint8_t digital_font5x7

Digital ASCII 5x7 font

Definition at line 249 of file ssd1306_fonts.c.

const PROGMEM uint8_t digital_font5x7_123[]

Digital ASCII 5x7 font with only digits and operation signs

const uint8_t digital_font5x7_AB

Digital ASCII 5x7 font with only capital letters

Definition at line 350 of file ssd1306_fonts.c.

const PROGMEM uint8_t ssd1306xled_font5x7[]

Standard ASCII 5x7 font

Definition at line 420 of file ssd1306_fonts.c.

const PROGMEM uint8_t ssd1306xled_font5x7_AB[]

Standard ASCII 5x7 font with only capital letters

Definition at line 522 of file ssd1306_fonts.c.

const PROGMEM uint8_t ssd1306xled_font6x8[]

Standard ASCII 6x8 font

Definition at line 41 of file ssd1306_fonts.c.

const PROGMEM uint8_t ssd1306xled_font6x8_AB[]

Standard ASCII 6x8 AB font with only capital letters

Definition at line 163 of file ssd1306_fonts.c.

const PROGMEM uint8_t ssd1306xled_font6x8_German[]

German chars for standard ASCII 6x8 font

Definition at line 144 of file ssd1306_fonts.c.