Factor out truncation function.

This commit is contained in:
Jonas Diemer
2025-12-30 18:02:33 +01:00
parent 912bcac992
commit a3a3954062
3 changed files with 14 additions and 7 deletions

View File

@@ -75,6 +75,7 @@ class GfxRenderer {
int getSpaceWidth(int fontId) const;
int getFontAscenderSize(int fontId) const;
int getLineHeight(int fontId) const;
std::string truncatedText(const int fontId, const char* text, const int maxWidth, const EpdFontStyle style) const;
// UI Components
void drawButtonHints(int fontId, const char* btn1, const char* btn2, const char* btn3, const char* btn4) const;