Tiny framebuffer for SSD1306 and similar displays.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
ufb/fb_text.h

29 lines
775 B

/**
* Draw text
*/
#ifndef UFB_FB_TEXT_H
#define UFB_FB_TEXT_H
#include "framebuffer.h"
/// Use tiny font 5x4, supports only digits and select symbols
#define FONT_4X5 8
#define FONT_3X5 16
#define FONT_5X7 0 // default font
/// Use bold variant (each character is printed twice, 1px offset)
#define FONT_BOLD 1
/// Print characters 2x wider
#define FONT_DOUBLEW 2
/// Print characters 2x taller
#define FONT_DOUBLEH 4
/// Print characters 2x wider and taller
#define FONT_DOUBLE (FONT_DOUBLEW | FONT_DOUBLEH)
/// Print text stored in flash
void fb_text_P(fbpos_t x, fbpos_t y, const char *text, uint8_t flags, fbcolor_t color);
/// Print text stored in RAM
void fb_text(fbpos_t x, fbpos_t y, const char *text, uint8_t flags, fbcolor_t color);
#endif //UFB_FB_TEXT_H