1
0
mirror of https://github.com/Dejvino/lilybook.git synced 2024-11-14 12:23:28 +00:00
lilybook/main/modes/reader/PagePrinter.cpp

28 lines
526 B
C++
Raw Normal View History

#include "core/display.h"
#include "epaper/EPD.h"
2020-01-31 19:54:19 +00:00
#include "PagePrinter.h"
#include "esp_log.h"
static const char *TAG = "PagePrinter";
//int pageFont = DEFAULT_FONT;
int pageFont = DEJAVU18_FONT;
2020-01-31 19:54:19 +00:00
PagePrinter::PagePrinter()
{}
void PagePrinter::print(Page* page)
{
if (page->text == NULL) {
ESP_LOGE(TAG, "Page text is NULL");
return;
}
if (page->len == 0) {
return;
}
EPD_setFont(pageFont, NULL);
2020-01-31 19:54:19 +00:00
text_wrap = 1;
EPD_print(page->text, 0, 0);
//EPD_UpdateScreen();
2020-01-31 19:54:19 +00:00
}