Port 6 upstream PRs (PR #939 was already ported): - #852: Complete HalPowerManager with RAII Lock class, WiFi check in setPowerSaving, skipLoopDelay overrides for ClearCache/OtaUpdate, and power lock in Activity render task loops - #965: Fix paragraph formatting inside list items by tracking listItemUntilDepth to prevent unwanted line breaks - #972: Micro-optimizations: std::move in insertFont, const ref for getDataFromBook parameter - #971: Remove redundant hasPrintableChars pre-rendering pass from EpdFont, EpdFontFamily, and GfxRenderer - #977: Skip unsupported image formats before extraction, add PARSE_BUFFER_SIZE constant and chapter parse timing - #975: Fix UITheme memory leak by replacing raw pointer with std::unique_ptr for currentTheme Co-authored-by: Cursor <cursoragent@cursor.com>
15 lines
411 B
C++
15 lines
411 B
C++
#pragma once
|
|
#include "EpdFontData.h"
|
|
|
|
class EpdFont {
|
|
void getTextBounds(const char* string, int startX, int startY, int* minX, int* minY, int* maxX, int* maxY) const;
|
|
|
|
public:
|
|
const EpdFontData* data;
|
|
explicit EpdFont(const EpdFontData* data) : data(data) {}
|
|
~EpdFont() = default;
|
|
void getTextDimensions(const char* string, int* w, int* h) const;
|
|
|
|
const EpdGlyph* getGlyph(uint32_t cp) const;
|
|
};
|